Class FieldOrbit<T extends CalculusFieldElement<T>>

java.lang.Object
org.orekit.orbits.FieldOrbit<T>
Type Parameters:
T - type of the field elements
All Implemented Interfaces:
FieldTimeShiftable<ShiftableFieldPVCoordinatesHolder<FieldOrbit<T>,T>,T>, FieldTimeStamped<T>, TimeShiftable<ShiftableFieldPVCoordinatesHolder<FieldOrbit<T>,T>>, FieldPVCoordinatesProvider<T>, ShiftableFieldPVCoordinatesHolder<FieldOrbit<T>,T>
Direct Known Subclasses:
FieldCartesianOrbit, FieldCircularOrbit, FieldEquinoctialOrbit, FieldKeplerianOrbit

public abstract class FieldOrbit<T extends CalculusFieldElement<T>> extends Object implements ShiftableFieldPVCoordinatesHolder<FieldOrbit<T>,T>
This class handles orbital parameters.

For user convenience, both the Cartesian and the equinoctial elements are provided by this class, regardless of the canonical representation implemented in the derived class (which may be classical Keplerian elements for example).

The parameters are defined in a frame specified by the user. It is important to make sure this frame is consistent: it probably is inertial and centered on the central body. This information is used for example by some force models.

Instance of this class are guaranteed to be immutable.

