Class GroundObject
- Namespace
- NominalSystems.Universe
- Assembly
- NominalSystems.Universe.dll
[Nominal] Ground objects are located on the surface of celestial bodies. They are also an entity and can have components attached to them.
public class GroundObject : PhysicalObject
- Inheritance
-
GroundObject
- Derived
- Extension Methods
Constructors
GroundObject()
Default constructor
protected GroundObject()
Fields
In_SpicePlanetStateMsg
A reference to the message for the SPICE planet attached to
public SpicePlanetStateMessage? In_SpicePlanetStateMsg
Field Value
Out_GeodeticMsg
The message defining the geodetic location of the ground object relative to the planet.
public GeodeticMessage? Out_GeodeticMsg
Field Value
Out_GroundStateMsg
The Ground state message contains all the information about the current state of the ground object in inertial space.
public GroundStateMessage? Out_GroundStateMsg
Field Value
PlanetBody
A reference to the Celestial Body that is used to check whether WGS is enabled, for a non-spherical planet model being used.
[Hidden]
public CelestialBody? PlanetBody
Field Value
Properties
Altitude
The altitude that the object is located above the surface of the planet
[Unit(UnitType.METRE)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "Out_GeodeticMsg")]
public double Altitude { get; set; }
Property Value
DCM_LP
Rotation matrix from planet-centered, planet-fixed frame P to site-local topographic (SEZ) frame L coordinates
protected Matrix3 DCM_LP { get; }
Property Value
DCM_PN
Rotation matrix from inertial frame N to planet-centered to planet-fixed frame P
protected Matrix3 DCM_PN { get; }
Property Value
Latitude
The latitude that this object is located at on the surface of the planet
[Unit(UnitType.DEGREE)]
[Range(-90, 90)]
[Metadata(ContainedIn = "Out_GeodeticMsg")]
public virtual double Latitude { get; set; }
Property Value
Longitude
The longitude that this object is located at on the surface of the planet
[Unit(UnitType.DEGREE)]
[Range(-180, 180)]
[Metadata(ContainedIn = "Out_GeodeticMsg")]
public virtual double Longitude { get; set; }
Property Value
PCPF_P
Initial Ground Location to Planet origin vector in planet frame coordinates.
[Unit(UnitType.METRE)]
[ReadOnly]
[Metadata(IsAdvanced = true, ContainedIn = "Out_GeodeticMsg")]
public Vector3 PCPF_P { get; }
Property Value
Planet
The name of the planet that the ground object is located on.
[Metadata(ContainedIn = "Out_GeodeticMsg")]
public string Planet { get; set; }
Property Value
RHat_LP_N
[-] The unit vector from the ground object and planet
protected Vector3 RHat_LP_N { get; }
Property Value
R_LP_N
[m] The position between the ground object and planet in inertial frame
protected Vector3 R_LP_N { get; }
Property Value
Methods
CalculatePCPF(GeodeticElements)
[m] Calculates the PCPF coordinates from a particular LLA set of coordinates. This can be overridden for some more advanced calculations, such as a WGS one.
protected virtual Vector3 CalculatePCPF(GeodeticElements lla)
Parameters
lla
GeodeticElements[deg] The LLA value
Returns
- Vector3
[m] The PCPF position
CalculateRotation()
Calculates the rotation matrix from the planet-centered planet-fixed frame that will be relative to the inertial origin.
protected virtual DCM CalculateRotation()
Returns
- DCM
The DCM
OnCreate()
Called when the 'Component' is created from the controller.
protected override void OnCreate()
OnLoad(double)
Called after all of the data has been loaded from a save state on this object. This enables any post-load operations to be performed and extra data to be loaded from the metadata.
protected override void OnLoad(double time)
Parameters
time
double[s] The current clock time of the simulation
OnUpdate(double, double)
Called when the object should update from the simulation tick. This will take in a time and a step, where the time is the time of the clock before updating the object.
protected override void OnUpdate(double time, double step)
Parameters
time
double[s] Current time of the simulation before the update
step
double[s] The time-step to update during this tick
SetGroundPosition(Vector3)
Sets the position of the ground object relative to the planet. This will update the PCPF value and the inertial coordinates. This will be relative to the planet and with the planet's rotation.
public virtual void SetGroundPosition(Vector3 position)
Parameters
position
Vector3[m] The planet centered planet fixed position
SetLocation(double, double, double, string)
Updates the location of the ground body relative to the planet. If the location needs to be changed during the runtime, this function should be called and not the updating of the fields.
public virtual void SetLocation(double latitude, double longitude, double altitude, string planet = "earth")
Parameters
latitude
double[deg] Latitude of the body
longitude
double[deg] Longitude of the body
altitude
double[m] Altitude of the body
planet
string[-] The name of the stationed body
UpdateInertialCoordinates()
Updates the inertial coordinates of the ground body in relation to the planet.
protected void UpdateInertialCoordinates()