🛰️航天仿真算法库 SpaceAST 0.0.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 "AstSim/MotionProfile.hpp"
28#include "AstSim/MotionWithIntervalStep.hpp"
29
30
31AST_NAMESPACE_BEGIN
32
41class AST_SIM_API MotionSimpleAscent: public MotionProfile
42{
43public:
44 AST_OBJECT(MotionSimpleAscent)
45 static MotionSimpleAscent* New();
47 ~MotionSimpleAscent() override = default;
48
52 errc_t makeEphemerisSpec(ScopedPtr<Ephemeris>& eph) const override;
53
57 errc_t makeEphemerisSimple(ScopedPtr<Ephemeris>& eph) const override;
58
61 void accept(MotionProfileVisitor& visitor) override;
62
64 Body* getBody() const;
65
67 void setBody(Body* body) { body_ = body; }
68
71 void setLaunchTime(const TimePoint& time) { launchTime_ = time; }
72
75 const TimePoint& getLaunchTime() const { return launchTime_; }
76
79 void setUseScenTime(bool useScenTime) { useScenTime_ = useScenTime; }
80
83 bool getUseScenTime() const { return useScenTime_; }
84
87 void setBurnoutTime(const TimePoint& time) { burnoutTime_ = time; }
88
91 const TimePoint& getBurnoutTime() const { return burnoutTime_; }
92
97 void setLaunchPosition(double latitude, double longitude, double altitude)
98 {
99 launchPosition_ = GeodeticPoint(latitude, longitude, altitude);
100 }
101
104 double getLaunchLatitude() const { return launchPosition_.latitude(); }
105
108 double getLaunchLongitude() const { return launchPosition_.longitude(); }
109
112 double getLaunchAltitude() const { return launchPosition_.altitude(); }
113
118 void setBurnoutPosition(double latitude, double longitude, double altitude)
119 {
120 this->burnoutPosition_ = GeodeticPoint(latitude, longitude, altitude);
121 }
122
125 double getBurnoutLatitude() const { return burnoutPosition_.latitude(); }
126
129 double getBurnoutLongitude() const { return burnoutPosition_.longitude(); }
130
133 double getBurnoutAltitude() const { return burnoutPosition_.altitude(); }
134
137 void setBurnoutVelocity(double velocity) { burnoutVelocity_ = velocity; }
138
141 double getBurnoutVelocity() const { return burnoutVelocity_; }
142
145 void setGranularity(double granularity) { granularity_ = granularity; }
146
149 double getGranularity() const { return granularity_; }
150
151private:
152 TimePoint launchTime_{};
153 bool useScenTime_{};
154 TimePoint burnoutTime_{};
155 WeakPtr<CelestialBody> body_{};
156 GeodeticPoint launchPosition_{};
157 GeodeticPoint burnoutPosition_{};
158 double burnoutVelocity_{};
159 double granularity_{};
160};
161
164AST_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:42
void setLaunchPosition(double latitude, double longitude, double altitude)
设置发射位置
定义 MotionSimpleAscent.hpp:97
const TimePoint & getLaunchTime() const
获取发射时间
定义 MotionSimpleAscent.hpp:75
double getBurnoutAltitude() const
获取关机高度
定义 MotionSimpleAscent.hpp:133
void setUseScenTime(bool useScenTime)
设置是否使用场景时间
定义 MotionSimpleAscent.hpp:79
double getLaunchLatitude() const
获取发射纬度
定义 MotionSimpleAscent.hpp:104
double getBurnoutLatitude() const
获取关机纬度
定义 MotionSimpleAscent.hpp:125
double getLaunchLongitude() const
获取发射经度
定义 MotionSimpleAscent.hpp:108
void setBody(Body *body)
设置天体
定义 MotionSimpleAscent.hpp:67
void setBurnoutPosition(double latitude, double longitude, double altitude)
设置关机位置
定义 MotionSimpleAscent.hpp:118
void setBurnoutVelocity(double velocity)
设置关机速度
定义 MotionSimpleAscent.hpp:137
void setBurnoutTime(const TimePoint &time)
设置关机时间
定义 MotionSimpleAscent.hpp:87
double getLaunchAltitude() const
获取发射高度
定义 MotionSimpleAscent.hpp:112
const TimePoint & getBurnoutTime() const
获取关机时间
定义 MotionSimpleAscent.hpp:91
double getBurnoutLongitude() const
获取关机经度
定义 MotionSimpleAscent.hpp:129
bool getUseScenTime() const
获取是否使用场景时间
定义 MotionSimpleAscent.hpp:83
double getGranularity() const
获取时间粒度
定义 MotionSimpleAscent.hpp:149
void setLaunchTime(const TimePoint &time)
设置发射时间
定义 MotionSimpleAscent.hpp:71
double getBurnoutVelocity() const
获取关机速度
定义 MotionSimpleAscent.hpp:141
void setGranularity(double granularity)
设置时间粒度
定义 MotionSimpleAscent.hpp:145
作用域指针类
定义 ScopedPtr.hpp:65
绝对时间点
定义 TimePoint.hpp:108