Click or drag to resize

Connections

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 (get) as needed. This will insert connections between the RouteProcedures added to the propagator. Here is an example:

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

ProfileDynamics profileDynamics = new ProfileDynamics();
double inclineAngle = Trig.degreesToRadians(10.0);
profileDynamics.setAscentSpeed(cruiseSpeed.getTargetSpeed() * Math.sin(inclineAngle));
profileDynamics.setDescentSpeed(1.5 * profileDynamics.getAscentSpeed());
profileDynamics.setPitchUpAcceleration(0.4 * Constants.EarthSurfaceGravity);
profileDynamics.setPushOverAcceleration(0.6 * Constants.EarthSurfaceGravity);
profileDynamics.setThrustAcceleration(0.4 * Constants.EarthSurfaceGravity);
profileDynamics.setThrustDeceleration(0.6 * Constants.EarthSurfaceGravity);

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

propagator.getDefaultConnectionBehavior().setSurfaceShape(localTerrain.getShape());
propagator.getDefaultConnectionBehavior().setKindOfSurfaceConnection(KindOfSurfaceConnection.RHUMB_LINE);
propagator.getDefaultConnectionBehavior().setDynamics(profileDynamics);
propagator.getDefaultConnectionBehavior().setSpeed(cruiseSpeed);

if (useTerrainForProfiles) {
    propagator.getDefaultConnectionBehavior().setKindOfProfile(DefaultProfileBehavior.AVOID_TERRAIN);
    propagator.getDefaultConnectionBehavior().setTerrainSurface(localTerrain);
    propagator.getDefaultConnectionBehavior().setTerrainSamplingDistance(100.0); // ~328 feet
    propagator.getDefaultConnectionBehavior().setMinimumHeightAboveTerrain(400.0); // ~1312 feet
} else {
    propagator.getDefaultConnectionBehavior().setKindOfProfile(DefaultProfileBehavior.STANDARD_CONNECTION);
    propagator.getDefaultConnectionBehavior().setTerrainSurface(new EllipsoidTerrainProvider(earth.getShape(), earth.getFixedFrame()));
}

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 (get) and the ConnectionConfigurationResults (get).

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.FOLLOW_TERRAIN, while aircraft will often tend to want to use DefaultProfileBehavior.AVOID_TERRAIN but in general just use DefaultProfileBehavior.STANDARD_CONNECTION 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 (get) 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.

Java
ConstantHeightProfile taxiProfile = new ConstantHeightProfile();
taxiProfile.setHeight(groundHeight); // Account for the center of mass above the ground
taxiProfile.setSpeed(10.0); // ~20 miles per hour
taxiProfile.setHeightReferenceSurface(localTerrain);
taxiProfile.setAllowVariationInHeight(false);
taxiProfile.setAllowVariationInSpeed(false);

// Create a custom connection to override the aircraft behavior
// in order to act like a ground vehicle
ProfileRouteConnection taxiConnection = new ProfileRouteConnection();
taxiConnection.setKindOfSurfaceConnection(KindOfSurfaceConnection.RHUMB_LINE);
taxiConnection.setRouteProfile(taxiProfile);
taxiConnection.setSurfaceShape(earth.getShape());
propagator.getSegments().add(taxiConnection);

TurnBeforeWaypointProcedure finalWaypoint = new TurnBeforeWaypointProcedure();
finalWaypoint.setWaypoint(new Cartographic(Trig.degreesToRadians(69.2621550808261), Trig.degreesToRadians(34.9428441053572), 0));
finalWaypoint.setTurningRadius(10.0);
finalWaypoint.setProfile(taxiProfile);
finalWaypoint.setSurfaceShape(earth.getShape());
propagator.getSegments().add(finalWaypoint);
{
    

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.