WSF
WsfConstellationMaker Class Reference

#include <WsfConstellationMaker.hpp>

Public Member Functions

void WriteToFile () const
WsfConstellationCreate (double aCreationTime, WsfSimulation &aSimulation, WsfScriptContext &aContext, UtScript *aFilterScriptPtr, UtScript *aSetupScriptPtr) const
bool DetectConjunction () const
bool IsSetup () const
 Return if the constellation design is fully specified.
std::string Validate () const
 Validate the constellation design, returning any deficiencies.
bool IsWalkerDelta () const
 Return if the constellation has a Walker Delta design.
bool IsWalkerStar () const
 Return if the constellation has a Walker Star design.
bool IsGeneral () const
 Return if the constellation has a general design.
unsigned int GetNumTotalSats () const
 Return the total number of members of constellations produced by this object.
unsigned int GetNumPlanes () const
 Return the number of orbital planes of constellations produced by this object.
unsigned int GetSatsPerPlane () const
 Return the number of members per orbital plane of constellations produced by this object.
unsigned int GetWalkerF () const
const UtAngleValue & GetAnomalyAlias () const
 Return the inter-plane phasing angle of constellations produced by this object.
const UtAngleValue & GetRAAN_Range () const
 Return the range in RAAN over which the orbital planes are distributed for constellations produced by this object.
const UtLengthValue & GetSemiMajorAxis () const
 Get the semi-major axis of the orbits for constellations produced by this object.
const UtLengthValue & GetCircularAltitude () const
 Get the circular altitude of the orbits for constellations produced by this object.
const UtTimeValue & GetOrbitalPeriod () const
 Get the period of orbits for constellations produced by this object.
double GetRevolutionsPerDay () const
 Get the number of revolutions per day of orbits for constellations produced by this object.
const UtAngleValue & GetInclination () const
 Get the inclination of orbits for constellations produced by this object.
const UtAngleValue & GetInitialRAAN () const
 Get the RAAN of the zeroth orbital plane for constellations produced by this object.
const UtAngleValue & GetInitialAnomaly () const
 Get the true anomaly of the zeroth member of the zeroth plane for constellations produced by this object.
const std::string & GetConstellationName () const
 Get the name of constellations produced by this object.
const std::string & GetPlatformType () const
 Get the type of platforms for constellations produced by this object.
const UtPath & GetBasePath () const
 Get the base path to any files produced by this object.
void SetSemiMajorAxis (const UtLengthValue &aSemiMajorAxis)
 Set the semi-major axis of the orbits for constellations produced by this object.
void SetCircularAltitude (const UtLengthValue &aCircularAltitude)
 Set the circular altitude of the orbits for constellations produced by this object.
void SetOrbitalPeriod (const UtTimeValue &aOrbitalPeriod)
 Set the period of the orbits for constellations produces by this object.
void SetRevolutionsPerDay (double aRevolutionsPerDay)
 Set the number of revolutions per day for orbits for constellations produced by this object.
void SetInclination (const UtAngleValue &aInclination)
 Set the inclination of the orbits in constellations produced by this object.
void SetInitialRAAN (const UtAngleValue &aInitialRAAN)
 Set the RAAN of the zeroth orbital plane for constellations produced by this object.
void SetInitialAnomaly (const UtAngleValue &aInitialAnomaly)
 Set the true anomaly of the zeroth member of the zeroth plane for constellations produced by this object.
void SetConstellationName (const std::string &aName)
 Set the name of constellations produced by this object.
void SetPlatformType (const std::string &aPlatformType)
 Set the type of platform for members of the constellation produced by this object.
void SetBasePath (const UtPath &aBasePath)
 Set the base path to any files generated by this object.

Static Public Member Functions

static std::unique_ptr< WsfConstellationMakerCreateWalkerDelta (unsigned int aNumTotalSats, unsigned int aNumPlanes, unsigned int aWalkerF)
static std::unique_ptr< WsfConstellationMakerCreateWalkerStar (unsigned int aNumTotalSats, unsigned int aNumPlanes, unsigned int aWalkerF)
static std::unique_ptr< WsfConstellationMakerCreateGeneral (unsigned int aNumPlanes, unsigned int aNumSatsPerPlane, UtAngleValue aAnomalyAlias, UtAngleValue aRAAN_Range)

Detailed Description

This object can be used to create constellations.

This object is used to create WsfConstellation objects, or to write an input file that when included in a scenario would create a constellation. There are three broad possibilities for the design of the constellation: a General a Walker Delta, or a Walker Star. Because a few parameters of the design have some interrelationships, this object is only constructed through static methods that allow for those relationships to hold. The basic parameters of created instances of this object are immutable. The remaining parameters of the constellation design are set with member methods. Once the constellation design is completed, this object is then used to actually create the constellation in one of the supported forms.

Member Function Documentation

◆ Create()

WsfConstellation * WsfConstellationMaker::Create ( double aCreationTime,
WsfSimulation & aSimulation,
WsfScriptContext & aContext,
UtScript * aFilterScriptPtr,
UtScript * aSetupScriptPtr ) const

