pck.h#
Defines
-
PCK_RECORD_LEN#
Length of a record in an PCK file.
Functions
-
void pck_free(PckInfo *bpc)#
Free the memory allocated for an PckInfo structure.
- Parameters:
bpc – [in] PckInfo structure.
-
PckInfo *pck_init(const std::string &path)#
Initialise a PCK file.
- Parameters:
path – [in] Path to the PCK file.
- Returns:
PckInfo* Pointer to the PckInfo structure for the PCK file.
-
void pck_calc(PckInfo *bpc, real epoch, int spiceId, real *rotMat, real *rotMatDot)#
Compute angle,angleDot for a given frame at a given time using an PckInfo structure.
- Parameters:
bpc – [in] PckInfo structure.
epoch – [in] Epoch to compute the state at (MJD TDB).
spiceId – [in] SPICE ID of the frame.
rotMat – [out] Rotation matrix
rotMatDot – [out] Derivative of the rotation matrix
-
void iau_to_euler(const real t0_mjd, std::string iauFrame, real *euler)#
Compute angle,angleDot for a given frame at a given time using the IAU pole polynomials.
- Parameters:
t0_mjd – [in] Epoch to compute the rotation matrix at (MJD TDB).
iauFrame – [in] IAU frame name.
euler – [out] Real array of 6 elements containing the 313 Euler angles and their derivatives.
-
void euler313_to_rotMat(const real euler[6], real *rotMat, real *rotMatDot)#
Convert a 313 Euler angle to a rotation matrix and its derivative.
- Parameters:
euler – [in] Real array of 6 elements containing the 313 Euler angles and their derivatives.
rotMat – [out] Real array of 9 elements to store the rotation matrix.
rotMatDot – [out] Real array of 9 elements to store the rotation matrix derivative.
-
void get_pck_rotMat(const std::string &from, const std::string &to, const real &t0_mjd, PckEphemeris &ephem, std::vector<std::vector<real>> &xformMat)#
Get the rotation matrix from one frame to another.
- Parameters:
from – [in] Frame to rotate from.
to – [in] Frame to rotate to.
t0_mjd – [in] t0_mjd Epoch to compute the rotation matrix at (MJD TDB).
ephem – [in] PckEphemeris structure.
xformMat – [out] Rotation matrix from ‘from’ to ‘to’.
-
struct PckTarget#
- #include <pck.h>
Structure to hold the data for a single frame in an PCK file.
- Param code:
SPICE ID of the frame.
- Param ref:
Inertial reference of the frame (usually ECLIPJ2000).
- Param beg:
Starting epoch.
- Param end:
End epoch.
- Param res:
Epoch span.
- Param one:
First record index.
- Param two:
Final record index.
- Param ind:
Span of the records.
-
struct PckInfo#
- #include <pck.h>
Structure to hold the data for a single PCK file.
- Param targets:
Array of PckTarget.
- Param num:
Number of targets.
- Param allocatedNum:
Number of allocated targets.
- Param map:
Memory map of the PCK file.
- Param len:
Length of the memory map.
- Param spiceIdToIdx:
Map of SPICE ID to index in the targets array.
-
struct PckEphemeris#
- #include <pck.h>
Structure to hold all the data for the PCK files in a PropSimulation.
- Param histPckPath:
Path to the historical PCK file.
- Param latestPckPath:
Path to the latest PCK file.
- Param predictPckPath:
Path to the predicted PCK file.
- Param histPck:
PckInfo structure for the historical PCK file.
- Param latestPck:
PckInfo structure for the latest PCK file.
- Param predictPck:
PckInfo structure for the predicted PCK file.