Since:
9.0
Author:
Luc Maisonobe, Guylaine Prat, Fabien Maussion, Véronique Pommier-Maurussane
See Also:
  • Field Details

    • TOLERANCE_POSITION_ANGLE_RATE

      protected static final double TOLERANCE_POSITION_ANGLE_RATE
      Absolute tolerance when checking if the rate of the position angle is Keplerian or not.
      See Also:
  • Constructor Details

  • Method Details

    • nonKeplerianAcceleration

      protected FieldVector3D<T> nonKeplerianAcceleration()
      Compute non-Keplerian part of the acceleration from first time derivatives.
      Returns:
      non-Keplerian part of the acceleration
      Since:
      13.1
    • hasNonKeplerianAcceleration

      protected static <T extends CalculusFieldElement<T>> boolean hasNonKeplerianAcceleration(FieldPVCoordinates<T> pva, T mu)
      Check if Cartesian coordinates include non-Keplerian acceleration.
      Type Parameters:
      T - type of the field elements
      Parameters:
      pva - Cartesian coordinates
      mu - central attraction coefficient
      Returns:
      true if Cartesian coordinates include non-Keplerian acceleration
    • shiftNonKeplerian

      protected FieldPVCoordinates<T> shiftNonKeplerian(FieldPVCoordinates<T> keplerianShifted, T dt)
      Compute corrected shift from non-Keplerian part.
      Parameters:
      keplerianShifted - Keplerian shift
      dt - time shift
      Returns:
      corrected position-velocity-acceleration vector
      Since:
      14.0
    • isElliptical

      public boolean isElliptical()
      Returns true if and only if the orbit is elliptical i.e. has a non-negative semi-major axis.
      Returns:
      true if getA() is strictly greater than 0
      Since:
      12.0
    • getType

      public abstract OrbitType getType()
      Get the orbit type.
      Returns:
      orbit type
    • getFrame

      public Frame getFrame()
      Get the frame in which the orbital parameters are defined.
      Specified by:
      getFrame in interface ShiftableFieldPVCoordinatesHolder<FieldOrbit<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
      Returns:
      frame in which the orbital parameters are defined
    • toOrbit

      public abstract Orbit toOrbit()
      Transforms the FieldOrbit instance into an Orbit instance.
      Returns:
      Orbit instance with same properties
    • getA

      public abstract T getA()
      Get the semi-major axis.

      Note that the semi-major axis is considered negative for hyperbolic orbits.

      Returns:
      semi-major axis (m)
    • getADot

      public abstract T getADot()
      Get the semi-major axis derivative.

      Note that the semi-major axis is considered negative for hyperbolic orbits.

      If the orbit was created without derivatives, the value returned is null.

      Returns:
      semi-major axis derivative (m/s)
    • getEquinoctialEx

      public abstract T getEquinoctialEx()
      Get the first component of the equinoctial eccentricity vector.
      Returns:
      first component of the equinoctial eccentricity vector
    • getEquinoctialExDot

      public abstract T getEquinoctialExDot()
      Get the first component of the equinoctial eccentricity vector derivative.

      If the orbit was created without derivatives, the value returned is null.

      Returns:
      first component of the equinoctial eccentricity vector derivative
    • getEquinoctialEy

      public abstract T getEquinoctialEy()
      Get the second component of the equinoctial eccentricity vector.
      Returns:
      second component of the equinoctial eccentricity vector
    • getEquinoctialEyDot

      public abstract T getEquinoctialEyDot()
      Get the second component of the equinoctial eccentricity vector derivative.

      If the orbit was created without derivatives, the value returned is null.

      Returns:
      second component of the equinoctial eccentricity vector derivative
    • getHx

      public abstract T getHx()
      Get the first component of the inclination vector.
      Returns:
      first component of the inclination vector
    • getHxDot

      public abstract T getHxDot()
      Get the first component of the inclination vector derivative.

      If the orbit was created without derivatives, the value returned is null.

      Returns:
      first component of the inclination vector derivative
    • getHy

      public abstract T getHy()
      Get the second component of the inclination vector.
      Returns:
      second component of the inclination vector
    • getHyDot

      public abstract T getHyDot()
      Get the second component of the inclination vector derivative.
      Returns:
      second component of the inclination vector derivative
    • getLE

      public abstract T getLE()
      Get the eccentric longitude argument.
      Returns:
      E + ω + Ω eccentric longitude argument (rad)
    • getLEDot

      public abstract T getLEDot()
      Get the eccentric longitude argument derivative.

      If the orbit was created without derivatives, the value returned is null.

      Returns:
      d(E + ω + Ω)/dt eccentric longitude argument derivative (rad/s)
    • getLv

      public abstract T getLv()
      Get the true longitude argument.
      Returns:
      v + ω + Ω true longitude argument (rad)
    • getLvDot

      public abstract T getLvDot()
      Get the true longitude argument derivative.

      If the orbit was created without derivatives, the value returned is null.

      Returns:
      d(v + ω + Ω)/dt true longitude argument derivative (rad/s)
    • getLM

      public abstract T getLM()
      Get the mean longitude argument.
      Returns:
      M + ω + Ω mean longitude argument (rad)
    • getLMDot

      public abstract T getLMDot()
      Get the mean longitude argument derivative.

      If the orbit was created without derivatives, the value returned is null.

      Returns:
      d(M + ω + Ω)/dt mean longitude argument derivative (rad/s)
    • getE

      public abstract T getE()
      Get the eccentricity.
      Returns:
      eccentricity
    • getEDot

      public abstract T getEDot()
      Get the eccentricity derivative.

      If the orbit was created without derivatives, the value returned is null.

      Returns:
      eccentricity derivative
    • getI

      public abstract T getI()
      Get the inclination.

      If the orbit was created without derivatives, the value returned is null.

      Returns:
      inclination (rad)
    • getIDot

      public abstract T getIDot()
      Get the inclination derivative.
      Returns:
      inclination derivative (rad/s)
    • hasNonKeplerianAcceleration

      public boolean hasNonKeplerianAcceleration()
      Check if orbit includes non-Keplerian rates.
      Returns:
      true if orbit includes non-Keplerian derivatives
      Since:
      13.0
      See Also:
    • getMu

      public T getMu()
      Get the central attraction coefficient used for position and velocity conversions (m³/s²).
      Returns:
      central attraction coefficient used for position and velocity conversions (m³/s²)
    • getKeplerianPeriod

      public T getKeplerianPeriod()
      Get the Keplerian period.

      The Keplerian period is computed directly from semi major axis and central acceleration constant.

      Returns:
      Keplerian period in seconds, or positive infinity for hyperbolic orbits
    • getKeplerianMeanMotion

      public T getKeplerianMeanMotion()
      Get the Keplerian mean motion.

      The Keplerian mean motion is computed directly from semi major axis and central acceleration constant.

      Returns:
      Keplerian mean motion in radians per second
    • getMeanAnomalyDotWrtA

      public T getMeanAnomalyDotWrtA()
      Get the derivative of the mean anomaly with respect to the semi major axis.
      Returns:
      derivative of the mean anomaly with respect to the semi major axis
    • getDate

      public FieldAbsoluteDate<T> getDate()
      Get the date of orbital parameters.
      Specified by:
      getDate in interface FieldTimeStamped<T extends CalculusFieldElement<T>>
      Returns:
      date of the orbital parameters
    • getPVCoordinates

      public TimeStampedFieldPVCoordinates<T> getPVCoordinates(Frame outputFrame)
      Get the TimeStampedPVCoordinates in a specified frame.
      Specified by:
      getPVCoordinates in interface ShiftableFieldPVCoordinatesHolder<FieldOrbit<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
      Parameters:
      outputFrame - frame in which the position/velocity coordinates shall be computed
      Returns:
      FieldPVCoordinates in the specified output frame
      See Also:
    • getPVCoordinates

      public TimeStampedFieldPVCoordinates<T> getPVCoordinates(FieldAbsoluteDate<T> otherDate, Frame otherFrame)
      Get the FieldPVCoordinates of the body in the selected frame.
      Specified by:
      getPVCoordinates in interface FieldPVCoordinatesProvider<T extends CalculusFieldElement<T>>
      Specified by:
      getPVCoordinates in interface ShiftableFieldPVCoordinatesHolder<FieldOrbit<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
      Parameters:
      otherDate - current date
      otherFrame - the frame where to define the position
      Returns:
      time-stamped position/velocity of the body (m and m/s)
    • getVelocity

      public FieldVector3D<T> getVelocity(FieldAbsoluteDate<T> otherDate, Frame otherFrame)
      Get the velocity of the body in the selected frame.
      Specified by:
      getVelocity in interface FieldPVCoordinatesProvider<T extends CalculusFieldElement<T>>
      Specified by:
      getVelocity in interface ShiftableFieldPVCoordinatesHolder<FieldOrbit<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
      Parameters:
      otherDate - current date
      otherFrame - the frame where to define the velocity
      Returns:
      velocity of the body (m/s)
    • getPosition

      public FieldVector3D<T> getPosition(FieldAbsoluteDate<T> otherDate, Frame otherFrame)
      Get the position of the body in the selected frame.
      Specified by:
      getPosition in interface FieldPVCoordinatesProvider<T extends CalculusFieldElement<T>>
      Specified by:
      getPosition in interface ShiftableFieldPVCoordinatesHolder<FieldOrbit<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
      Parameters:
      otherDate - current date
      otherFrame - the frame where to define the position
      Returns:
      position of the body (m and)
    • getPosition

      public FieldVector3D<T> getPosition(Frame outputFrame)
      Get the position in a specified frame.
      Specified by:
      getPosition in interface ShiftableFieldPVCoordinatesHolder<FieldOrbit<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
      Parameters:
      outputFrame - frame in which the position coordinates shall be computed
      Returns:
      position in the specified output frame
      Since:
      12.0
      See Also:
    • getPosition

      public FieldVector3D<T> getPosition()
      Get the position in definition frame.
      Specified by:
      getPosition in interface ShiftableFieldPVCoordinatesHolder<FieldOrbit<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
      Returns:
      position in the definition frame
      Since:
      12.0
      See Also:
    • getPVCoordinates

      public TimeStampedFieldPVCoordinates<T> getPVCoordinates()
      Get the TimeStampedPVCoordinates in definition frame.
      Specified by:
      getPVCoordinates in interface ShiftableFieldPVCoordinatesHolder<FieldOrbit<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
      Returns:
      FieldPVCoordinates in the definition frame
      See Also:
    • getOne

      protected T getOne()
      Getter for Field-valued one.
      Returns:
      one
    • getZero

      protected T getZero()
      Getter for Field-valued zero.
      Returns:
      zero
    • getField

      protected Field<T> getField()
      Getter for Field.
      Returns:
      CalculusField
    • initPosition

      protected abstract FieldVector3D<T> initPosition()
      Compute the position coordinates from the canonical parameters.
      Returns:
      computed position coordinates
      Since:
      12.0
    • initPVCoordinates

      protected abstract TimeStampedFieldPVCoordinates<T> initPVCoordinates()
      Compute the position/velocity coordinates from the canonical parameters.
      Returns:
      computed position/velocity coordinates
    • inFrame

      public abstract FieldOrbit<T> inFrame(Frame inertialFrame)
      Create a new object representing the same physical orbital state, but attached to a different reference frame. If the new frame is not inertial, an exception will be thrown.
      Parameters:
      inertialFrame - reference frame of output orbit
      Returns:
      orbit with different frame
      Since:
      13.0
    • shiftedBy

      public abstract FieldOrbit<T> shiftedBy(T dt)
      Get a time-shifted orbit.

      The orbit can be slightly shifted to close dates. This shift is based on a simple Keplerian model. It is not intended as a replacement for proper orbit and attitude propagation but should be sufficient for small time shifts or coarse accuracy.

      Specified by:
      shiftedBy in interface FieldTimeShiftable<ShiftableFieldPVCoordinatesHolder<FieldOrbit<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
      Parameters:
      dt - time shift in seconds
      Returns:
      a new orbit, shifted with respect to the instance (which is immutable)
    • shiftedBy

      public abstract FieldOrbit<T> shiftedBy(double dt)
      Get a time-shifted orbit.

      The orbit can be slightly shifted to close dates. This shift is based on a simple Keplerian model. It is not intended as a replacement for proper orbit and attitude propagation but should be sufficient for small time shifts or coarse accuracy.

      Specified by:
      shiftedBy in interface TimeShiftable<T extends CalculusFieldElement<T>>
      Parameters:
      dt - time shift in seconds
      Returns:
      a new orbit, shifted with respect to the instance (which is immutable)
    • shiftedBy

      public abstract FieldOrbit<T> shiftedBy(TimeOffset dt)
      Get a time-shifted orbit.

      The orbit can be slightly shifted to close dates. This shift is based on a simple Keplerian model. It is not intended as a replacement for proper orbit and attitude propagation but should be sufficient for small time shifts or coarse accuracy.

      Specified by:
      shiftedBy in interface TimeShiftable<T extends CalculusFieldElement<T>>
      Parameters:
      dt - time shift in seconds
      Returns:
      a new orbit, shifted with respect to the instance (which is immutable)
    • getJacobianWrtCartesian

      public void getJacobianWrtCartesian(PositionAngleType type, T[][] jacobian)
      Compute the Jacobian of the orbital parameters with respect to the Cartesian parameters.

      Element jacobian[i][j] is the derivative of parameter i of the orbit with respect to Cartesian coordinate j. This means each row corresponds to one orbital parameter whereas columns 0 to 5 correspond to the Cartesian coordinates x, y, z, xDot, yDot and zDot.

      Parameters:
      type - type of the position angle to use
      jacobian - placeholder 6x6 (or larger) matrix to be filled with the Jacobian, if matrix is larger than 6x6, only the 6x6 upper left corner will be modified
    • getJacobianWrtParameters

      public void getJacobianWrtParameters(PositionAngleType type, T[][] jacobian)
      Compute the Jacobian of the Cartesian parameters with respect to the orbital parameters.

      Element jacobian[i][j] is the derivative of Cartesian coordinate i of the orbit with respect to orbital parameter j. This means each row corresponds to one Cartesian coordinate x, y, z, xdot, ydot, zdot whereas columns 0 to 5 correspond to the orbital parameters.

      Parameters:
      type - type of the position angle to use
      jacobian - placeholder 6x6 (or larger) matrix to be filled with the Jacobian, if matrix is larger than 6x6, only the 6x6 upper left corner will be modified
    • getDecompositionSolver

      protected FieldDecompositionSolver<T> getDecompositionSolver(FieldMatrix<T> matrix)
      Method to build a matrix decomposition solver.
      Parameters:
      matrix - matrix
      Returns:
      solver
      Since:
      13.1
    • computeJacobianMeanWrtCartesian

      protected abstract T[][] computeJacobianMeanWrtCartesian()
      Compute the Jacobian of the orbital parameters with mean angle with respect to the Cartesian parameters.

      Element jacobian[i][j] is the derivative of parameter i of the orbit with respect to Cartesian coordinate j. This means each row correspond to one orbital parameter whereas columns 0 to 5 correspond to the Cartesian coordinates x, y, z, xDot, yDot and zDot.

      Returns:
      6x6 Jacobian matrix
      See Also:
    • computeJacobianEccentricWrtCartesian

      protected abstract T[][] computeJacobianEccentricWrtCartesian()
      Compute the Jacobian of the orbital parameters with eccentric angle with respect to the Cartesian parameters.

      Element jacobian[i][j] is the derivative of parameter i of the orbit with respect to Cartesian coordinate j. This means each row correspond to one orbital parameter whereas columns 0 to 5 correspond to the Cartesian coordinates x, y, z, xDot, yDot and zDot.

      Returns:
      6x6 Jacobian matrix
      See Also:
    • computeJacobianTrueWrtCartesian

      protected abstract T[][] computeJacobianTrueWrtCartesian()
      Compute the Jacobian of the orbital parameters with true angle with respect to the Cartesian parameters.

      Element jacobian[i][j] is the derivative of parameter i of the orbit with respect to Cartesian coordinate j. This means each row correspond to one orbital parameter whereas columns 0 to 5 correspond to the Cartesian coordinates x, y, z, xDot, yDot and zDot.

      Returns:
      6x6 Jacobian matrix
      See Also:
    • addKeplerContribution

      public abstract void addKeplerContribution(PositionAngleType type, T gm, T[] pDot)
      Add the contribution of the Keplerian motion to parameters derivatives

      This method is used by integration-based propagators to evaluate the part of Keplerian motion to evolution of the orbital state.

      Parameters:
      type - type of the position angle in the state
      gm - attraction coefficient to use
      pDot - array containing orbital state derivatives to update (the Keplerian part must be added to the array components, as the array may already contain some non-zero elements corresponding to non-Keplerian parts)
    • fillHalfRow

      protected void fillHalfRow(T a, FieldVector3D<T> v, T[] row, int j)
      Fill a Jacobian half row with a single vector.
      Parameters:
      a - coefficient of the vector
      v - vector
      row - Jacobian matrix row
      j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)
    • fillHalfRow

      protected void fillHalfRow(T a1, FieldVector3D<T> v1, T a2, FieldVector3D<T> v2, T[] row, int j)
      Fill a Jacobian half row with a linear combination of vectors.
      Parameters:
      a1 - coefficient of the first vector
      v1 - first vector
      a2 - coefficient of the second vector
      v2 - second vector
      row - Jacobian matrix row
      j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)
    • fillHalfRow

      protected void fillHalfRow(T a1, FieldVector3D<T> v1, T a2, FieldVector3D<T> v2, T a3, FieldVector3D<T> v3, T[] row, int j)
      Fill a Jacobian half row with a linear combination of vectors.
      Parameters:
      a1 - coefficient of the first vector
      v1 - first vector
      a2 - coefficient of the second vector
      v2 - second vector
      a3 - coefficient of the third vector
      v3 - third vector
      row - Jacobian matrix row
      j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)
    • fillHalfRow

      protected void fillHalfRow(T a1, FieldVector3D<T> v1, T a2, FieldVector3D<T> v2, T a3, FieldVector3D<T> v3, T a4, FieldVector3D<T> v4, T[] row, int j)
      Fill a Jacobian half row with a linear combination of vectors.
      Parameters:
      a1 - coefficient of the first vector
      v1 - first vector
      a2 - coefficient of the second vector
      v2 - second vector
      a3 - coefficient of the third vector
      v3 - third vector
      a4 - coefficient of the fourth vector
      v4 - fourth vector
      row - Jacobian matrix row
      j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)
    • fillHalfRow

      protected void fillHalfRow(T a1, FieldVector3D<T> v1, T a2, FieldVector3D<T> v2, T a3, FieldVector3D<T> v3, T a4, FieldVector3D<T> v4, T a5, FieldVector3D<T> v5, T[] row, int j)
      Fill a Jacobian half row with a linear combination of vectors.
      Parameters:
      a1 - coefficient of the first vector
      v1 - first vector
      a2 - coefficient of the second vector
      v2 - second vector
      a3 - coefficient of the third vector
      v3 - third vector
      a4 - coefficient of the fourth vector
      v4 - fourth vector
      a5 - coefficient of the fifth vector
      v5 - fifth vector
      row - Jacobian matrix row
      j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)
    • fillHalfRow

      protected void fillHalfRow(T a1, FieldVector3D<T> v1, T a2, FieldVector3D<T> v2, T a3, FieldVector3D<T> v3, T a4, FieldVector3D<T> v4, T a5, FieldVector3D<T> v5, T a6, FieldVector3D<T> v6, T[] row, int j)
      Fill a Jacobian half row with a linear combination of vectors.
      Parameters:
      a1 - coefficient of the first vector
      v1 - first vector
      a2 - coefficient of the second vector
      v2 - second vector
      a3 - coefficient of the third vector
      v3 - third vector
      a4 - coefficient of the fourth vector
      v4 - fourth vector
      a5 - coefficient of the fifth vector
      v5 - fifth vector
      a6 - coefficient of the sixth vector
      v6 - sixth vector
      row - Jacobian matrix row
      j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)