Create the constellation and add it to the simulation.

This will create the constellation with options represented by this object. Before instantiating the platforms that make up the constellation, the script aFilterScript is called for each member allowing individual members of the constellation to be filtered out when adding the platforms to the simulation. This filtering is not performed if aFilterScript is null. Once the platforms are instantiated and added to the simulation, then the script aSetupScript is called to allow the user to make any changes to the platforms immediately after their addition to the simulation. This setup operation is not performed if aSetupScript is null. The constellation so created will be added to the collection maintained by the WsfConstellationManager. Any errors in the process of instantiating the constellation will result in a std::runtime_error being thrown, and any platforms that have been added to the simulation before the error will be removed from the simulation.

Parameters
aCreationTime- The time at which the platforms will be added to the simulation.
aSimulation- The simulation to which the platforms will be added.
aContext- The script context leading to this method invocation.
aFilterScriptPtr- A script used to filter members before adding the members to the simulation.
aSetupScriptPtr- A script used to setup the members of the constellation after being added to the simulation.

◆ CreateGeneral()

std::unique_ptr< WsfConstellationMaker > WsfConstellationMaker::CreateGeneral ( unsigned int aNumPlanes,
unsigned int aNumSatsPerPlane,
UtAngleValue aAnomalyAlias,
UtAngleValue aRAAN_Range )
static

Create a General design constellation maker.

Parameters
aNumPlanes- The number of orbital planes in the constellation.
aNumSatsPerPlane- The number of members per plane.
aAnomalyAlias- The inter-plane phasing.
aRAAN_Range- The range of RAAN over which the orbital planes are distributed.
Returns
- A new constellation maker object.

References WsfConstellationOptions::CreateGeneral(), and WsfConstellationOptions::IsGeneral().

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ CreateWalkerDelta()

std::unique_ptr< WsfConstellationMaker > WsfConstellationMaker::CreateWalkerDelta ( unsigned int aNumTotalSats,
unsigned int aNumPlanes,
unsigned int aWalkerF )
static

Create a Walker Delta constellation maker.

This method creates a constellation maker object that can be used to create constellations with a Walker Delta design. If the aNumTotalSats is not evenly divisible by aNumPlanes, or if aWalkerF is not less than aNumPlanes, then this will return a null object, and will have the side-effect of printing out an error message indicating how the input arguments are invalid.

Parameters
aNumTotalSats- The total number of satellites in the constellation.
aNumPlanes- The number of orbital planes in the constellation.
aWalkerF- The inter-plane phasing of the constellation.
Returns
- A new constellation maker object, or nullptr if there is a domain error.

References WsfConstellationOptions::CreateWalkerDelta(), and WsfConstellationOptions::IsWalkerDelta().

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ CreateWalkerStar()

std::unique_ptr< WsfConstellationMaker > WsfConstellationMaker::CreateWalkerStar ( unsigned int aNumTotalSats,
unsigned int aNumPlanes,
unsigned int aWalkerF )
static

Create a Walker Star constellation maker.

This method creates a constellation maker object that can be used to create constellations with a Walker Delta design. If the aNumTotalSats is not evenly divisible by aNumPlanes, or if aWalkerF is not less than aNumPlanes, then this will return a null object, and will have the side-effect of printing out an error message indicating how the input arguments are invalid.

Parameters
aNumTotalSats- The total number of satellites in the constellation.
aNumPlanes- The number of orbital planes in the constellation.
aWalkerF- The inter-plane phasing of the constellation.
Returns
- A new constellation maker object, or nullptr is there is a domain error.

References WsfConstellationOptions::CreateWalkerStar(), and WsfConstellationOptions::IsWalkerStar().

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ DetectConjunction()

bool WsfConstellationMaker::DetectConjunction ( ) const

Detect if a constellation design will lead to a conjunction.

This method will detect is a constellation design will lead to a conjunction. If this constellation maker is not completely setup, then this will throw a runtime_error with a message that indicates which parameters are not in their allowed range.

Returns
- true if the design would lead to a conjunction; false otherwise.

References wsf::space::ConstellationConjunction::Assess().

◆ GetAnomalyAlias()

const UtAngleValue & WsfConstellationMaker::GetAnomalyAlias ( ) const
inline

Return the inter-plane phasing angle of constellations produced by this object.

◆ GetBasePath()

const UtPath & WsfConstellationMaker::GetBasePath ( ) const
inline

Get the base path to any files produced by this object.

◆ GetCircularAltitude()

const UtLengthValue & WsfConstellationMaker::GetCircularAltitude ( ) const
inline

Get the circular altitude of the orbits for constellations produced by this object.

◆ GetConstellationName()

const std::string & WsfConstellationMaker::GetConstellationName ( ) const
inline

Get the name of constellations produced by this object.

◆ GetInclination()

const UtAngleValue & WsfConstellationMaker::GetInclination ( ) const
inline

Get the inclination of orbits for constellations produced by this object.

