Class TLcdProcedureGeometryCalculator
- Direct Known Subclasses:
TLcdProcedure3DGeometryCalculator
ILcdProcedure
objects.
The procedure data must meet the following requirements:
- Values that are undefined in the source data should be set to Double.NaN. Do not attempt to substitute default values (e.g. zero)!
- If an IF leg corresponds to a runway, the course for that leg should be set to the runway direction to make sure the aircraft takes off in the right direction.
- The procedure must not contain more than one branch, i.e. multiple in or out transitions are not allowed.
- Courses must all be true bearings, not magnetic ones.
ILcdProcedureLeg
properties are used during geometry calculation.
- getType(): always required, for obvious reasons.
- getFix(): specifies the terminator of IF, TF, DF, AF, RF, CF, HA, HF, HM legs. Specifies the starting point of FA, FC, FD, FM, PI legs.
- getFixOverflyType(): determines whether the leg should end in a flyby or a flyover.
- getTurnDirectionType(): overrides the turn direction (left or right) where applicable.
- getArcCentreFix(): specifies the center of the arc for RF legs.
- getRecommendedNavaid(): specifies the center of the arc for AF legs. Specifies the DME relative to which distance is measured for CD/VD legs, and the VOR relative to which radials are measured for CR/VR legs.
- getTheta(): specifies the radial from the center to the end point of the turn for AF legs. Specifies the radial to be intercepted for CR/VR legs.
- getCourse(): specifies the radial from the center to the start point of the turn for AF legs. Specifies the course to be flown for all other leg types where applicable.
- getDistance(): specifies the holding leg length for HA, HF, HM legs. Specifies the DME distance for CD/VD legs. Specifies the along track distance for FC legs.
- getDuration(): specifies the duration for which the inbound and outbound legs of a holding pattern are to be flown for HA, HF, HM legs. Note that duration takes precedence over distance if both are specified. Also specifies leg duration for FT, PT legs.
- getIAPFixRole(): determines the starting point of the missed approach procedure if one is present.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
CF (Course to Fix) behavior enumeration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
calculateProcedureGeometry
(ILcdProcedure aProcedure, ILcdProcedureGeometryHandler aHandler) Calculates the geometry of the given procedure.protected void
endProcedureLeg
(ILcdProcedure aProcedure, ILcdProcedureLeg aCurrentLeg) Called when the geometry of the current leg has been generated INCLUDING the transition to the next leg.protected void
flyByOntoArc
(TLcdAircraftState aStateSFCT, ILcdPoint aTerminator, ILcdPoint aCenter, double aRadius, boolean aClockwise, ILcdProcedureGeometryHandler aHandler) Executes a flyby onto the given arc.protected void
flyByOntoLine
(TLcdAircraftState aStateSFCT, ILcdPoint aP1, ILcdPoint aP2, ILcdProcedureGeometryHandler aHandler) Executes a flyby onto the given line segment.protected void
flyOverOntoArc
(TLcdAircraftState aStateSFCT, ILcdPoint aTerminator, ILcdPoint aCenter, double aRadius, boolean aClockwise, ILcdProcedureGeometryHandler aHandler) Executes a flyover onto the specified arc.protected void
flyOverOntoLine
(TLcdAircraftState aStateSFCT, ILcdPoint aTargetFix, TLcdProcedureLegTurnDirectionType aTurnDirection, ILcdProcedureGeometryHandler aHandler) Executes a flyover onto the line segment specified by the current aircraft position andaTargetFix
.Returns the current aircraft performance settings.protected final TLcdAircraftState
Get the behavior to render CF (Course to a fix) procedure legs.double
Returns the angle in degrees to be used to calculate subsequent arc discretization points.protected final ILcdEllipsoid
protected final void
handleAngleArc
(ILcdPoint aCentre, double aRadius, double aStartAngle, double aArcAngle, double aStartHeight, double aEndHeight, TLcdProcedureGeometryType aType, TLcdAircraftState aState, ILcdProcedureGeometryHandler aHandler) This method may be used by derived classes to output geometry.protected final void
handleLine
(ILcdPoint aStartPoint, ILcdPoint aEndPoint, TLcdProcedureGeometryType aType, TLcdAircraftState aState, ILcdProcedureGeometryHandler aHandler) This method may be used by derived classes to output geometry.protected final void
handlePoint
(ILcdPoint aPoint, TLcdProcedureGeometryType aType, TLcdAircraftState aState, ILcdProcedureGeometryHandler aHandler) This method may be used by derived classes to output geometry.protected void
initializeAircraft
(ILcdProcedure aProcedure) This method is called at the beginning of a procedure, before any leg is handled.static boolean
Deprecated.This method has been deprecated.boolean
Returns true if holding entry maneuvers are enabled.void
Sets the aircraft performance settings on which to base the procedure geometry calculation.void
setCFBehavior
(TLcdProcedureGeometryCalculator.CFBehavior aCFBehavior) Set the behavior to render CF (Course to a fix) procedure legs.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.void
setCoordinateSystems
(ILcdGeoReference aSource, ILcdGeoReference aTarget) Specifies the coordinate systems the geometry calculator should work with.void
setDiscretizationResolutionAngle
(double aAngle) Sets the angle in degrees to be used to calculate subsequent arc discretization points.void
setDoHoldingEntries
(boolean aDoEntries) Set this to true to enable proper holding entry maneuvers (direct, parallel or teardrop, depending on the entry course).protected void
startProcedureLeg
(ILcdProcedure aProcedure, ILcdProcedureLeg aCurrentLeg) Called when a new leg is about to be handled.
-
Constructor Details
-
Method Details
-
isClassTraceOn
public static boolean isClassTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istrue
then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn
- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
setCoordinateSystems
Specifies the coordinate systems the geometry calculator should work with. All calculations are internally done in geodetic coordinates. The geometry calculator will transform its input from the source reference to a geodetic reference (if necessary), and transform the computed geometry from the internal geodetic reference to the specified target reference (again, if necessary). IfsetCoordinateSystems
is not called, the geometry calculator will do all calculations based on a default WGS84 geodetic reference.- Parameters:
aSource
- the coordinate reference system of the input dataaTarget
- the desired coordinate reference system for the generated procedure geometry
-
setAircraftPerformanceSettings
Sets the aircraft performance settings on which to base the procedure geometry calculation.- Parameters:
aPerformance
- aTLcdAircraftPerformanceSettings
-
getAircraftPerformanceSettings
Returns the current aircraft performance settings.- Returns:
- a
TLcdAircraftPerformanceSettings
-
setDoHoldingEntries
public void setDoHoldingEntries(boolean aDoEntries) Set this to true to enable proper holding entry maneuvers (direct, parallel or teardrop, depending on the entry course).- Parameters:
aDoEntries
- whether to enable (calculate) holding entry maneuvers
-
isDoHoldingEntries
public boolean isDoHoldingEntries()Returns true if holding entry maneuvers are enabled.- Returns:
- true if holding entry maneuvers are enabled.
-
setDiscretizationResolutionAngle
public void setDiscretizationResolutionAngle(double aAngle) Sets the angle in degrees to be used to calculate subsequent arc discretization points.Procedure arcs (originating from any leg type) are by default discretized into a set of arc segments in the
calculateProcedureGeometry(com.luciad.ais.model.procedure.ILcdProcedure, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
method. The resulting arc segments are submitted to the procedure geometry handler that has been supplied to that method; see alsoILcdProcedureGeometryHandler.handleArcSegment(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, int, int, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType)
. By default, a value of 5 degrees is used to determine subsequent arc segment begin / end points.- Parameters:
aAngle
- the angle in degrees to be used to calculate subsequent arc segment points.- Throws:
IllegalArgumentException
- if the given angle is<= 0
-
getDiscretizationResolutionAngle
public double getDiscretizationResolutionAngle()Returns the angle in degrees to be used to calculate subsequent arc discretization points.Procedure arcs (originating from any leg type) are by default discretized into a set of arc segments in the
calculateProcedureGeometry(com.luciad.ais.model.procedure.ILcdProcedure, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
method. The resulting arc segments are submitted to the procedure geometry handler that has been supplied to that method; see alsoILcdProcedureGeometryHandler.handleArcSegment(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, int, int, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType)
. By default, a value of 5 degrees is used to determine subsequent arc segment begin / end points.- Returns:
- the angle in degrees to be used to calculate subsequent arc segment points.
-
calculateProcedureGeometry
public void calculateProcedureGeometry(ILcdProcedure aProcedure, ILcdProcedureGeometryHandler aHandler) Calculates the geometry of the given procedure. AnILcdProcedureGeometryHandler
must be provided to process the geometry with.An
ILcdProcedure
represents a high-level modeling of a procedure, following the ARINC 424 Path & Terminator concept. This method is capable of turning such a procedure into a list of points that can be visualized on the map. This approach is typically used in combination withTLcdProcedureTrajectory
, which uses it to represent anILcdProcedure
as a polyline.- Parameters:
aProcedure
- the procedure for which the geometry must be calculatedaHandler
- a call-back instance that gets updated when new geometry segments are calculated
-
getEllipsoid
- Returns:
- the ellipsoid on which the internal geodetic calculations are performed
- See Also:
-
initializeAircraft
This method is called at the beginning of a procedure, before any leg is handled. It allows to set the current altitude and other properties if necessary. The default implementation sets position to invalid, and the altitude and heading to Double.NaN.Be careful with position and heading of the aircraft, as it may interfere with the initial IF leg and possibly also the next leg(s).
-
startProcedureLeg
Called when a new leg is about to be handled. Derived classes must call the super method to ensure proper functioning of the geometry calculator.- Parameters:
aProcedure
- the procedure whose geometry is being calculatedaCurrentLeg
- the procedure leg about to be processed
-
endProcedureLeg
Called when the geometry of the current leg has been generated INCLUDING the transition to the next leg.This method shall update the current altitude of the aircraft to its altitude after the leg.
- Parameters:
aProcedure
- the procedure whose geometry is being calculatedaCurrentLeg
- the procedure leg that has been processed
-
getAircraftState
- Returns:
- the
TLcdAircraftState
used by the geometry calculator.
-
handlePoint
protected final void handlePoint(ILcdPoint aPoint, TLcdProcedureGeometryType aType, TLcdAircraftState aState, ILcdProcedureGeometryHandler aHandler) This method may be used by derived classes to output geometry. The method automatically takes care of transformations between the source, internal and target references. Descending classes shall not call the methods of the suppliedILcdProcedureGeometryHandler
directly, as this will bypass the transformations.- Parameters:
aPoint
- the point to be outputaType
- the geometry type of the outputaState
- the current state of the aircraftaHandler
- theILcdProcedureGeometryHandler
being used to process the procedure geometry- See Also:
-
handleLine
protected final void handleLine(ILcdPoint aStartPoint, ILcdPoint aEndPoint, TLcdProcedureGeometryType aType, TLcdAircraftState aState, ILcdProcedureGeometryHandler aHandler) This method may be used by derived classes to output geometry. The method automatically takes care of transformations between the source, internal and target references. Descending classes shall not call the methods of the suppliedILcdProcedureGeometryHandler
directly, as this will bypass the transformations.- Parameters:
aStartPoint
- the start point of the line segment to be outputaEndPoint
- the end point of the line segment to be outputaType
- the geometry type of the outputaState
- the current state of the aircraftaHandler
- theILcdProcedureGeometryHandler
being used to process the procedure geometry- See Also:
-
handleAngleArc
protected final void handleAngleArc(ILcdPoint aCentre, double aRadius, double aStartAngle, double aArcAngle, double aStartHeight, double aEndHeight, TLcdProcedureGeometryType aType, TLcdAircraftState aState, ILcdProcedureGeometryHandler aHandler) This method may be used by derived classes to output geometry. The method automatically takes care of transformations between the source, internal and target references. Descending classes shall not call the methods of the suppliedILcdProcedureGeometryHandler
directly, as this will bypass the transformations.Note that calling this method will result in a discretized arc being passed to the geometry handler.
- Parameters:
aCentre
- the center of the arc to be outputaStartAngle
- the start angle of the arc to be outputaArcAngle
- the arc angle of the arc to be outputaStartHeight
- the initial altitude of the arc to be outputaEndHeight
- the final altitude of the arc to be outputaType
- the geometry type of the outputaState
- the current state of the aircraftaHandler
- theILcdProcedureGeometryHandler
being used to process the procedure geometry- See Also:
-
flyByOntoLine
protected void flyByOntoLine(TLcdAircraftState aStateSFCT, ILcdPoint aP1, ILcdPoint aP2, ILcdProcedureGeometryHandler aHandler) Executes a flyby onto the given line segment. When this method is called, the aircraft will be positioned such that it may travel towardsaP1
in a straight line. This method shall determine the starting point of the turn, move the aircraft towards this point, and then perform the turn itself. Upon completion, the aircraft shall be precisely on the specified line segment and oriented towardsaP2
.Overriding methods must use the
handlePoint
,handleLine
andhandleAngleArc
methods ofTLcdProcedureGeometryCalculator
if they wish to output any geometry. The suppliedILcdProcedureGeometryHandler
shall not be called directly!- Parameters:
aStateSFCT
- the current aircraft stateaP1
- the start point of the line segment onto which to flyaP2
- the end point of the line segment onto which to flyaHandler
- theILcdProcedureGeometryHandler
being used to process the procedure geometry- See Also:
-
flyByOntoArc
protected void flyByOntoArc(TLcdAircraftState aStateSFCT, ILcdPoint aTerminator, ILcdPoint aCenter, double aRadius, boolean aClockwise, ILcdProcedureGeometryHandler aHandler) Executes a flyby onto the given arc. When this method is called,aTerminator
will specify the point at which the current course intercepts the arc. The aircraft will be positioned such that it may travel towardsaTerminator
in a straight line. This method shall determine the starting point of the turn, move the aircraft towards this point, and then perform the turn itself. Upon completion, the aircraft shall be precisely on the specified arc and be oriented tangentially to it.Overriding methods must use the
handlePoint
,handleLine
andhandleAngleArc
methods ofTLcdProcedureGeometryCalculator
if they wish to output any geometry. The suppliedILcdProcedureGeometryHandler
shall not be called directly!- Parameters:
aStateSFCT
- the current aircraft stateaTerminator
- the intersection point of the current course and the target arcaCenter
- the center of the arc onto which to flyaRadius
- the radius of the arc onto which to flyaClockwise
- the turn direction to be used for the flyby (true for clockwise, false for counterclockwise)aHandler
- theILcdProcedureGeometryHandler
being used to process the procedure geometry- See Also:
-
flyOverOntoLine
protected void flyOverOntoLine(TLcdAircraftState aStateSFCT, ILcdPoint aTargetFix, TLcdProcedureLegTurnDirectionType aTurnDirection, ILcdProcedureGeometryHandler aHandler) Executes a flyover onto the line segment specified by the current aircraft position andaTargetFix
. This method shall turn the aircraft such that it faces towards the target. Upon completion, the aircraft shall also be precisely on the line from the initial position toaTargetFix
.Overriding methods must use the
handlePoint
,handleLine
andhandleAngleArc
methods ofTLcdProcedureGeometryCalculator
if they wish to output any geometry. The suppliedILcdProcedureGeometryHandler
shall not be called directly!- Parameters:
aStateSFCT
- the current aircraft stateaTargetFix
- the end point of the line segment onto which to flyaTurnDirection
- the turn direction to be used for the flyoveraHandler
- theILcdProcedureGeometryHandler
being used to process the procedure geometry- See Also:
-
flyOverOntoArc
protected void flyOverOntoArc(TLcdAircraftState aStateSFCT, ILcdPoint aTerminator, ILcdPoint aCenter, double aRadius, boolean aClockwise, ILcdProcedureGeometryHandler aHandler) Executes a flyover onto the specified arc. When this method is called, the aircraft will be positioned such that it faces towards the arc.aTerminator
will specify the intersection point of the current course and the target arc. This method shall move the plane towardsaTerminator
, and then perform the flyover such that the plane ends up precisely on the arc, facing in the direction of the arc's end point, and oriented tangentially to the arc.Overriding methods must use the
handlePoint
,handleLine
andhandleAngleArc
methods ofTLcdProcedureGeometryCalculator
if they wish to output any geometry. The suppliedILcdProcedureGeometryHandler
shall not be called directly!- Parameters:
aStateSFCT
- the current aircraft stateaTerminator
- the intersection point of the current course and the target arc, i.e. the point where the flyover must beginaCenter
- the center of the arc onto which to flyaRadius
- the radius of the arc onto which to flyaClockwise
- the turn direction to be used for the flyover (true for clockwise, false for counterclockwise)aHandler
- theILcdProcedureGeometryHandler
being used to process the procedure geometry- See Also:
-
getCFBehavior
Get the behavior to render CF (Course to a fix) procedure legs.- Returns:
- the behavior to render CF legs
-
setCFBehavior
Set the behavior to render CF (Course to a fix) procedure legs.- Parameters:
aCFBehavior
- the new behavior to render CF legs
-