🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
EphemerisLagrangeVar.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/Ephemeris.hpp"
25#include "AstCore/TimePoint.hpp"
26#include "AstCore/Frame.hpp"
27#include "AstMath/Vector.hpp"
28#include <vector>
29
30AST_NAMESPACE_BEGIN
31
39class AST_CORE_API EphemerisLagrangeVar: public Ephemeris
40{
41public:
42 EphemerisLagrangeVar() = default;
43 EphemerisLagrangeVar(Frame* frame) : frame_(frame){}
44 ~EphemerisLagrangeVar() = default;
45public:
46 Frame* getFrame() const override;
47 errc_t getPos(const TimePoint& tp, Vector3d& pos) const override;
48 errc_t getPosVel(const TimePoint& tp, Vector3d& pos, Vector3d& vel) const override;
49 errc_t getInterval(TimeInterval& interval) const override;
50public:
51 void setFrame(Frame* frame){frame_ = frame;}
52 void setTimes(const std::vector<double>& times);
53 void setTimes(std::vector<double>&& times);
54 void setPositions(const std::vector<Vector3d>& positions){positions_ = positions;}
55 void setPositions(std::vector<Vector3d>&& positions){positions_ = std::move(positions);}
56 void setVelocities(const std::vector<Vector3d>& velocities){velocities_ = velocities;}
57 void setVelocities(std::vector<Vector3d>&& velocities){velocities_ = std::move(velocities);}
58 void setEpoch(const TimePoint& epoch){epoch_ = epoch;}
59 void setInterpolateOrder(int order){interpolateOrder_ = order;}
60public:
61 size_t size() const{return times_.size();}
62private:
63 int findIndex(double delta) const;
64protected:
66 std::vector<double> times_;
67 std::vector<Vector3d> positions_;
68 std::vector<Vector3d> velocities_;
69 TimePoint epoch_{};
70 double averageStep_{60};
71 int interpolateOrder_{5};
72};
73
74
77AST_NAMESPACE_END
可变步长拉格朗日插值星历
定义 EphemerisLagrangeVar.hpp:40
SharedPtr< Frame > frame_
参考坐标系
定义 EphemerisLagrangeVar.hpp:65
std::vector< double > times_
时间(单位:秒)
定义 EphemerisLagrangeVar.hpp:66
std::vector< Vector3d > velocities_
速度(单位:米/秒)
定义 EphemerisLagrangeVar.hpp:68
std::vector< Vector3d > positions_
位置(单位:米)
定义 EphemerisLagrangeVar.hpp:67
星历接口
定义 Ephemeris.hpp:43
virtual errc_t getPos(const TimePoint &tp, Vector3d &pos) const override=0
获取点在指定时间点的位置,相对于点的参考坐标系
virtual errc_t getPosVel(const TimePoint &tp, Vector3d &pos, Vector3d &vel) const override=0
获取点在指定时间点的位置和速度,相对于点的参考坐标系
virtual Frame * getFrame() const override=0
获取点所在的参考坐标系
坐标系类
定义 Frame.hpp:59
共享指针
定义 SharedPtr.hpp:33
时间区间
定义 TimeInterval.hpp:59
绝对时间点
定义 TimePoint.hpp:106