◆ GetInitialAnomaly()

const UtAngleValue & WsfConstellationMaker::GetInitialAnomaly ( ) const
inline

Get the true anomaly of the zeroth member of the zeroth plane for constellations produced by this object.

◆ GetInitialRAAN()

const UtAngleValue & WsfConstellationMaker::GetInitialRAAN ( ) const
inline

Get the RAAN of the zeroth orbital plane for constellations produced by this object.

◆ GetNumPlanes()

unsigned int WsfConstellationMaker::GetNumPlanes ( ) const
inline

Return the number of orbital planes of constellations produced by this object.

◆ GetNumTotalSats()

unsigned int WsfConstellationMaker::GetNumTotalSats ( ) const
inline

Return the total number of members of constellations produced by this object.

◆ GetOrbitalPeriod()

const UtTimeValue & WsfConstellationMaker::GetOrbitalPeriod ( ) const
inline

Get the period of orbits for constellations produced by this object.

◆ GetPlatformType()

const std::string & WsfConstellationMaker::GetPlatformType ( ) const
inline

Get the type of platforms for constellations produced by this object.

◆ GetRAAN_Range()

const UtAngleValue & WsfConstellationMaker::GetRAAN_Range ( ) const
inline

Return the range in RAAN over which the orbital planes are distributed for constellations produced by this object.

◆ GetRevolutionsPerDay()

double WsfConstellationMaker::GetRevolutionsPerDay ( ) const
inline

Get the number of revolutions per day of orbits for constellations produced by this object.

◆ GetSatsPerPlane()

unsigned int WsfConstellationMaker::GetSatsPerPlane ( ) const
inline

Return the number of members per orbital plane of constellations produced by this object.

◆ GetSemiMajorAxis()

const UtLengthValue & WsfConstellationMaker::GetSemiMajorAxis ( ) const
inline

Get the semi-major axis of the orbits for constellations produced by this object.

◆ GetWalkerF()

unsigned int WsfConstellationMaker::GetWalkerF ( ) const
inline

◆ IsGeneral()

bool WsfConstellationMaker::IsGeneral ( ) const
inline

Return if the constellation has a general design.

◆ IsSetup()

bool WsfConstellationMaker::IsSetup ( ) const
inline

Return if the constellation design is fully specified.

◆ IsWalkerDelta()

bool WsfConstellationMaker::IsWalkerDelta ( ) const
inline

Return if the constellation has a Walker Delta design.

◆ IsWalkerStar()

bool WsfConstellationMaker::IsWalkerStar ( ) const
inline

Return if the constellation has a Walker Star design.

◆ SetBasePath()

void WsfConstellationMaker::SetBasePath ( const UtPath & aBasePath)
inline

Set the base path to any files generated by this object.

◆ SetCircularAltitude()

void WsfConstellationMaker::SetCircularAltitude ( const UtLengthValue & aCircularAltitude)
inline

Set the circular altitude of the orbits for constellations produced by this object.

◆ SetConstellationName()

void WsfConstellationMaker::SetConstellationName ( const std::string & aName)
inline

Set the name of constellations produced by this object.

◆ SetInclination()

void WsfConstellationMaker::SetInclination ( const UtAngleValue & aInclination)
inline

Set the inclination of the orbits in constellations produced by this object.

◆ SetInitialAnomaly()

void WsfConstellationMaker::SetInitialAnomaly ( const UtAngleValue & aInitialAnomaly)
inline

Set the true anomaly of the zeroth member of the zeroth plane for constellations produced by this object.

◆ SetInitialRAAN()

void WsfConstellationMaker::SetInitialRAAN ( const UtAngleValue & aInitialRAAN)
inline

Set the RAAN of the zeroth orbital plane for constellations produced by this object.

◆ SetOrbitalPeriod()

void WsfConstellationMaker::SetOrbitalPeriod ( const UtTimeValue & aOrbitalPeriod)
inline

Set the period of the orbits for constellations produces by this object.

◆ SetPlatformType()

void WsfConstellationMaker::SetPlatformType ( const std::string & aPlatformType)
inline

Set the type of platform for members of the constellation produced by this object.

◆ SetRevolutionsPerDay()

void WsfConstellationMaker::SetRevolutionsPerDay ( double aRevolutionsPerDay)
inline

Set the number of revolutions per day for orbits for constellations produced by this object.

◆ SetSemiMajorAxis()

void WsfConstellationMaker::SetSemiMajorAxis ( const UtLengthValue & aSemiMajorAxis)
inline

Set the semi-major axis of the orbits for constellations produced by this object.

◆ Validate()

std::string WsfConstellationMaker::Validate ( ) const
inline

Validate the constellation design, returning any deficiencies.

◆ WriteToFile()

void WsfConstellationMaker::WriteToFile ( ) const

Render a constellation into an input file.

This will create an AFSIM input file in which are placed the commands needed to instantiate the constellation in a scenario. If there are any errors during this operation, this will throw an runtime_error with details of the error.

References wsf::space::ConstellationGenerator::Generate().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved