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, PositionAngle 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.PositionAngle
getPositionAngleType()
Get propagation parameter type.AbsoluteDate
getReferenceDate()
Get reference date.SpacecraftState
mapArrayToState(double t, double[] y, double[] yDot, boolean meanOnly)
Map the raw double components to a spacecraft state.abstract SpacecraftState
mapArrayToState(AbsoluteDate date, double[] y, double[] yDot, boolean meanOnly)
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
setPositionAngleType()
Set position angle type.
-
-
-
Constructor Detail
-
StateMapper
protected StateMapper(AbsoluteDate referenceDate, double mu, OrbitType orbitType, PositionAngle 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 mappingpositionAngleType
- 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
-
setPositionAngleType
public void setPositionAngleType()
Set position angle type.
-
getPositionAngleType
public PositionAngle 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
-
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, boolean meanOnly)
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)meanOnly
- use only the mean elements to build the state- Returns:
- spacecraft state
-
mapArrayToState
public abstract SpacecraftState mapArrayToState(AbsoluteDate date, double[] y, double[] yDot, boolean meanOnly)
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)meanOnly
- use only the mean elements to build the state- 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
-
-