Class StateMapper
- java.lang.Object
-
- org.orekit.propagation.integration.StateMapper
-
public abstract class StateMapper extends Object
This class maps between raw double elements andSpacecraftState
instances.- Since:
- 6.0
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StateMapper(AbsoluteDate referenceDate, double mu, OrbitType orbitType, PositionAngleType positionAngleType, AttitudeProvider attitudeProvider, Frame frame)
Simple constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AttitudeProvider
getAttitudeProvider()
Get the attitude provider.Frame
getFrame()
Get the inertial frame.double
getMu()
Get the central attraction coefficient μ.OrbitType
getOrbitType()
Get propagation parameter type.PositionAngleType
getPositionAngleType()
Get propagation parameter type.AbsoluteDate
getReferenceDate()
Get reference date.SpacecraftState
mapArrayToState(double t, double[] y, double[] yDot, PropagationType type)
Map the raw double components to a spacecraft state.abstract SpacecraftState
mapArrayToState(AbsoluteDate date, double[] y, double[] yDot, PropagationType type)
Map the raw double components to a spacecraft state.double
mapDateToDouble(AbsoluteDate date)
Map a date to a raw double time offset.AbsoluteDate
mapDoubleToDate(double t)
Map the raw double time offset to a date.AbsoluteDate
mapDoubleToDate(double t, AbsoluteDate date)
Map the raw double time offset to a date.abstract void
mapStateToArray(SpacecraftState state, double[] y, double[] yDot)
Map a spacecraft state to raw double components.void
setAttitudeProvider(AttitudeProvider attitudeProvider)
Set the attitude provider.
-
-
-
Constructor Detail
-
StateMapper
protected StateMapper(AbsoluteDate referenceDate, double mu, OrbitType orbitType, PositionAngleType positionAngleType, AttitudeProvider attitudeProvider, Frame frame)
Simple constructor.The position parameter type is meaningful only if
propagation orbit type
support it. As an example, it is not meaningful for propagation inCartesian
parameters.- Parameters:
referenceDate
- reference datemu
- central attraction coefficient (m³/s²)orbitType
- orbit type to use for mapping, null for propagating usingAbsolutePVCoordinates
rather thanOrbit
positionAngleType
- angle type to use for propagationattitudeProvider
- attitude providerframe
- inertial frame
-
-
Method Detail
-
getReferenceDate
public AbsoluteDate getReferenceDate()
Get reference date.- Returns:
- reference date
-
getOrbitType
public OrbitType getOrbitType()
Get propagation parameter type.- Returns:
- orbit type used for propagation
-
getPositionAngleType
public PositionAngleType getPositionAngleType()
Get propagation parameter type.- Returns:
- angle type to use for propagation
-
getMu
public double getMu()
Get the central attraction coefficient μ.- Returns:
- mu central attraction coefficient (m³/s²)
-
getFrame
public Frame getFrame()
Get the inertial frame.- Returns:
- inertial frame
-
getAttitudeProvider
public AttitudeProvider getAttitudeProvider()
Get the attitude provider.- Returns:
- attitude provider
-
setAttitudeProvider
public void setAttitudeProvider(AttitudeProvider attitudeProvider)
Set the attitude provider.- Parameters:
attitudeProvider
- the provider to set
-
mapDoubleToDate
public AbsoluteDate mapDoubleToDate(double t)
Map the raw double time offset to a date.- Parameters:
t
- date offset- Returns:
- date
-
mapDoubleToDate
public AbsoluteDate mapDoubleToDate(double t, AbsoluteDate date)
Map the raw double time offset to a date.- Parameters:
t
- date offsetdate
- The expected date.- Returns:
date
if it is the same time ast
to within the lower precision of the latter. Otherwise a new date is returned that corresponds to timet
.
-
mapDateToDouble
public double mapDateToDouble(AbsoluteDate date)
Map a date to a raw double time offset.- Parameters:
date
- date- Returns:
- time offset
-
mapArrayToState
public SpacecraftState mapArrayToState(double t, double[] y, double[] yDot, PropagationType type)
Map the raw double components to a spacecraft state.- Parameters:
t
- date offsety
- state componentsyDot
- time derivatives of the state components (null if unknown, in which case Keplerian motion is assumed)type
- type of the elements used to build the state (mean or osculating).- Returns:
- spacecraft state
-
mapArrayToState
public abstract SpacecraftState mapArrayToState(AbsoluteDate date, double[] y, double[] yDot, PropagationType type)
Map the raw double components to a spacecraft state.- Parameters:
date
- of the state componentsy
- state componentsyDot
- time derivatives of the state components (null if unknown, in which case Keplerian motion is assumed)type
- type of the elements used to build the state (mean or osculating).- Returns:
- spacecraft state
-
mapStateToArray
public abstract void mapStateToArray(SpacecraftState state, double[] y, double[] yDot)
Map a spacecraft state to raw double components.- Parameters:
state
- state to mapy
- placeholder where to put the componentsyDot
- placeholder where to put the components derivatives
-
-