25#include "AstCore/OrbitElement.hpp"
29#define _AST_DEF_KINEMATICROTATION_PROPERTIES\
30 _AST_DEF_ROTATION_PROPERTIES\
31 const Vector3d& rotationRate() const { return angvel_; }\
32 Vector3d& rotationRate() { return angvel_; }\
33 const Vector3d& getRotationRate() const { return angvel_; }\
34 Vector3d& getRotationRate() { return angvel_; }\
35 void setRotationRate(const Vector3d& angvel) { angvel_ = angvel; }\
36 KinematicRotation& kinematicRotation() { return reinterpret_cast<KinematicRotation&>(rotation_); }\
37 const KinematicRotation& kinematicRotation() const { return reinterpret_cast<const KinematicRotation&>(rotation_); }\
38 KinematicRotation& getKinematicRotation() { return kinematicRotation(); }\
39 const KinematicRotation& getKinematicRotation() const { return kinematicRotation(); }\
40 void setKinematicRotation(const KinematicRotation& rot) { kinematicRotation() = rot; }\
69 _AST_DEF_KINEMATICROTATION_PROPERTIES
107 void transformVectorVelocity(
const Vector3d& vector,
const Vector3d& velocity, Vector3d& vectorOut, Vector3d& velocityOut)
const;
120 void transformVectorVelocityInv(
const Vector3d& vector,
const Vector3d& velocity, Vector3d& vectorOut, Vector3d& velocityOut)
const;
131A_ALWAYS_INLINE KinematicRotation::KinematicRotation(
const Matrix3d &mat,
const Vector3d &angvel)
146 matrix() = next.matrix() * this->matrix();
167 inversed.setRotationRate(-(this->matrix()*
angvel_));
168 this->rotation().
getInverse(inversed.rotation());
181 velocityOut = this->matrix() * (velocity - this->
angvel_.cross(vector));
182 vectorOut = this->matrix() * vector;
194 vectorOut = vector * this->matrix();
195 velocityOut = velocity* this->matrix() + this->
angvel_.cross(vectorOut);
直角坐标
定义 OrbitElement.hpp:53
const Vector3d & pos() const
获取位置
定义 OrbitElement.hpp:66
const Vector3d & vel() const
获取速度
定义 OrbitElement.hpp:73
运动学坐标系旋转
定义 KinematicRotation.hpp:50
KinematicRotation composed(const KinematicRotation &next) const
组合下一个旋转
定义 KinematicRotation.hpp:150
CartState transformCartState(const CartState &state) const
变换状态向量和速度
定义 KinematicRotation.hpp:185
Vector3d angvel_
角速度
定义 KinematicRotation.hpp:123
void transformVectorVelocityInv(const Vector3d &vector, const Vector3d &velocity, Vector3d &vectorOut, Vector3d &velocityOut) const
变换位置和速度(逆变换)
定义 KinematicRotation.hpp:192
KinematicRotation()=default
运动学旋转默认构造函数
void transformVectorVelocity(const Vector3d &vector, const Vector3d &velocity, Vector3d &vectorOut, Vector3d &velocityOut) const
变换向量和速度
定义 KinematicRotation.hpp:178
KinematicRotation & operator*=(const KinematicRotation &next)
组合下一个坐标系旋转
定义 KinematicRotation.hpp:160
void getInverse(KinematicRotation &inversed) const
获取逆旋转
定义 KinematicRotation.hpp:165
KinematicRotation operator*(const KinematicRotation &next) const
组合下一个旋转
定义 KinematicRotation.hpp:155
_AST_DEF_KINEMATICROTATION_PROPERTIES KinematicRotation & compose(const KinematicRotation &next)
组合下一个坐标系旋转
定义 KinematicRotation.hpp:143
KinematicRotation inverse() const
获取逆旋转
定义 KinematicRotation.hpp:171