Struct Altitude
Object to handle an altitude of an aircraft
Implements
Namespace: FpAssistantCore.GeneralAviation
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Altitude
Remarks
Can also be used to handle Elevations
Constructors
View SourceAltitude(Double, AltitudeUnits)
Constructor to initalise with a specific altitude value and unit type
Declaration
public Altitude(double altitudeValue, AltitudeUnits altitudeUnit)
Parameters
Type | Name | Description |
---|---|---|
System.Double | altitudeValue | Numerical value of the altitude |
AltitudeUnits | altitudeUnit | Unit type of the altitude |
Properties
View SourceValue
Contains the numerical value of the altitude
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Numerical value of the altitude |
ValueUnit
The type of measurement unit of the altitude value
Declaration
public readonly AltitudeUnits ValueUnit { get; }
Property Value
Type | Description |
---|---|
AltitudeUnits | Enum value of the assigned unit |
Methods
View SourceAdd(Altitude, Altitude)
Operator Addition of two Altitude objects
Declaration
public static Altitude Add(Altitude altitude1, Altitude altitude2)
Parameters
Type | Name | Description |
---|---|---|
Altitude | altitude1 | First operand |
Altitude | altitude2 | Second operand |
Returns
Type | Description |
---|---|
Altitude | Value of Addition in units of first operand |
AsFeet()
Altitude represented in Feet
Declaration
public double AsFeet()
Returns
Type | Description |
---|---|
System.Double | Foot value |
AsLinearDistance()
Altitude represented in LinearDistance object
Declaration
public LinearDistance AsLinearDistance()
Returns
Type | Description |
---|---|
LinearDistance | Value of altitude returned as LinearDistance object type |
See Also
View SourceAsLinearDistanceUnits(AltitudeUnits)
Altitude unit represented in LinearDistance unit type
Declaration
public static LinearDistanceUnits AsLinearDistanceUnits(AltitudeUnits altitudeUnit)
Parameters
Type | Name | Description |
---|---|---|
AltitudeUnits | altitudeUnit |
Returns
Type | Description |
---|---|
LinearDistanceUnits | Value of altitude unit returned as LinearDistance unit type |
AsMetres()
Altitude represented in Metres
Declaration
public double AsMetres()
Returns
Type | Description |
---|---|
System.Double | Metres value |
ConvertTo(AltitudeUnits)
Converts the current object to another type of unit
Declaration
public Altitude ConvertTo(AltitudeUnits altitudeUnitConvertTo)
Parameters
Type | Name | Description |
---|---|---|
AltitudeUnits | altitudeUnitConvertTo |
Returns
Type | Description |
---|---|
Altitude | Altitude object in requested measurement unit |
Equals(Altitude)
Declaration
public bool Equals(Altitude other)
Parameters
Type | Name | Description |
---|---|---|
Altitude | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Subtract(Altitude, Altitude)
Operator Subtraction of two Altitude objects
Declaration
public static Altitude Subtract(Altitude altitude1, Altitude altitude2)
Parameters
Type | Name | Description |
---|---|---|
Altitude | altitude1 | First operand |
Altitude | altitude2 | Second operand |
Returns
Type | Description |
---|---|
Altitude | Value of Subtraction in units of first operand |
Operators
View SourceAddition(Altitude, Altitude)
Operator Addition of two Altitude objects
Declaration
public static Altitude operator +(Altitude altitude1, Altitude altitude2)
Parameters
Type | Name | Description |
---|---|---|
Altitude | altitude1 | First operand |
Altitude | altitude2 | Second operand |
Returns
Type | Description |
---|---|
Altitude | Value of Addition in units of first operand |
Equality(Altitude, Altitude)
Declaration
public static bool operator ==(Altitude left, Altitude right)
Parameters
Type | Name | Description |
---|---|---|
Altitude | left | |
Altitude | right |
Returns
Type | Description |
---|---|
System.Boolean |
GreaterThan(Altitude, Altitude)
Operator Greater Than of two Altitude objects
Declaration
public static bool operator>(Altitude altitude1, Altitude altitude2)
Parameters
Type | Name | Description |
---|---|---|
Altitude | altitude1 | First operand |
Altitude | altitude2 | Second operand |
Returns
Type | Description |
---|---|
System.Boolean | True if altitude1 greater than altitude2 |
Inequality(Altitude, Altitude)
Declaration
public static bool operator !=(Altitude left, Altitude right)
Parameters
Type | Name | Description |
---|---|---|
Altitude | left | |
Altitude | right |
Returns
Type | Description |
---|---|
System.Boolean |
LessThan(Altitude, Altitude)
Operator Less Than of two Altitude objects
Declaration
public static bool operator <(Altitude altitude1, Altitude altitude2)
Parameters
Type | Name | Description |
---|---|---|
Altitude | altitude1 | First operand |
Altitude | altitude2 | Second operand |
Returns
Type | Description |
---|---|
System.Boolean | True if altitude1 less than altitude2 |
Subtraction(Altitude, Altitude)
Operator Subtraction of two Altitude objects
Declaration
public static Altitude operator -(Altitude altitude1, Altitude altitude2)
Parameters
Type | Name | Description |
---|---|---|
Altitude | altitude1 | First operand |
Altitude | altitude2 | Second operand |
Returns
Type | Description |
---|---|
Altitude | Value of Subtraction in units of first operand |