12#ifndef WSFCONSTELLATIONOPTIONS_HPP
13#define WSFCONSTELLATIONOPTIONS_HPP
15#include "wsf_space_export.h"
21#include "UtUnitTypes.hpp"
34 unsigned int aNumPlanes,
35 unsigned int aWalkerF);
38 unsigned int aNumSatsPerPlane,
39 const UtAngleValue& aAnomalyAlias,
40 const UtAngleValue& aRAAN_Range);
46 bool IsWalkerDelta()
const {
return mConstellationType == ConstellationType::cWALKER_DELTA; }
49 bool IsWalkerStar()
const {
return mConstellationType == ConstellationType::cWALKER_STAR; }
52 bool IsGeneral()
const {
return mConstellationType == ConstellationType::cGENERAL; }
73 const UtLengthValue&
GetSemiMajorAxis()
const {
return mOrbitSize.GetSemiMajorAxis(); }
115 void SetSemiMajorAxis(
const UtLengthValue& aSemiMajorAxis) { mOrbitSize.SetSemiMajorAxis(aSemiMajorAxis); }
120 mOrbitSize.SetCircularAltitude(aCircularAltitude);
124 void SetOrbitalPeriod(
const UtTimeValue& aOrbitalPeriod) { mOrbitSize.SetOrbitalPeriod(aOrbitalPeriod); }
130 void SetInclination(
const UtAngleValue& aInclination) { mInclination = aInclination; }
133 void SetInitialRAAN(
const UtAngleValue& aInitialRAAN) { mInitialRAAN = aInitialRAAN; }
136 void SetInitialAnomaly(
const UtAngleValue& aInitialAnomaly) { mInitialAnomaly = aInitialAnomaly; }
142 void SetPlatformType(
const std::string& aPlatformType) { mPlatformType = aPlatformType; }
145 void SetBasePath(
const UtPath& aBasePath) { mBasePath = aBasePath; }
147 void OutputOptions(std::ostream& aStream)
const;
149 std::string GetGeneratedFilePrefix()
const;
151 std::string GetMemberName(
unsigned int aPlane,
unsigned int aSatellite)
const;
152 UtAngleValue GetMemberRAAN(
unsigned int aPlane)
const;
153 UtAngleValue GetMemberAnomaly(
unsigned int aPlane,
unsigned int aSatellite)
const;
155 constexpr static const char*
cBASE_NAME{
"Constellation Name"};
166 constexpr static const char*
cALTITUDE{
"Orbit Altitude"};
168 constexpr static const char*
cPERIOD{
"Orbital Period"};
170 "# New file created by AFSIM Wizard using the Constellation Maker\n/*\n"};
173 enum class ConstellationType
181 WsfConstellationOptions() =
default;
182 WsfConstellationOptions(ConstellationType aType,
183 unsigned int aNumTotalSats,
184 unsigned int aNumPlanes,
185 unsigned int aSatsPerPlane,
186 unsigned int aWalkerF,
187 const UtAngleValue& aAnomalyAlias,
188 const UtAngleValue& aRAAN_Range)
189 : mConstellationType{aType}
190 , mNumTotalSats{aNumTotalSats}
191 , mNumPlanes{aNumPlanes}
192 , mSatsPerPlane{aSatsPerPlane}
194 , mAnomalyAlias{aAnomalyAlias}
195 , mRAAN_Range{aRAAN_Range}
199 static bool ValidWalkerInputs(
unsigned int aNumTotalSats,
unsigned int aNumPlanes,
unsigned int aWalkerF);
200 static UtAngleValue AnomalyAliasFromWalkerF(
unsigned int aWalkerF,
unsigned int aNumSatsTotal);
209 ConstellationType mConstellationType{ConstellationType::cINVALID};
210 unsigned int mNumTotalSats{0};
211 unsigned int mNumPlanes{0};
212 unsigned int mSatsPerPlane{0};
213 unsigned int mWalkerF{0};
214 UtAngleValue mAnomalyAlias{};
215 UtAngleValue mRAAN_Range{};
219 wsf::space::OrbitSize mOrbitSize{};
220 UtAngleValue mInclination{-90.0, UtUnitAngle::cDEGREES};
221 UtAngleValue mInitialRAAN{-90.0, UtUnitAngle::cDEGREES};
222 UtAngleValue mInitialAnomaly{-90.0, UtUnitAngle::cDEGREES};
223 std::string mConstellationName{};
224 std::string mPlatformType{};
225 UtPath mBasePath{
"./"};
static constexpr const char * cHEADER_START_MARKER
Definition WsfConstellationOptions.hpp:169
static constexpr const char * cGENERATION_PATH
Definition WsfConstellationOptions.hpp:157
void SetOrbitalPeriod(const UtTimeValue &aOrbitalPeriod)
Set the orbital period of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:124
void SetInclination(const UtAngleValue &aInclination)
Set the inclination of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:130
static constexpr const char * cSEMI_MAJOR_AXIS
Definition WsfConstellationOptions.hpp:167
void SetInitialRAAN(const UtAngleValue &aInitialRAAN)
Set the RAAN of the zeroth plane in this constellation design.
Definition WsfConstellationOptions.hpp:133
const UtAngleValue & GetAnomalyAlias() const
Return the inter-plane phasing angle in this constellation design.
Definition WsfConstellationOptions.hpp:67
const UtLengthValue & GetSemiMajorAxis() const
Return the semi-major axis of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:73
bool SpecifiedAsCircularAltitude() const
Return if the orbit size was specified via the circular altitude.
Definition WsfConstellationOptions.hpp:88
bool IsGeneral() const
Return if these options are for a general design.
Definition WsfConstellationOptions.hpp:52
void SetCircularAltitude(const UtLengthValue &aCircularAltitude)
Set the circular altitude of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:118
double GetRevolutionsPerDay() const
Return the number of revolutions per day of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:82
unsigned int GetSatsPerPlane() const
Return the number of members per plane in this constellation design.
Definition WsfConstellationOptions.hpp:61
void SetRevolutionsPerDay(double aRevolutionsPerDay)
Set the number of revolutions per day of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:127
const UtAngleValue & GetRAAN_Range() const
Return the range in RAAN over which the orbital planes are distributed in this constellation design.
Definition WsfConstellationOptions.hpp:70
const UtPath & GetBasePath() const
Return the base path to which any generated files will be placed for this constellation design.
Definition WsfConstellationOptions.hpp:112
static constexpr const char * cANOMALY_ALIAS
Definition WsfConstellationOptions.hpp:165
unsigned int GetTotalSats() const
Return the total number of members in this constellation design.
Definition WsfConstellationOptions.hpp:55
static WsfConstellationOptions CreateWalkerDelta(unsigned int aNumTotalSats, unsigned int aNumPlanes, unsigned int aWalkerF)
Definition WsfConstellationOptions.cpp:46
const UtAngleValue & GetInclination() const
Return the inclination of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:97
const UtAngleValue & GetInitialAnomaly() const
Return the true anomaly of the zeroth member of the zeroth plane in this constellation design.
Definition WsfConstellationOptions.hpp:103
static constexpr const char * cPERIOD
Definition WsfConstellationOptions.hpp:168
bool SpecifiedAsRevolutionsPerDay() const
Return if the orbit size was specified via the number of revolutions per day.
Definition WsfConstellationOptions.hpp:94
void SetConstellationName(const std::string &aConstellationName)
Set the name of this constellation design.
Definition WsfConstellationOptions.hpp:139
bool SpecifiedAsOrbitalPeriod() const
Return if the orbit size was specified via the orbital period.
Definition WsfConstellationOptions.hpp:91
void SetPlatformType(const std::string &aPlatformType)
Set the platform type of the members of this constellation design.
Definition WsfConstellationOptions.hpp:142
static constexpr const char * cSATS_PER_PLANE
Definition WsfConstellationOptions.hpp:161
static constexpr const char * cINITIAL_RAAN
Definition WsfConstellationOptions.hpp:162
unsigned int GetWalkerF() const
Return the Walker inter-plane phasing parameter in this constellation design.
Definition WsfConstellationOptions.hpp:64
static constexpr const char * cINITIAL_ANOMALY
Definition WsfConstellationOptions.hpp:164
bool IsWalkerDelta() const
Return if these options are for a Walker Delta design.
Definition WsfConstellationOptions.hpp:46
std::string ValidateSetup() const
Definition WsfConstellationOptions.cpp:126
static constexpr const char * cBASE_NAME
Definition WsfConstellationOptions.hpp:155
const UtAngleValue & GetInitialRAAN() const
Return the RAAN of the zeroth orbital plane in this constellation design.
Definition WsfConstellationOptions.hpp:100
void SetSemiMajorAxis(const UtLengthValue &aSemiMajorAxis)
Set the semi-major axis of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:115
const std::string & GetPlatformType() const
Return the type of platform that would be used for members of this constellation design.
Definition WsfConstellationOptions.hpp:109
static WsfConstellationOptions CreateWalkerStar(unsigned int aNumTotalSats, unsigned int aNumPlanes, unsigned int aWalkerF)
Definition WsfConstellationOptions.cpp:78
void SetInitialAnomaly(const UtAngleValue &aInitialAnomaly)
Set the true anomaly of the zeroth member of the zeroth orbital plane in this constellation design.
Definition WsfConstellationOptions.hpp:136
const UtLengthValue & GetCircularAltitude() const
Return the circular altitude of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:76
static WsfConstellationOptions CreateGeneral(unsigned int aNumPlanes, unsigned int aNumSatsPerPlane, const UtAngleValue &aAnomalyAlias, const UtAngleValue &aRAAN_Range)
Create a set of options for General constellation.
Definition WsfConstellationOptions.cpp:99
static constexpr const char * cINCLINATION
Definition WsfConstellationOptions.hpp:159
static constexpr const char * cREVS_PER_DAY
Definition WsfConstellationOptions.hpp:158
bool IsSetup() const
Return if this object has been fully set up.
Definition WsfConstellationOptions.cpp:114
static constexpr const char * cNUM_PLANES
Definition WsfConstellationOptions.hpp:160
static constexpr const char * cALTITUDE
Definition WsfConstellationOptions.hpp:166
static constexpr const char * cRAAN_RANGE
Definition WsfConstellationOptions.hpp:163
const UtTimeValue & GetOrbitalPeriod() const
Return the orbital period of the orbits in this constellation design.
Definition WsfConstellationOptions.hpp:79
WsfConstellationOptions(const WsfConstellationOptions &aOther)=default
bool SpecifiedAsSemiMajorAxis() const
Return if the orbit size was specified via semi-major axis.
Definition WsfConstellationOptions.hpp:85
static constexpr const char * cPLATFORM_TYPE
Definition WsfConstellationOptions.hpp:156
WsfConstellationOptions & operator=(const WsfConstellationOptions &aOther)=default
unsigned int GetNumPlanes() const
Return the number of orbital planes in this constellation design.
Definition WsfConstellationOptions.hpp:58
const std::string & GetConstellationName() const
Return the name of the constellation design.
Definition WsfConstellationOptions.hpp:106
void SetBasePath(const UtPath &aBasePath)
Set the base path of any generated files for this constellation design.
Definition WsfConstellationOptions.hpp:145
bool IsWalkerStar() const
Return if these options are for a Walker Star design.
Definition WsfConstellationOptions.hpp:49