How Powerful Are STK DME Components? A Practical Guide with Aircraft Simulation

Manya Technologies custom GIS software development team

When it comes to realistic simulation of aircraft, satellites, and other moving platforms, STK (Systems Tool Kit) DME (Dynamic Motion Engine) components stand out as a robust solution. In this blog post, we’ll explore the power of STK DME, its use cases, and walk through how to create and update aircraft motion using STK DME in C#.


Why STK DME?

STK DME is designed for high-fidelity, physics-based simulation. Its core strength is accurately propagating the motion of platforms over time, whether it’s a commercial aircraft, a military jet, or even a satellite orbit. With DME, developers and engineers can:

  • Simulate realistic kinematics with speed, heading, and acceleration.
  • Support large-scale scenarios with multiple moving platforms.
  • Integrate with 3D visualization engines like Cesium, Unity, or Unreal.
  • Compute and broadcast real-time positions, orientations, and velocities.
  • Use waypoints and dynamic trajectories to model complex paths.

Typical Use Cases

STK DME is commonly used in:

  1. Defense and Aerospace
    • Tracking aircraft, missiles, UAVs.
    • Mission planning simulations.
    • Radar and sensor system testing.
  2. Air Traffic Management
    • Simulating commercial aircraft routes.
    • Evaluating flight separation and collision avoidance.
  3. Training and Virtual Environments
    • Flight simulators.
    • VR-based training environments with moving entities.
  4. Integration with GIS and Visualization
    • Real-time rendering on maps (QGIS, CesiumJS).
    • Scenario analysis for geospatial applications.

How to Create an Aircraft Using STK DME

Creating a platform (aircraft) involves defining waypoints, propagating its motion, and associating it with a platform object. Here’s a working example in C#:

public class Ownship
{
    public int Id { get; private set; }
    public Platform Aircraft { get; private set; }
    public WaypointPropagator Propagator { get; private set; }
    public MotionEvaluator<Cartesian> Evaluator { get; private set; }
    public float Heading { get; set; }
    public float Pitch { get; set; }
    public float Roll { get; set; }
    public float Yaw { get; set; }

    public float Speed { get; set; }

    public Ownship(int id, Platform platform, WaypointPropagator propagator, MotionEvaluator<Cartesian> evaluator, float pitch = 0, float roll = 0,  float yaw=0, float heading = 0, float speed = 0)
    {
        Id = id;
        Aircraft = platform;
        Propagator = propagator;
        Evaluator = evaluator;
        Pitch = pitch;
        Roll = roll;
        Yaw = yaw;
        Heading = heading;
        Speed = speed;
    }
}

static void CreateNewAircraft()
{
    double centerLat = 21.0;
    double centerLon = 78.0;
    double defaultSpeed = 200.0; // m/s
    double alt = 10000; // meters

    if (earth?.Shape == null)
        throw new InvalidOperationException("Earth shape is not initialized.");

    double headingRad = rnd.NextDouble() * 2 * Math.PI;
    double distanceMeters = defaultSpeed * simulationDurationSec;

    double deltaLat = distanceMeters * Math.Cos(headingRad) / 111000.0;
    double deltaLon = distanceMeters * Math.Sin(headingRad) / (111000.0 * Math.Cos(centerLat * Constants.RadiansPerDegree));

    double lat2 = centerLat + deltaLat;
    double lon2 = centerLon + deltaLon;

    // Create waypoints
    var wpt1 = new Waypoint(startTime, new Cartographic(centerLon * Constants.RadiansPerDegree,
                                                        centerLat * Constants.RadiansPerDegree,
                                                        alt),
                            defaultSpeed, 0.0);

    var wpt2 = new Waypoint(wpt1, earth.Shape, new Cartographic(lon2 * Constants.RadiansPerDegree,
                                                                lat2 * Constants.RadiansPerDegree,
                                                                alt),
                            defaultSpeed);

    // Create waypoint propagator
    var propagator = new WaypointPropagator(earth, wpt1, wpt2);
    var evaluator = propagator.GetEvaluator();

    // Create platform
    var aircraft = new Platform
    {
        Name = "1001",
        LocationPoint = propagator.CreatePoint(),
        OrientationAxes = new AxesVehicleVelocityLocalHorizontal(earth.FixedFrame, propagator.CreatePoint())
    };

    // Track new aircraft
    newaircraft = new Ownship(1001, aircraft, propagator, evaluator);
    Console.WriteLine("Aircraft added: " + aircraft.Name);
}

