public class TLcdProcedureGeometryCalculator extends Object
ILcdProcedure
objects.
The procedure data must meet the following requirements:
ILcdProcedureLeg
properties are used during geometry calculation.
Modifier and Type | Class and Description |
---|---|
static class |
TLcdProcedureGeometryCalculator.CFBehavior
CF (Course to Fix) behavior enumeration.
|
Constructor and Description |
---|
TLcdProcedureGeometryCalculator()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
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 and
aTargetFix . |
TLcdAircraftPerformanceSettings |
getAircraftPerformanceSettings()
Returns the current aircraft performance settings.
|
protected TLcdAircraftState |
getAircraftState() |
TLcdProcedureGeometryCalculator.CFBehavior |
getCFBehavior()
Get the behavior to render CF (Course to a fix) procedure legs.
|
double |
getDiscretizationResolutionAngle()
Returns the angle in degrees to be used to calculate subsequent arc discretization points.
|
protected ILcdEllipsoid |
getEllipsoid() |
protected 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 void |
handleLine(ILcdPoint aStartPoint,
ILcdPoint aEndPoint,
TLcdProcedureGeometryType aType,
TLcdAircraftState aState,
ILcdProcedureGeometryHandler aHandler)
This method may be used by derived classes to output geometry.
|
protected 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 |
isClassTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
boolean |
isDoHoldingEntries()
Returns true if holding entry maneuvers are enabled.
|
void |
setAircraftPerformanceSettings(TLcdAircraftPerformanceSettings aPerformance)
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. It is recommended to use the
standard Java logging framework directly.
|
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.
|
public TLcdProcedureGeometryCalculator()
public static boolean isClassTraceOn()
true
if tracing is enabled for this class.public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setCoordinateSystems(ILcdGeoReference aSource, ILcdGeoReference aTarget)
setCoordinateSystems
is not called,
the geometry calculator will do all calculations based on a default WGS84
geodetic reference.aSource
- the coordinate reference system of the input dataaTarget
- the desired coordinate reference system for the generated procedure geometrypublic void setAircraftPerformanceSettings(TLcdAircraftPerformanceSettings aPerformance)
aPerformance
- a TLcdAircraftPerformanceSettings
public TLcdAircraftPerformanceSettings getAircraftPerformanceSettings()
TLcdAircraftPerformanceSettings
public void setDoHoldingEntries(boolean aDoEntries)
aDoEntries
- whether to enable (calculate) holding entry maneuverspublic boolean isDoHoldingEntries()
public void setDiscretizationResolutionAngle(double aAngle)
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 also
ILcdProcedureGeometryHandler.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.
aAngle
- the angle in degrees to be used to calculate subsequent arc segment
points.IllegalArgumentException
- if the given angle is <= 0
public double getDiscretizationResolutionAngle()
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 also
ILcdProcedureGeometryHandler.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.
public void calculateProcedureGeometry(ILcdProcedure aProcedure, ILcdProcedureGeometryHandler aHandler)
ILcdProcedureGeometryHandler
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 with TLcdProcedureTrajectory
,
which uses it to represent an ILcdProcedure
as a polyline.
aProcedure
- the procedure for which the geometry must be calculatedaHandler
- a call-back instance that gets updated when new geometry segments are calculatedprotected final ILcdEllipsoid getEllipsoid()
setCoordinateSystems(com.luciad.reference.ILcdGeoReference, com.luciad.reference.ILcdGeoReference)
protected void initializeAircraft(ILcdProcedure aProcedure)
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).
protected void startProcedureLeg(ILcdProcedure aProcedure, ILcdProcedureLeg aCurrentLeg)
aProcedure
- the procedure whose geometry is being calculatedaCurrentLeg
- the procedure leg about to be processedprotected void endProcedureLeg(ILcdProcedure aProcedure, ILcdProcedureLeg aCurrentLeg)
This method shall update the current altitude of the aircraft to its altitude after the leg.
aProcedure
- the procedure whose geometry is being calculatedaCurrentLeg
- the procedure leg that has been processedprotected final TLcdAircraftState getAircraftState()
TLcdAircraftState
used by the geometry calculator.protected final void handlePoint(ILcdPoint aPoint, TLcdProcedureGeometryType aType, TLcdAircraftState aState, ILcdProcedureGeometryHandler aHandler)
ILcdProcedureGeometryHandler
directly, as this
will bypass the transformations.aPoint
- the point to be outputaType
- the geometry type of the outputaState
- the current state of the aircraftaHandler
- the ILcdProcedureGeometryHandler
being used to process the procedure geometrysetCoordinateSystems(com.luciad.reference.ILcdGeoReference, com.luciad.reference.ILcdGeoReference)
protected final void handleLine(ILcdPoint aStartPoint, ILcdPoint aEndPoint, TLcdProcedureGeometryType aType, TLcdAircraftState aState, ILcdProcedureGeometryHandler aHandler)
ILcdProcedureGeometryHandler
directly, as this
will bypass the transformations.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
- the ILcdProcedureGeometryHandler
being used to process the procedure geometrysetCoordinateSystems(com.luciad.reference.ILcdGeoReference, com.luciad.reference.ILcdGeoReference)
protected final void handleAngleArc(ILcdPoint aCentre, double aRadius, double aStartAngle, double aArcAngle, double aStartHeight, double aEndHeight, TLcdProcedureGeometryType aType, TLcdAircraftState aState, ILcdProcedureGeometryHandler aHandler)
ILcdProcedureGeometryHandler
directly, as this
will bypass the transformations.
Note that calling this method will result in a discretized arc being passed to the geometry handler.
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
- the ILcdProcedureGeometryHandler
being used to process the procedure geometrysetCoordinateSystems(com.luciad.reference.ILcdGeoReference, com.luciad.reference.ILcdGeoReference)
protected void flyByOntoLine(TLcdAircraftState aStateSFCT, ILcdPoint aP1, ILcdPoint aP2, ILcdProcedureGeometryHandler aHandler)
aP1
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 towards aP2
.
Overriding methods must use the handlePoint
, handleLine
and handleAngleArc
methods of TLcdProcedureGeometryCalculator
if they wish to output any geometry. The supplied ILcdProcedureGeometryHandler
shall not be called directly!
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
- the ILcdProcedureGeometryHandler
being used to process the procedure geometryhandlePoint(com.luciad.shape.ILcdPoint, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
,
handleLine(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
,
handleAngleArc(com.luciad.shape.ILcdPoint, double, double, double, double, double, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
protected void flyByOntoArc(TLcdAircraftState aStateSFCT, ILcdPoint aTerminator, ILcdPoint aCenter, double aRadius, boolean aClockwise, ILcdProcedureGeometryHandler aHandler)
aTerminator
will specify the point at which the current course intercepts the arc.
The aircraft will be positioned such that it may travel towards aTerminator
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
and handleAngleArc
methods of TLcdProcedureGeometryCalculator
if they wish to output any geometry. The supplied ILcdProcedureGeometryHandler
shall not be called directly!
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
- the ILcdProcedureGeometryHandler
being used to process the procedure geometryhandlePoint(com.luciad.shape.ILcdPoint, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
,
handleLine(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
,
handleAngleArc(com.luciad.shape.ILcdPoint, double, double, double, double, double, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
protected void flyOverOntoLine(TLcdAircraftState aStateSFCT, ILcdPoint aTargetFix, TLcdProcedureLegTurnDirectionType aTurnDirection, ILcdProcedureGeometryHandler aHandler)
aTargetFix
. 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 to aTargetFix
.
Overriding methods must use the handlePoint
, handleLine
and handleAngleArc
methods of TLcdProcedureGeometryCalculator
if they wish to output any geometry. The supplied ILcdProcedureGeometryHandler
shall not be called directly!
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
- the ILcdProcedureGeometryHandler
being used to process the procedure geometryhandlePoint(com.luciad.shape.ILcdPoint, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
,
handleLine(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
,
handleAngleArc(com.luciad.shape.ILcdPoint, double, double, double, double, double, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
protected void flyOverOntoArc(TLcdAircraftState aStateSFCT, ILcdPoint aTerminator, ILcdPoint aCenter, double aRadius, boolean aClockwise, ILcdProcedureGeometryHandler aHandler)
aTerminator
will specify the intersection point of the current course and the target
arc. This method shall move the plane towards aTerminator
, 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
and handleAngleArc
methods of TLcdProcedureGeometryCalculator
if they wish to output any geometry. The supplied ILcdProcedureGeometryHandler
shall not be called directly!
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
- the ILcdProcedureGeometryHandler
being used to process the procedure geometryhandlePoint(com.luciad.shape.ILcdPoint, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
,
handleLine(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
,
handleAngleArc(com.luciad.shape.ILcdPoint, double, double, double, double, double, com.luciad.ais.model.procedure.type.TLcdProcedureGeometryType, com.luciad.ais.model.procedure.TLcdAircraftState, com.luciad.ais.model.procedure.ILcdProcedureGeometryHandler)
public TLcdProcedureGeometryCalculator.CFBehavior getCFBehavior()
public void setCFBehavior(TLcdProcedureGeometryCalculator.CFBehavior aCFBehavior)
aCFBehavior
- the new behavior to render CF legs