🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
Spice

详细描述

提供与SPICE工具兼容的函数接口

class  ast::BuiltinAxesRegistry
 
class  ast::SpiceBodyRegistry
 
class  ast::SpiceFrameRegistry
 

函数

Axesast::aSpiceFindAxes (StringView name)
 
CelestialBodyast::aSpiceFindBody (StringView name)
 
CelestialBodyast::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)
 

函数说明

◆ aSpiceFindAxes()

AST_SPICE_CAPI Axes * ast::aSpiceFindAxes ( StringView name)

查找指定名称的参考系统轴

参数
name参考系统名称
返回
指向 Axes 实例的指针,如果未找到则为 nullptr

◆ aSpiceFindBody() [1/2]

AST_SPICE_API CelestialBody * ast::aSpiceFindBody ( int id)

查找指定 ID 的天体

参数
id天体 ID
返回
指向 CelestialBody 实例的指针,如果未找到则为 nullptr

◆ aSpiceFindBody() [2/2]

AST_SPICE_API CelestialBody * ast::aSpiceFindBody ( StringView name)

查找指定名称的天体

参数
name天体名称
返回
指向 CelestialBody 实例的指针,如果未找到则为 nullptr

◆ axisar()

AST_SPICE_CAPI void ast::axisar ( const Vector3d & axis,
double angle,
Matrix3d & r )

根据旋转轴和角度计算旋转矩阵(Axis and angle to rotation) 输出的矩阵表示将向量绕轴旋转给定角度

参数
[in]axis旋转轴
[in]angle旋转角度(弧度)
[out]r输出旋转矩阵

◆ azlrec()

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)

◆ clight()

AST_SPICE_CAPI double ast::clight ( )

获取真空中的光速

返回
光速

◆ eul2m()

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输出旋转矩阵

◆ ident()

AST_SPICE_CAPI void ast::ident ( Matrix3d & matrix)

获取单位矩阵(Identity Matrix)

参数
matrix输出单位矩阵

◆ latrec()

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)

◆ m2eul()

AST_SPICE_CAPI void ast::m2eul ( const Matrix3d & r,
int axis3,
int axis2,
int axis1,
double & angle3,
double & angle2,
double & angle1 )

将旋转矩阵转换为欧拉角 (Matrix to Euler angles)

参数
r旋转矩阵
axis3第3轴(1, 2, 3 分别对应 X, Y, Z 轴)
axis2第2轴(1, 2, 3 分别对应 X, Y, Z 轴)
axis1第1轴(1, 2, 3 分别对应 X, Y, Z 轴)
angle3输出第3轴的角度(弧度)
angle2输出第2轴的角度(弧度)
angle1输出第1轴的角度(弧度)

◆ m2q()

AST_SPICE_CAPI void ast::m2q ( const Matrix3d & r,
Quaternion & q )

将旋转矩阵转换为四元数(Matrix to quaternion)

参数
r旋转矩阵
q输出四元数

◆ mxm()

AST_SPICE_CAPI void ast::mxm ( const Matrix3d & m1,
const Matrix3d & m2,
Matrix3d & mout )

矩阵乘法(Matrix times matrix, 3x3)

参数
m1矩阵1
m2矩阵2
mout输出矩阵

◆ mxvg()

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输出向量

◆ pxform()

AST_SPICE_API errc_t ast::pxform ( StringView from,
StringView to,
const TimePoint & et,
Matrix3d & rotate )

计算从一个参考系统到另一个参考系统的旋转矩阵(Position Transformation Matrix)

参数
from源参考系统
to目标参考系统
et时间点
rotate输出旋转矩阵
返回

◆ q2m()

AST_SPICE_CAPI void ast::q2m ( const Quaternion & q,
Matrix3d & r )

将四元数转换为旋转矩阵(Quaternion to matrix)

参数
q四元数
r输出旋转矩阵

◆ radrec()

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)

◆ spkapo()

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光行时
返回

注解
SPICE 中的时间系统按照 TDB 时间尺度进行推进

◆ spkpos()

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光行时
返回

◆ spkssb()

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输出位置速度(直角坐标)
返回

◆ utc2et()

AST_SPICE_API errc_t ast::utc2et ( StringView utcstr,
double & et )
参数
utcstr
et
返回