Click or drag to resize


A RouteConnection manages the smooth transition between two surrounding procedures. The connections will configure themselves so that they match the surrounding boundary conditions of the procedures. If the connections cannot connect smoothly or violate user-specified dynamics, they will attempt to reconfigure the surrounding procedures to allow for a feasible route unless the user has specified that the procedures should not be changed. Connections give the user a way to specify which heuristics to use when connecting two procedures, including: whether to use constant heading or shortest distance, whether to behave like a ground vehicle or an aircraft, whether to automatically avoid hitting terrain or to ignore it.

Note Note

The functionality described in this topic requires a license for the Route Design Library.

Using Connections

There are two ways to create connections. The easiest way is to simply let the RoutePropagator configure the connections by default. The other involves creating specific connections to insert between RouteProcedures. To change the settings for the default connections created by the propagator, set the properties on the DefaultConnectionBehavior as needed. This will insert connections between the RouteProcedures added to the propagator. Here is an example:

ProfileSpeed cruiseSpeed = new ProfileSpeed(30.0, SpeedReference.Total); // ~67 miles per hour

ProfileDynamics profileDynamics = new ProfileDynamics();
double inclineAngle = Trig.DegreesToRadians(10.0);
profileDynamics.AscentSpeed = cruiseSpeed.TargetSpeed * Math.Sin(inclineAngle);
profileDynamics.DescentSpeed = 1.5 * profileDynamics.AscentSpeed;
profileDynamics.PitchUpAcceleration = 0.4 * Constants.EarthSurfaceGravity;
profileDynamics.PushOverAcceleration = 0.6 * Constants.EarthSurfaceGravity;
profileDynamics.ThrustAcceleration = 0.4 * Constants.EarthSurfaceGravity;
profileDynamics.ThrustDeceleration = 0.6 * Constants.EarthSurfaceGravity;

RoutePropagator propagator = new RoutePropagator();
propagator.CentralBody = earth;

propagator.DefaultConnectionBehavior.SurfaceShape = localTerrain.Shape;
propagator.DefaultConnectionBehavior.KindOfSurfaceConnection = KindOfSurfaceConnection.RhumbLine;
propagator.DefaultConnectionBehavior.Dynamics = profileDynamics;
propagator.DefaultConnectionBehavior.Speed = cruiseSpeed;

if (useTerrainForProfiles)
    propagator.DefaultConnectionBehavior.KindOfProfile = DefaultProfileBehavior.AvoidTerrain;
    propagator.DefaultConnectionBehavior.TerrainSurface = localTerrain;
    propagator.DefaultConnectionBehavior.TerrainSamplingDistance = 100.0; // ~328 feet
    propagator.DefaultConnectionBehavior.MinimumHeightAboveTerrain = 400.0; // ~1312 feet
    propagator.DefaultConnectionBehavior.KindOfProfile = DefaultProfileBehavior.StandardConnection;
    propagator.DefaultConnectionBehavior.TerrainSurface = new EllipsoidTerrainProvider(earth.Shape, earth.FixedFrame);

There are two enumerations which indicate which kinds of behavior to use for the surface geometry and the profile geometry respectively. KindOfSurfaceConnection indicates whether to use lines of constant heading (EllipsoidRhumbLine) or to use lines of minimum distance (EllipsoidGeodesic). DefaultProfileBehavior indicates which profile to use for the connections. The options include whether to follow the terrain at a constant height (like a ground vehicle), connect directly with respect to an altitude reference surface (like an aircraft), or to include terrain while trying to maintain a minimum distance above the terrain surface. Note that specifying constant height above terrain may cause configuration errors if different reference surfaces are used or the profile behavior changes along the route. The propagator will attempt to adjust profiles to account for discrepancies. In the case of an unavoidable discontinuity (for instance, when two constant height profiles on different reference surfaces result in a discontinuity in the rate of change of height at the intersection), the propagator will produce the discontinuous route and return an error in the ProcedureConfigurationResults and the ConnectionConfigurationResults.

Connections allow users to specify what kind of heuristics to use when connecting Procedures together. Primarily, connections allow the user to specify whether the platform moving along the route behaves like an aircraft, a ground vehicle, or has some other specific behavior. Ground vehicles generally will use DefaultProfileBehavior.FollowTerrain, while aircraft will often tend to want to use DefaultProfileBehavior.AvoidTerrain but in general just use DefaultProfileBehavior.StandardConnection to fly directly from one procedure to another.

However, there are some cases where it is necessary to mix and match different connection behaviors. In one case, users may want to permit a platform to transition from behaving like a ground vehicle traversing along a runway surface during a taxi maneuver to a takeoff and then transition to use a direct connection over the terrain. To do this, the user can insert custom connections between the relevant procedures in the Segments on the propagator. Without connections between procedures, the propagator will add a connection based on the default connection. For custom connections, the user should make sure that there are never two consecutive connections. Here is an example of performing a taxi after a landing. The following code occurs after adding the LandingProcedure to the propagator.

ConstantHeightProfile taxiProfile = new ConstantHeightProfile();
taxiProfile.Height = groundHeight; // Account for the center of mass above the ground
taxiProfile.Speed = 10.0; // ~20 miles per hour
taxiProfile.HeightReferenceSurface = localTerrain;
taxiProfile.AllowVariationInHeight = false;
taxiProfile.AllowVariationInSpeed = false;

// Create a custom connection to override the aircraft behavior
// in order to act like a ground vehicle
ProfileRouteConnection taxiConnection = new ProfileRouteConnection();
taxiConnection.KindOfSurfaceConnection = KindOfSurfaceConnection.RhumbLine;
taxiConnection.RouteProfile = taxiProfile;
taxiConnection.SurfaceShape = earth.Shape;

TurnBeforeWaypointProcedure finalWaypoint = new TurnBeforeWaypointProcedure();
finalWaypoint.Waypoint = new Cartographic(Trig.DegreesToRadians(69.2621550808261), Trig.DegreesToRadians(34.9428441053572), 0);
finalWaypoint.TurningRadius = 10.0;
finalWaypoint.Profile = taxiProfile;
finalWaypoint.SurfaceShape = earth.Shape;

Similarly, it is possible to create different behavior when dealing with terrain. Since dealing with terrain files requires disk-access, it can be slow depending on the hardware involved. If there is only one subset of procedures that are maneuvering around mountainous terrain while others are cruising at altitude, it makes sense to only have terrain avoidance behavior for that subset that cares about terrain.