🛰️航天仿真算法库 SpaceAST 0.3.1
载入中...
搜索中...
未找到
MotionSimpleAscent.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/Time.hpp"
25#include "AstCore/Object.hpp"
26#include "AstCore/GeodeticPoint.hpp"
27#include "AstCore/CelestialBody.hpp"
28#include "AstSim/MotionProfile.hpp"
29#include "AstSim/MotionWithIntervalStep.hpp"
30
31
32AST_NAMESPACE_BEGIN
33
42class AST_SIM_API MotionSimpleAscent: public MotionProfile
43{
44public:
45 AST_OBJECT(MotionSimpleAscent)
46 static MotionSimpleAscent* New();
48 ~MotionSimpleAscent() override = default;
49
53 errc_t makeEphemerisSpec(ScopedPtr<Ephemeris>& eph) const override;
54
58 errc_t makeEphemerisSimple(ScopedPtr<Ephemeris>& eph) const override;
59
62 void accept(MotionProfileVisitor& visitor) override;
63
65 Body* getBody() const;
66
68 void setBody(Body* body) { body_ = body; }
69
72 void setLaunchTime(const TimePoint& time) { launchTime_ = time; }
73
76 const TimePoint& getLaunchTime() const { return launchTime_; }
77
80 void setUseScenTime(bool useScenTime) { useScenTime_ = useScenTime; }
81
84 bool getUseScenTime() const { return useScenTime_; }
85
88 void setBurnoutTime(const TimePoint& time) { burnoutTime_ = time; }
89
92 const TimePoint& getBurnoutTime() const { return burnoutTime_; }
93
98 void setLaunchPosition(double latitude, double longitude, double altitude)
99 {
100 launchPosition_ = GeodeticPoint(latitude, longitude, altitude);
101 }
102
105 double getLaunchLatitude() const { return launchPosition_.latitude(); }
106
109 double getLaunchLongitude() const { return launchPosition_.longitude(); }
110
113 double getLaunchAltitude() const { return launchPosition_.altitude(); }
114
119 void setBurnoutPosition(double latitude, double longitude, double altitude)
120 {
121 this->burnoutPosition_ = GeodeticPoint(latitude, longitude, altitude);
122 }
123
126 double getBurnoutLatitude() const { return burnoutPosition_.latitude(); }
127
130 double getBurnoutLongitude() const { return burnoutPosition_.longitude(); }
131
134 double getBurnoutAltitude() const { return burnoutPosition_.altitude(); }
135
138 void setBurnoutVelocity(double velocity) { burnoutVelocity_ = velocity; }
139
142 double getBurnoutVelocity() const { return burnoutVelocity_; }
143
146 void setGranularity(double granularity) { granularity_ = granularity; }
147
150 double getGranularity() const { return granularity_; }
151
152private:
153 TimePoint launchTime_{};
154 bool useScenTime_{};
155 TimePoint burnoutTime_{};
156 WeakPtr<CelestialBody> body_{};
157 GeodeticPoint launchPosition_{};
158 GeodeticPoint burnoutPosition_{};
159 double burnoutVelocity_{};
160 double granularity_{};
161};
162
165AST_NAMESPACE_END
天体
定义 CelestialBody.hpp:72
大地坐标
定义 GeodeticPoint.hpp:33
定义 MotionProfileVisitor.hpp:44
运动定义接口
定义 MotionProfile.hpp:51
virtual errc_t makeEphemerisSpec(ScopedPtr< Ephemeris > &eph) const =0
生成特定星历
virtual errc_t makeEphemerisSimple(ScopedPtr< Ephemeris > &eph) const =0
生成简单星历
virtual void accept(MotionProfileVisitor &visitor)=0
接受访问者
简单上升运动模型,用于模拟运载火箭的上升阶段运动
定义 MotionSimpleAscent.hpp:43
void setLaunchPosition(double latitude, double longitude, double altitude)
设置发射位置
定义 MotionSimpleAscent.hpp:98
const TimePoint & getLaunchTime() const
获取发射时间
定义 MotionSimpleAscent.hpp:76
double getBurnoutAltitude() const
获取关机高度
定义 MotionSimpleAscent.hpp:134
void setUseScenTime(bool useScenTime)
设置是否使用场景时间
定义 MotionSimpleAscent.hpp:80
double getLaunchLatitude() const
获取发射纬度
定义 MotionSimpleAscent.hpp:105
double getBurnoutLatitude() const
获取关机纬度
定义 MotionSimpleAscent.hpp:126
double getLaunchLongitude() const
获取发射经度
定义 MotionSimpleAscent.hpp:109
void setBody(Body *body)
设置天体
定义 MotionSimpleAscent.hpp:68
void setBurnoutPosition(double latitude, double longitude, double altitude)
设置关机位置
定义 MotionSimpleAscent.hpp:119
void setBurnoutVelocity(double velocity)
设置关机速度
定义 MotionSimpleAscent.hpp:138
void setBurnoutTime(const TimePoint &time)
设置关机时间
定义 MotionSimpleAscent.hpp:88
double getLaunchAltitude() const
获取发射高度
定义 MotionSimpleAscent.hpp:113
const TimePoint & getBurnoutTime() const
获取关机时间
定义 MotionSimpleAscent.hpp:92
double getBurnoutLongitude() const
获取关机经度
定义 MotionSimpleAscent.hpp:130
bool getUseScenTime() const
获取是否使用场景时间
定义 MotionSimpleAscent.hpp:84
double getGranularity() const
获取时间粒度
定义 MotionSimpleAscent.hpp:150
void setLaunchTime(const TimePoint &time)
设置发射时间
定义 MotionSimpleAscent.hpp:72
double getBurnoutVelocity() const
获取关机速度
定义 MotionSimpleAscent.hpp:142
void setGranularity(double granularity)
设置时间粒度
定义 MotionSimpleAscent.hpp:146
作用域指针类
定义 ScopedPtr.hpp:65
绝对时间点
定义 TimePoint.hpp:108