Class WaypointPVBuilder
PVCoordinatesProvider
instance using waypoints defined on an ellipsoid.
Given a series of waypoints ((date, point) tuples),
build a PVCoordinatesProvider representing the path.
The static methods provide implementations for the most common path definitions
(cartesian, great-circle, loxodrome). If these methods are insufficient,
the public constructor provides a way to customize the path definition.
This class connects the path segments using the AggregatedPVCoordinatesProvider.
As such, no effort is made to smooth the velocity between segments.
While position is unaffected, the velocity may be discontinuous between adjacent time points.
Thus, care should be taken when modeling paths with abrupt direction changes
(e.g. fast-moving aircraft); understand how the PVCoordinatesProvider
will be used in the particular application.
- Since:
- 11.3
- Author:
- Joe Reed
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFactory interface, creating thePVCoordinatesProviderinstances between the provided waypoints. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance. -
Method Summary
Modifier and TypeMethodDescriptionaddWaypoint(GeodeticPoint point, AbsoluteDate date) Add a waypoint.build()Build aPVCoordinatesProviderfrom the waypoints added to this builder.static WaypointPVBuilderConstruct a waypoint builder interpolating points using a linear cartesian interpolation.Indicate the resultingPVCoordinatesProviderprovide a constant location of the last waypoint after to the last time.Indicate the resultingPVCoordinatesProviderprovide a constant location of the first waypoint prior to the first time.protected PVCoordinatesProvidercreateFinal(GeodeticPoint lastPoint) Create the final provider.protected PVCoordinatesProvidercreateInitial(GeodeticPoint firstPoint) Create the initial provider.static WaypointPVBuilderConstruct a waypoint builder interpolating points using a great-circle.Indicate the resultingPVCoordinatesProvidershould be invalid after the last waypoint.Indicate the resultingPVCoordinatesProvidershould be invalid before the first waypoint.static WaypointPVBuilderConstruct a waypoint builder interpolating points using a loxodrome (or Rhumbline).
-
Constructor Details
-
WaypointPVBuilder
Create a new instance.- Parameters:
factory- The factory used to create the intermediate coordinate providers between waypoints.body- The central body, on which the way points are defined.
-
-
Method Details
-
cartesianBuilder
Construct a waypoint builder interpolating points using a linear cartesian interpolation.- Parameters:
body- the reference ellipsoid on which the waypoints are defined.- Returns:
- the waypoint builder
-
loxodromeBuilder
Construct a waypoint builder interpolating points using a loxodrome (or Rhumbline).- Parameters:
body- the reference ellipsoid on which the waypoints are defined.- Returns:
- the waypoint builder
-
greatCircleBuilder
Construct a waypoint builder interpolating points using a great-circle.The altitude of the intermediate points is linearly interpolated from the bounding waypoints. Extrapolating before the first waypoint or after the last waypoint may result in undefined altitudes.
- Parameters:
body- the reference ellipsoid on which the waypoints are defined.- Returns:
- the waypoint builder
-
addWaypoint
Add a waypoint.- Parameters:
point- the waypoint locationdate- the waypoint time- Returns:
- this instance
-
invalidBefore
Indicate the resultingPVCoordinatesProvidershould be invalid before the first waypoint.- Returns:
- this instance
-
constantBefore
Indicate the resultingPVCoordinatesProviderprovide a constant location of the first waypoint prior to the first time.- Returns:
- this instance
-
invalidAfter
Indicate the resultingPVCoordinatesProvidershould be invalid after the last waypoint.- Returns:
- this instance
-
constantAfter
Indicate the resultingPVCoordinatesProviderprovide a constant location of the last waypoint after to the last time.- Returns:
- this instance
-
build
Build aPVCoordinatesProviderfrom the waypoints added to this builder.- Returns:
- the coordinates provider instance.
-
createInitial
Create the initial provider.This method uses the internal
validBeforeflag to either return an invalid PVCoordinatesProvider or a constant one.- Parameters:
firstPoint- the first waypoint- Returns:
- the coordinate provider
-
createFinal
Create the final provider.This method uses the internal
validAfterflag to either return an invalid PVCoordinatesProvider or a constant one.- Parameters:
lastPoint- the last waypoint- Returns:
- the coordinate provider
-