public class WaypointPVBuilder extends Object
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.Modifier and Type | Class and Description |
---|---|
static interface |
WaypointPVBuilder.InterpolationFactory
Factory interface, creating the
PVCoordinatesProvider instances between the provided waypoints. |
Constructor and Description |
---|
WaypointPVBuilder(WaypointPVBuilder.InterpolationFactory factory,
OneAxisEllipsoid body)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
WaypointPVBuilder |
addWaypoint(GeodeticPoint point,
AbsoluteDate date)
Add a waypoint.
|
PVCoordinatesProvider |
build()
Build a
PVCoordinatesProvider from the waypoints added to this builder. |
static WaypointPVBuilder |
cartesianBuilder(OneAxisEllipsoid body)
Construct a waypoint builder interpolating points using a linear cartesian interpolation.
|
WaypointPVBuilder |
constantAfter()
Indicate the resulting
PVCoordinatesProvider provide
a constant location of the last waypoint after to the last time. |
WaypointPVBuilder |
constantBefore()
Indicate the resulting
PVCoordinatesProvider provide
a constant location of the first waypoint prior to the first time. |
protected PVCoordinatesProvider |
createFinal(AbsoluteDate lastDate,
GeodeticPoint lastPoint)
Create the final provider.
|
protected PVCoordinatesProvider |
createInitial(AbsoluteDate firstDate,
GeodeticPoint firstPoint)
Create the initial provider.
|
static WaypointPVBuilder |
greatCircleBuilder(OneAxisEllipsoid body)
Construct a waypoint builder interpolating points using a great-circle.
|
WaypointPVBuilder |
invalidAfter()
Indicate the resulting
PVCoordinatesProvider should be invalid after the last waypoint. |
WaypointPVBuilder |
invalidBefore()
Indicate the resulting
PVCoordinatesProvider should be invalid before the first waypoint. |
static WaypointPVBuilder |
loxodromeBuilder(OneAxisEllipsoid body)
Construct a waypoint builder interpolating points using a loxodrome (or Rhumbline).
|
public WaypointPVBuilder(WaypointPVBuilder.InterpolationFactory factory, OneAxisEllipsoid body)
factory
- The factory used to create the intermediate coordinate providers between waypoints.body
- The central body, on which the way points are defined.public static WaypointPVBuilder cartesianBuilder(OneAxisEllipsoid body)
body
- the reference ellipsoid on which the waypoints are defined.public static WaypointPVBuilder loxodromeBuilder(OneAxisEllipsoid body)
body
- the reference ellipsoid on which the waypoints are defined.public static WaypointPVBuilder greatCircleBuilder(OneAxisEllipsoid body)
body
- the reference ellipsoid on which the waypoints are defined.public WaypointPVBuilder addWaypoint(GeodeticPoint point, AbsoluteDate date)
point
- the waypoint locationdate
- the waypoint timepublic WaypointPVBuilder invalidBefore()
PVCoordinatesProvider
should be invalid before the first waypoint.public WaypointPVBuilder constantBefore()
PVCoordinatesProvider
provide
a constant location of the first waypoint prior to the first time.public WaypointPVBuilder invalidAfter()
PVCoordinatesProvider
should be invalid after the last waypoint.public WaypointPVBuilder constantAfter()
PVCoordinatesProvider
provide
a constant location of the last waypoint after to the last time.public PVCoordinatesProvider build()
PVCoordinatesProvider
from the waypoints added to this builder.protected PVCoordinatesProvider createInitial(AbsoluteDate firstDate, GeodeticPoint firstPoint)
validBefore
flag to
either return an invalid PVCoordinatesProvider or a constant one.firstDate
- the date at which the first waypoint is reached
and this provider will no longer be calledfirstPoint
- the first waypointprotected PVCoordinatesProvider createFinal(AbsoluteDate lastDate, GeodeticPoint lastPoint)
validAfter
flag to
either return an invalid PVCoordinatesProvider or a constant one.lastDate
- the date at which the last waypoint is reached
and this provider will be calledlastPoint
- the last waypointCopyright © 2002-2022 CS GROUP. All rights reserved.