12#ifndef WSFCONSTELLATIONMAKER_HPP
13#define WSFCONSTELLATIONMAKER_HPP
20#include "UtUnitTypes.hpp"
40class WsfConstellationMaker
43 static std::unique_ptr<WsfConstellationMaker>
CreateWalkerDelta(
unsigned int aNumTotalSats,
44 unsigned int aNumPlanes,
45 unsigned int aWalkerF);
46 static std::unique_ptr<WsfConstellationMaker>
CreateWalkerStar(
unsigned int aNumTotalSats,
47 unsigned int aNumPlanes,
48 unsigned int aWalkerF);
49 static std::unique_ptr<WsfConstellationMaker>
CreateGeneral(
unsigned int aNumPlanes,
50 unsigned int aNumSatsPerPlane,
51 UtAngleValue aAnomalyAlias,
52 UtAngleValue aRAAN_Range);
58 UtScript* aFilterScriptPtr,
59 UtScript* aSetupScriptPtr)
const;
63 bool IsSetup()
const {
return mOptions.IsSetup(); }
66 std::string
Validate()
const {
return mOptions.ValidateSetup(); }
75 bool IsGeneral()
const {
return mOptions.IsGeneral(); }
81 unsigned int GetNumPlanes()
const {
return mOptions.GetNumPlanes(); }
87 unsigned int GetWalkerF()
const {
return mOptions.GetWalkerF(); }
90 const UtAngleValue&
GetAnomalyAlias()
const {
return mOptions.GetAnomalyAlias(); }
93 const UtAngleValue&
GetRAAN_Range()
const {
return mOptions.GetRAAN_Range(); }
123 const UtPath&
GetBasePath()
const {
return mOptions.GetBasePath(); }
126 void SetSemiMajorAxis(
const UtLengthValue& aSemiMajorAxis) { mOptions.SetSemiMajorAxis(aSemiMajorAxis); }
129 void SetCircularAltitude(
const UtLengthValue& aCircularAltitude) { mOptions.SetCircularAltitude(aCircularAltitude); }
132 void SetOrbitalPeriod(
const UtTimeValue& aOrbitalPeriod) { mOptions.SetOrbitalPeriod(aOrbitalPeriod); }
138 void SetInclination(
const UtAngleValue& aInclination) { mOptions.SetInclination(aInclination); }
141 void SetInitialRAAN(
const UtAngleValue& aInitialRAAN) { mOptions.SetInitialRAAN(aInitialRAAN); }
144 void SetInitialAnomaly(
const UtAngleValue& aInitialAnomaly) { mOptions.SetInitialAnomaly(aInitialAnomaly); }
150 void SetPlatformType(
const std::string& aPlatformType) { mOptions.SetPlatformType(aPlatformType); }
153 void SetBasePath(
const UtPath& aBasePath) { mOptions.SetBasePath(aBasePath); }
161 std::string GetGeneratedName()
const;
162 void CreateContainingFolder()
const;
164 WsfPlatform* CheckTypeExistence(WsfSimulation& aSimulation)
const;
165 void CheckNameCollisions(
const WsfSimulation& aSimulation)
const;
166 bool FilterMember(WsfScriptContext& aContext,
167 UtScript* aFilterScriptPtr,
170 unsigned int aSatellite)
const;
171 WsfConstellation* AddMembersToSimulation(
double aCreationTime,
172 WsfSimulation& aSimulation,
173 WsfScriptContext& aContext,
174 UtScript* aFilterScriptPtr,
175 WsfPlatform* aPlatformType)
const;
176 void SetupMemberElements(WsfPlatform* aMemberPtr,
unsigned int aPlane,
unsigned int aSat,
const UtCalendar& aEpoch)
const;
177 void SetupMembers(WsfScriptContext& aContext,
178 UtScript* aFilterScriptPtr,
180 WsfConstellation* aConstellationPtr)
const;
182 WsfConstellationOptions mOptions;
Definition WsfConstellationMaker.hpp:41
bool DetectConjunction() const
Definition WsfConstellationMaker.cpp:221
void SetConstellationName(const std::string &aName)
Set the name of constellations produced by this object.
Definition WsfConstellationMaker.hpp:147
const UtAngleValue & GetAnomalyAlias() const
Return the inter-plane phasing angle of constellations produced by this object.
Definition WsfConstellationMaker.hpp:90
void SetBasePath(const UtPath &aBasePath)
Set the base path to any files generated by this object.
Definition WsfConstellationMaker.hpp:153
const UtAngleValue & GetInclination() const
Get the inclination of orbits for constellations produced by this object.
Definition WsfConstellationMaker.hpp:108
const std::string & GetPlatformType() const
Get the type of platforms for constellations produced by this object.
Definition WsfConstellationMaker.hpp:120
void SetInitialRAAN(const UtAngleValue &aInitialRAAN)
Set the RAAN of the zeroth orbital plane for constellations produced by this object.
Definition WsfConstellationMaker.hpp:141
const UtLengthValue & GetSemiMajorAxis() const
Get the semi-major axis of the orbits for constellations produced by this object.
Definition WsfConstellationMaker.hpp:96
void SetOrbitalPeriod(const UtTimeValue &aOrbitalPeriod)
Set the period of the orbits for constellations produces by this object.
Definition WsfConstellationMaker.hpp:132
void WriteToFile() const
Definition WsfConstellationMaker.cpp:151
const UtTimeValue & GetOrbitalPeriod() const
Get the period of orbits for constellations produced by this object.
Definition WsfConstellationMaker.hpp:102
static std::unique_ptr< WsfConstellationMaker > CreateWalkerDelta(unsigned int aNumTotalSats, unsigned int aNumPlanes, unsigned int aWalkerF)
Definition WsfConstellationMaker.cpp:86
const UtAngleValue & GetRAAN_Range() const
Return the range in RAAN over which the orbital planes are distributed for constellations produced by...
Definition WsfConstellationMaker.hpp:93
void SetRevolutionsPerDay(double aRevolutionsPerDay)
Set the number of revolutions per day for orbits for constellations produced by this object.
Definition WsfConstellationMaker.hpp:135
void SetSemiMajorAxis(const UtLengthValue &aSemiMajorAxis)
Set the semi-major axis of the orbits for constellations produced by this object.
Definition WsfConstellationMaker.hpp:126
const UtLengthValue & GetCircularAltitude() const
Get the circular altitude of the orbits for constellations produced by this object.
Definition WsfConstellationMaker.hpp:99
void SetCircularAltitude(const UtLengthValue &aCircularAltitude)
Set the circular altitude of the orbits for constellations produced by this object.
Definition WsfConstellationMaker.hpp:129
unsigned int GetNumPlanes() const
Return the number of orbital planes of constellations produced by this object.
Definition WsfConstellationMaker.hpp:81
unsigned int GetNumTotalSats() const
Return the total number of members of constellations produced by this object.
Definition WsfConstellationMaker.hpp:78
bool IsGeneral() const
Return if the constellation has a general design.
Definition WsfConstellationMaker.hpp:75
static std::unique_ptr< WsfConstellationMaker > CreateWalkerStar(unsigned int aNumTotalSats, unsigned int aNumPlanes, unsigned int aWalkerF)
Definition WsfConstellationMaker.cpp:111
void SetInitialAnomaly(const UtAngleValue &aInitialAnomaly)
Set the true anomaly of the zeroth member of the zeroth plane for constellations produced by this obj...
Definition WsfConstellationMaker.hpp:144
const UtAngleValue & GetInitialAnomaly() const
Get the true anomaly of the zeroth member of the zeroth plane for constellations produced by this obj...
Definition WsfConstellationMaker.hpp:114
void SetInclination(const UtAngleValue &aInclination)
Set the inclination of the orbits in constellations produced by this object.
Definition WsfConstellationMaker.hpp:138
unsigned int GetWalkerF() const
Definition WsfConstellationMaker.hpp:87
bool IsWalkerDelta() const
Return if the constellation has a Walker Delta design.
Definition WsfConstellationMaker.hpp:69
std::string Validate() const
Validate the constellation design, returning any deficiencies.
Definition WsfConstellationMaker.hpp:66
unsigned int GetSatsPerPlane() const
Return the number of members per orbital plane of constellations produced by this object.
Definition WsfConstellationMaker.hpp:84
const std::string & GetConstellationName() const
Get the name of constellations produced by this object.
Definition WsfConstellationMaker.hpp:117
WsfConstellation * Create(double aCreationTime, WsfSimulation &aSimulation, WsfScriptContext &aContext, UtScript *aFilterScriptPtr, UtScript *aSetupScriptPtr) const
Definition WsfConstellationMaker.cpp:200
double GetRevolutionsPerDay() const
Get the number of revolutions per day of orbits for constellations produced by this object.
Definition WsfConstellationMaker.hpp:105
bool IsSetup() const
Return if the constellation design is fully specified.
Definition WsfConstellationMaker.hpp:63
const UtPath & GetBasePath() const
Get the base path to any files produced by this object.
Definition WsfConstellationMaker.hpp:123
const UtAngleValue & GetInitialRAAN() const
Get the RAAN of the zeroth orbital plane for constellations produced by this object.
Definition WsfConstellationMaker.hpp:111
void SetPlatformType(const std::string &aPlatformType)
Set the type of platform for members of the constellation produced by this object.
Definition WsfConstellationMaker.hpp:150
static std::unique_ptr< WsfConstellationMaker > CreateGeneral(unsigned int aNumPlanes, unsigned int aNumSatsPerPlane, UtAngleValue aAnomalyAlias, UtAngleValue aRAAN_Range)
Definition WsfConstellationMaker.cpp:131
bool IsWalkerStar() const
Return if the constellation has a Walker Star design.
Definition WsfConstellationMaker.hpp:72
Definition WsfConstellationOptions.hpp:27
Definition WsfConstellation.hpp:25
Definition WsfScriptContext.hpp:71
The main controller for a simulation.
Definition WsfSimulation.hpp:109