|
🛰️航天仿真算法库 SpaceAST 0.0.1
|
提供与SPICE工具兼容的函数接口
类 | |
| class | ast::BuiltinAxesRegistry |
| class | ast::SpiceBodyRegistry |
| class | ast::SpiceFrameRegistry |
函数 | |
| Axes * | ast::aSpiceFindAxes (StringView name) |
| CelestialBody * | ast::aSpiceFindBody (StringView name) |
| CelestialBody * | ast::aSpiceFindBody (int id) |
| void | ast::axisar (const Vector3d &axis, double angle, Matrix3d &r) |
| void | ast::azlrec (double range, double az, double el, bool azccw, bool elplsz, Vector3d &rectan) |
| double | ast::b1900 () |
| double | ast::b1950 () |
| double | ast::clight () |
| double | ast::dpr () |
| void | ast::eul2m (double angle3, double angle2, double angle1, int axis3, int axis2, int axis1, Matrix3d &r) |
| void | ast::ident (Matrix3d &matrix) |
| double | ast::j1900 () |
| double | ast::j1950 () |
| double | ast::j2000 () |
| double | ast::j2100 () |
| double | ast::jyear () |
| void | ast::latrec (double radius, double lon, double lat, Vector3d &rectan) |
| void | ast::m2eul (const Matrix3d &r, int axis3, int axis2, int axis1, double &angle3, double &angle2, double &angle1) |
| void | ast::m2q (const Matrix3d &r, Quaternion &q) |
| void | ast::mxm (const Matrix3d &m1, const Matrix3d &m2, Matrix3d &mout) |
| void | ast::mxvg (const void *m1, const void *v2, int nr1, int nc1r2, void *vout) |
| errc_t | ast::pxform (StringView from, StringView to, const TimePoint &et, Matrix3d &rotate) |
| void | ast::q2m (const Quaternion &q, Matrix3d &r) |
| void | ast::radrec (double range, double ra, double dec, Vector3d &rectan) |
| void | ast::rav2xf (const Matrix3d &rot, const Vector3d &av, Matrix6d &xform) |
| errc_t | ast::spkapo (CelestialBody *targ, const TimePoint &et, Axes *ref, const CartState &sobs, StringView abcorr, Vector3d &ptarg, double *lt=nullptr) |
| AST_SPICE_API void | ast::spkgeo (CelestialBody *targ, const TimePoint &et, Axes *ref, CelestialBody *obs, CartState &state, double *lt=nullptr) |
| AST_SPICE_API void | ast::spkgps (CelestialBody *targ, const TimePoint &et, Axes *ref, CelestialBody *obs, Vector3d &pos, double *lt=nullptr) |
| errc_t | ast::spkpos (CelestialBody *targ, const TimePoint &et, Axes *ref, StringView abcorr, CelestialBody *obs, Vector3d &ptarg, double *lt=nullptr) |
| errc_t | ast::spkpos (StringView targ, const TimePoint &et, StringView ref, StringView abcorr, StringView obs, Vector3d &ptarg, double *lt) |
| errc_t | ast::spkssb (CelestialBody *targ, const TimePoint &et, Axes *ref, CartState &starg) |
| errc_t | ast::stelab (const Vector3d &pobj, const Vector3d &vobs, Vector3d &appobj) |
| errc_t | ast::stlabx (const Vector3d &pobj, const Vector3d &vobs, Vector3d &appobj) |
| errc_t | ast::tipbod (Axes *ref, CelestialBody *body, const TimePoint &et, Matrix3d &tipm) |
| errc_t | ast::utc2et (StringView utcstr, double &et) |
| void | ast::vrotv (const Vector3d &v, const Vector3d &axis, double theta, Vector3d &r) |
| AST_SPICE_CAPI Axes * ast::aSpiceFindAxes | ( | StringView | name | ) |
| AST_SPICE_API CelestialBody * ast::aSpiceFindBody | ( | int | id | ) |
| AST_SPICE_API CelestialBody * ast::aSpiceFindBody | ( | StringView | name | ) |
| AST_SPICE_CAPI void ast::axisar | ( | const Vector3d & | axis, |
| double | angle, | ||
| Matrix3d & | r ) |
根据旋转轴和角度计算旋转矩阵(Axis and angle to rotation) 输出的矩阵表示将向量绕轴旋转给定角度
| [in] | axis | 旋转轴 |
| [in] | angle | 旋转角度(弧度) |
| [out] | r | 输出旋转矩阵 |
| AST_SPICE_CAPI void ast::azlrec | ( | double | range, |
| double | az, | ||
| double | el, | ||
| bool | azccw, | ||
| bool | elplsz, | ||
| Vector3d & | rectan ) |
将极坐标转换为直角坐标(AZ/EL to rectangular coordinates)
| [in] | range | 范围(距离) |
| [in] | az | 方位角(弧度) |
| [in] | el | 俯仰角(弧度) |
| [in] | azccw | 如果为真,则方位角按逆时针方向计算,否则按顺时针方向计算 |
| [in] | elplsz | 如果为真,则俯仰角按正值上增加,否则按负值上增加 |
| [out] | rectan | 输出直角坐标(x, y, z) |
| AST_SPICE_CAPI double ast::clight | ( | ) |
获取真空中的光速
| AST_SPICE_CAPI void ast::eul2m | ( | double | angle3, |
| double | angle2, | ||
| double | angle1, | ||
| int | axis3, | ||
| int | axis2, | ||
| int | axis1, | ||
| Matrix3d & | r ) |
欧拉角转换为旋转矩阵(Euler angles to matrix)
| angle3 | 旋转角度3(弧度) |
| angle2 | 旋转角度2(弧度) |
| angle1 | 旋转角度1(弧度) |
| axis3 | 旋转轴3(1, 2, 3 分别对应 X, Y, Z 轴) |
| axis2 | 旋转轴2(1, 2, 3 分别对应 X, Y, Z 轴) |
| axis1 | 旋转轴1(1, 2, 3 分别对应 X, Y, Z 轴) |
| r | 输出旋转矩阵 |
| AST_SPICE_CAPI void ast::ident | ( | Matrix3d & | matrix | ) |
获取单位矩阵(Identity Matrix)
| matrix | 输出单位矩阵 |
| AST_SPICE_CAPI void ast::latrec | ( | double | radius, |
| double | lon, | ||
| double | lat, | ||
| Vector3d & | rectan ) |
将纬度经度转换为直角坐标(Latitudinal to rectangular coordinates)
| [in] | radius | 半径 |
| [in] | lon | 经度(弧度) |
| [in] | lat | 纬度(弧度) |
| [out] | rectan | 输出直角坐标(x, y, z) |
| AST_SPICE_CAPI void ast::m2eul | ( | const Matrix3d & | r, |
| int | axis3, | ||
| int | axis2, | ||
| int | axis1, | ||
| double & | angle3, | ||
| double & | angle2, | ||
| double & | angle1 ) |
| AST_SPICE_CAPI void ast::m2q | ( | const Matrix3d & | r, |
| Quaternion & | q ) |
将旋转矩阵转换为四元数(Matrix to quaternion)
| r | 旋转矩阵 |
| q | 输出四元数 |
矩阵乘法(Matrix times matrix, 3x3)
| m1 | 矩阵1 |
| m2 | 矩阵2 |
| mout | 输出矩阵 |
| AST_SPICE_CAPI void ast::mxvg | ( | const void * | m1, |
| const void * | v2, | ||
| int | nr1, | ||
| int | nc1r2, | ||
| void * | vout ) |
矩阵向量乘法(Matrix times vector, general dimension)
| m1 | 矩阵1 |
| v2 | 向量2 |
| nr1 | 矩阵1的行数 |
| nc1r2 | 矩阵1的列数(等于向量2的长度) |
| vout | 输出向量 |
| AST_SPICE_API errc_t ast::pxform | ( | StringView | from, |
| StringView | to, | ||
| const TimePoint & | et, | ||
| Matrix3d & | rotate ) |
计算从一个参考系统到另一个参考系统的旋转矩阵(Position Transformation Matrix)
| from | 源参考系统 |
| to | 目标参考系统 |
| et | 时间点 |
| rotate | 输出旋转矩阵 |
| AST_SPICE_CAPI void ast::q2m | ( | const Quaternion & | q, |
| Matrix3d & | r ) |
将四元数转换为旋转矩阵(Quaternion to matrix)
| q | 四元数 |
| r | 输出旋转矩阵 |
| AST_SPICE_CAPI void ast::radrec | ( | double | range, |
| double | ra, | ||
| double | dec, | ||
| Vector3d & | rectan ) |
从距离、赤经和赤纬计算该点的直角坐标( Range, RA and DEC to rectangular coordinates ) 赤经从 +X 轴向 +Y 轴方向测量,赤纬是点相对于 XY 平面的角度。
| range | 距离 |
| ra | 赤经(弧度) |
| dec | 赤纬(弧度) |
| rectan | 输出直角坐标(x, y, z) |
| AST_SPICE_API errc_t ast::spkapo | ( | CelestialBody * | targ, |
| const TimePoint & | et, | ||
| Axes * | ref, | ||
| const CartState & | sobs, | ||
| StringView | abcorr, | ||
| Vector3d & | ptarg, | ||
| double * | lt = nullptr ) |
计算目标天体相对于观测者的位置,可进行光行时(行星光行差)和恒星像差修正(S/P Kernel, apparent position only)
| targ | 目标天体 |
| et | 时间点 |
| ref | 参考轴系 |
| sobs | 观测者状态 |
| abcorr | 像差校正选项 |
| ptarg | 输出位置(直角坐标) |
| lt | 光行时 |
| AST_SPICE_API errc_t ast::spkpos | ( | CelestialBody * | targ, |
| const TimePoint & | et, | ||
| Axes * | ref, | ||
| StringView | abcorr, | ||
| CelestialBody * | obs, | ||
| Vector3d & | ptarg, | ||
| double * | lt = nullptr ) |
计算目标天体相对于观测天体的位置,可进行光行时(行星光行差)和恒星像差修正(S/P Kernel, position)
| [in] | targ | 目标天体 |
| [in] | et | 时间点 |
| [in] | ref | 参考轴系 |
| [in] | abcorr | 像差校正选项 |
| [in] | obs | 观察者 |
| [out] | ptarg | 输出位置(直角坐标) |
| [out] | lt | 光行时 |
| AST_SPICE_API errc_t ast::spkssb | ( | CelestialBody * | targ, |
| const TimePoint & | et, | ||
| Axes * | ref, | ||
| CartState & | starg ) |
计算天体相对于太阳系质心的位置速度( S/P Kernel, solar system barycenter)
| targ | 目标天体 |
| et | 时间点 |
| ref | 参考轴系 |
| starg | 输出位置速度(直角坐标) |
| AST_SPICE_API errc_t ast::utc2et | ( | StringView | utcstr, |
| double & | et ) |
| utcstr | |
| et |