stm.h

stm.h#

Functions

void bcd_and_dot(const std::vector<real> &stm, real *B, real *Bdot, real *C, real *Cdot, real *D, real *Ddot)#

Unpack the STM submatrices.

Parameters:
  • stm[in] The full STM.

  • B[out] The B submatrix (dpos_dpos).

  • Bdot[out] The Bdot submatrix (dpos_dvel).

  • C[out] The C submatrix (dvel_dpos).

  • Cdot[out] The Cdot submatrix (dvel_dvel).

  • D[out] The D submatrix (dpos_dpar).

  • Ddot[out] The Ddot submatrix (dvel_dpar).

void bcd_2dot(STMParameters &stmParams, size_t numParams, size_t stmStarti, std::vector<real> &accInteg)#

Compute the derivatives of the STM submatrices.

Parameters:
  • stmParams[in] Structure containing the STM submatrices and their derivatives.

  • numParams[in] Number of parameters.

  • stmStarti[in] Index of the first element of the STM in the second derivative vector.

  • accInteg[out] Second derivative vector.

void stm_newton(STMParameters &stmParams, const real &gm, const real &dx, const real &dy, const real &dz)#

Compute the derivatives of newtonian gravity with respect to position.

Parameters:
  • stmParams[inout] Structure containing the STM submatrices and their derivatives.

  • gm[in] Gravitational parameter.

  • dx[in] Position difference in the x direction [AU].

  • dy[in] Position difference in the y direction [AU].

  • dz[in] Position difference in the z direction [AU].

void stm_ppn_simple(STMParameters &stmParams, const real &gm, const real &c, const real &beta, const real &gamma, const real &dx, const real &dy, const real &dz, const real &dvx, const real &dvy, const real &dvz)#

Compute the derivatives of the PPN relativistic correction with respect to position and velocity.

Parameters:
  • stmParams[inout] Structure containing the STM submatrices and their derivatives.

  • gm[in] Gravitational parameter.

  • c[in] Speed of light [AU/day].

  • beta[in] PPN parameter.

  • gamma[in] PPN parameter.

  • dx[in] Position difference in the x direction [AU].

  • dy[in] Position difference in the y direction [AU].

  • dz[in] Position difference in the z direction [AU].

  • dvx[in] Velocity difference in the x direction [AU/day].

  • dvy[in] Velocity difference in the y direction [AU/day].

  • dvz[in] Velocity difference in the z direction [AU/day].

void stm_J2(STMParameters &stmParams, const real &gm, const real &J2, const real &dxBody, const real &dyBody, const real &dzBody, const real &radius, const real &sinRA, const real &cosRA, const real &sinDec, const real &cosDec, const real &smoothing_threshold)#

Compute the derivatives of the J2 zonal harmonic with respect to position.

Parameters:
  • stmParams[inout] Structure containing the STM submatrices and their derivatives.

  • gm[in] Gravitational parameter.

  • J2[in] Oblateness coefficient.

  • dxBody[in] Body fixed position difference in the x direction [AU].

  • dyBody[in] Body fixed position difference in the y direction [AU].

  • dzBody[in] Body fixed position difference in the z direction [AU].

  • radius[in] Radius of the body [AU].

  • sinRA[in] Sine of the right ascension of the body pole.

  • cosRA[in] Cosine of the right ascension of the body pole.

  • sinDec[in] Sine of the declination of the body pole.

  • cosDec[in] Cosine of the declination of the body pole.

  • smoothing_threshold[in] Threshold for the J2 smoothing function inside the body.

void stm_nongrav(STMParameters &stmParams, const real &g, const NongravParameters &ngParams, const real &dx, const real &dy, const real &dz, const real &dvx, const real &dvy, const real &dvz, real *rVec, real *nVec)#

Compute the derivatives of the non-gravitational acceleration with respect to position, velocity, and parameters.

Parameters:
  • stmParams[inout] Structure containing the STM submatrices and their derivatives.

  • g[in] Non-gravitational acceleration scaling function.

  • ngParams[in] Structure containing the non-gravitational acceleration parameters.

  • dx[in] Heliocentric position difference in the x direction [AU].

  • dy[in] Heliocentric position difference in the y direction [AU].

  • dz[in] Heliocentric position difference in the z direction [AU].

  • dvx[in] Heliocentric velocity difference in the x direction [AU/day].

  • dvy[in] Heliocentric velocity difference in the y direction [AU/day].

  • dvz[in] Heliocentric velocity difference in the z direction [AU/day].

  • rVec[in] Relative position vector.

  • nVec[in] Relative angular momentum vector.

void stm_continuous_event(STMParameters &stmParams, const PropSimulation *propSim, const size_t &eventIdx, const real &tPastEvent, const real &postFac)#

Compute the derivatives of a continuous event with respect to position, velocity, and parameters.

Parameters:
  • stmParams[inout] Structure containing the STM submatrices and their derivatives.

  • propSim[in] PropSimulation object.

  • eventIdx[in] Index of the continuous event.

  • tPastEvent[in] Time since the continuous event started [days].

  • postFac[in] Exponential decay factor for the continuous event.

struct STMParameters#
#include <stm.h>

Structure to hold the STM submatrices and their derivatives.

Param B:

The B submatrix (dpos_dpos).

Param Bdot:

The Bdot submatrix (dpos_dvel).

Param C:

The C submatrix (dvel_dpos).

Param Cdot:

The Cdot submatrix (dvel_dvel).

Param D:

The D submatrix (dpos_dpar).

Param Ddot:

The Ddot submatrix (dvel_dpar).

Param dfdpos:

The partial derivative of the dynamics with respect to position.

Param dfdvel:

The partial derivative of the dynamics with respect to velocity.

Param dfdpar:

The partial derivative of the dynamics with respect to parameters.

Public Members

real *B = nullptr#
real *Bdot = nullptr#
real *C = nullptr#
real *Cdot = nullptr#
real *D = nullptr#
real *Ddot = nullptr#
real *dfdpos = nullptr#
real *dfdvel = nullptr#
real *dfdpar = nullptr#