This code initializes an aircraft at a given location, sets its speed and altitude, and defines a simple straight-line trajectory using STK DME waypoints.


Updating Aircraft Motion

Once the aircraft is created, you can update its motion in real-time, compute heading, and speed:

static void UpdateAndBroadcastNewAircraft(object? state)
{
    lock (newaircraftLock)
    {
        if (currentTime == null)
            currentTime = startTime;
        else
            currentTime = currentTime.Value.AddSeconds(1);

        JulianDate timeToUse = currentTime.Value;

        Motion<Cartesian> motion;
        try
        {
            motion = newaircraft.Evaluator.Evaluate(timeToUse, 1);
        }
        catch
        {
            Console.WriteLine("No motion in aircraft.");
            return;
        }

        var carto = earth.Shape.CartesianToCartographic(motion.Value);
        var vel = motion.FirstDerivative;

        // Compute ENU velocity
        double latRad = carto.Latitude, lonRad = carto.Longitude;
        double sinLat = Math.Sin(latRad), cosLat = Math.Cos(latRad);
        double sinLon = Math.Sin(lonRad), cosLon = Math.Cos(lonRad);
        var e = new double[] { -sinLon, cosLon, 0 };
        var n = new double[] { -sinLat * cosLon, -sinLat * sinLon, cosLat };

        double vE = vel.X * e[0] + vel.Y * e[1] + vel.Z * e[2];
        double vN = vel.X * n[0] + vel.Y * n[1] + vel.Z * n[2];

        double headingRad = Math.Atan2(vE, vN);
        double headingDeg = headingRad * Constants.DegreesPerRadian;
        if (headingDeg < 0) headingDeg += 360;
        float speed = (float)Math.Sqrt(vE * vE + vN * vN);

        int id = 1001;

        newaircraft_message.ID = id;
        newaircraft_message.Lat = (float)(carto.Latitude * Constants.DegreesPerRadian);
        newaircraft_message.Lon = (float)(carto.Longitude * Constants.DegreesPerRadian);
        newaircraft_message.Alt = (float)carto.Height;
        newaircraft_message.Heading = (float)headingDeg;
        newaircraft_message.Speed = speed;

        Console.WriteLine("Aircraft updated");
    }
}

This function evaluates the aircraft’s position each second and computes heading and speed in the East-North-Up frame, making it ready for visualization or broadcasting to other systems.


Why This Approach Is Effective

  • High Fidelity: Trajectories are physically accurate and time-synced.
  • Customizable: Speed, heading, and altitude can all be manipulated.
  • Real-Time Ready: Works well for live display in simulation dashboards or GIS platforms.
  • Scalable: Multiple aircraft or moving platforms can be managed efficiently.

Conclusion

STK DME components are a robust tool for aircraft and platform simulation, suitable for defense, aerospace, air traffic, and GIS visualization applications. By combining waypoint propagation with real-time updates, you can create highly realistic simulations that are ready for visualization or further analysis.

Whether you want to simulate a single jet or thousands of moving objects on a map, STK DME provides the accuracy, flexibility, and performance you need.

For expert solutions in simulation across defense, aerospace, and commercial sectors, contact Manya Technologies. We specialize in high-fidelity aircraft, UAV, radar, and mission simulations, offering end-to-end development, real-time visualization, and custom scenario modeling. Whether you need advanced training simulators, operational analysis, or large-scale geospatial simulations, our team delivers robust, scalable, and tailored solutions to meet your specific requirements.

Scroll to Top