Show / Hide Table of Contents

Struct Altitude

Object to handle an altitude of an aircraft

Implements
IEquatable<Altitude>
Namespace: FpAssistantCore.GeneralAviation
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Altitude
Remarks

Can also be used to handle Elevations

Constructors

View Source

Altitude(Double, AltitudeUnits)

Constructor to initialise 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 Source

Value

Contains the numerical value of the altitude

Declaration
public double Value { get; set; }
Property Value
Type Description
System.Double

Numerical value of the altitude

View Source

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 Source

Add(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

View Source

AsFeet()

Altitude represented in Feet

Declaration
public double AsFeet()
Returns
Type Description
System.Double

Foot value

View Source

AsLinearDistance()

Altitude represented in LinearDistance object

Declaration
public LinearDistance AsLinearDistance()
Returns
Type Description
LinearDistance

Value of altitude returned as LinearDistance object type

See Also
LinearDistance
View Source

AsLinearDistanceUnits(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

View Source

AsMetres()

Altitude represented in Metres

Declaration
public double AsMetres()
Returns
Type Description
System.Double

Metres value

View Source

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

View Source

Equals(Altitude)

Declaration
public bool Equals(Altitude other)
Parameters
Type Name Description
Altitude other
Returns
Type Description
System.Boolean
View Source

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
View Source

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 Source

Addition(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

View Source

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
View Source

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

View Source

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
View Source

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

View Source

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

Implements

IEquatable<>
  • View Source
In This Article
Back to top Copyright 2018-2024 CADology Limited