🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
DataGroupEquinElem.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstReport/DataGroupTimeVar.hpp"
25#include "AstCore/Frame.hpp"
26#include "AstCore/Point.hpp"
27#include "AstCore/OrbitElement.hpp"
28
29AST_NAMESPACE_BEGIN
30
39{
40public:
41 struct Data
42 {
43 EquinElem equinElem_{};
44 double gm_{};
45 TimePoint time_{};
46
47 const TimePoint& getTime() const { return time_; }
48 double getSemiMajorAxis() const { return equinElem_.a(); }
49 double getH() const { return equinElem_.h(); }
50 double getK() const { return equinElem_.k(); }
51 double getP() const { return equinElem_.p(); }
52 double getQ() const { return equinElem_.q(); }
53 double getMeanLon() const { return equinElem_.lambda(); }
54 double getMeanMotion() const { return equinElem_.a() > 0.0 ? aSMAToMeanMotion(equinElem_.a(), gm_) : 0.0; }
55
56 // 以下元素需要额外基础设施支持,暂未实现:
57 // const char* getDirection() const; // DataType 2 (string), "Prograde"/"Retrograde"
58 // double getSMARate() const; // DataType 3, 需要传播器状态
59 // double getHRate() const; // DataType 3
60 // double getKRate() const; // DataType 3
61 // double getPRate() const; // DataType 3
62 // double getQRate() const; // DataType 3
63 // double getMeanLonRate() const; // DataType 3
64 // double getMeanLonPerturbRate() const; // DataType 3
65 };
66 static DataElements Elements();
67
68 DataGroupEquinElem() = default;
69 ~DataGroupEquinElem() = default;
70public:
71 errc_t calculate(const TimeList& timeList, VariantVector& result) const override;
72 const DataElements& getElements() const override;
73public:
74 errc_t calculate(const TimeList& timeList, std::vector<Data>& result) const;
75 errc_t calculate(const TimeList& timeList, Span<Data> result) const;
76public:
77 Point* getPoint() const { return point_.get(); }
78 Frame* getFrame() const { return frame_.get(); }
79 void setPoint(Point* p) { point_ = p; }
80 void setFrame(Frame* f) { frame_ = f; }
81private:
82 WeakPtr<Point> point_{};
83 WeakPtr<Frame> frame_{};
84};
85
86
89AST_NAMESPACE_END
数据元素容器
定义 DataElements.hpp:90
春分点根数数据组 — 半长轴、h、k、p、q、平经度及平均角速度
定义 DataGroupEquinElem.hpp:39
随时间变化的数据组
定义 DataGroupTimeVar.hpp:37
春分点根数
定义 OrbitElement.hpp:246
坐标系抽象基类
定义 Frame.hpp:62
点抽象基类
定义 Point.hpp:41
非拥有的连续对象序列视图
定义 Span.hpp:71
时间点列表
定义 TimeList.hpp:49
绝对时间点
定义 TimePoint.hpp:108
变类型向量容器
定义 VariantVector.hpp:59
double aSMAToMeanMotion(double semiMajorAxis, double gm)
长半轴转换为平均角速度
定义 OrbitParam.cpp:384
定义 DataGroupEquinElem.hpp:42