Struct Altitude
Object to handle an altitude of an aircraft
Implements
Inherited Members
Namespace: FpAssistantCore.GeneralAviation
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Altitude : IEquatable<Altitude>
Remarks
Can also be used to handle Elevations
Constructors
View SourceAltitude(double, AltitudeUnits)
Constructor to initialise with a specific altitude value and unit type
Declaration
public Altitude(double altitudeValue, AltitudeUnits altitudeUnit)
Parameters
| Type | Name | Description |
|---|---|---|
| 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 |
|---|---|
| double | Numerical value of the altitude |
ValueUnit
The type of measurement unit of the altitude value
Declaration
public 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 |
|---|---|
| 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 |
Exceptions
| Type | Condition |
|---|---|
| NotImplementedException | AltitudeUnits enum value is not currently supported |
AsMetres()
Altitude represented in Metres
Declaration
public double AsMetres()
Returns
| Type | Description |
|---|---|
| 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 |
Exceptions
| Type | Condition |
|---|---|
| NotImplementedException | AltitudeUnits enum value is not currently supported |
Equals(Altitude)
Declaration
public bool Equals(Altitude other)
Parameters
| Type | Name | Description |
|---|---|---|
| Altitude | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
View SourceSubtract(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 Sourceoperator +(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 |
operator ==(Altitude, Altitude)
Declaration
public static bool operator ==(Altitude left, Altitude right)
Parameters
| Type | Name | Description |
|---|---|---|
| Altitude | left | |
| Altitude | right |
Returns
| Type | Description |
|---|---|
| bool |
operator >(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 |
|---|---|
| bool | True if altitude1 greater than altitude2 |
operator !=(Altitude, Altitude)
Declaration
public static bool operator !=(Altitude left, Altitude right)
Parameters
| Type | Name | Description |
|---|---|---|
| Altitude | left | |
| Altitude | right |
Returns
| Type | Description |
|---|---|
| bool |
operator <(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 |
|---|---|
| bool | True if altitude1 less than altitude2 |
operator -(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 |