Struct Gradient
Tool that offer a set of gradient related computations
Inherited Members
Namespace: FpAssistantCore.GeneralAviation
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Gradient
Constructors
View SourceGradient(GradientUnitTypes, double)
Constructor to initialise with a single seed value
Declaration
public Gradient(GradientUnitTypes gradientUnitType, double value)
Parameters
| Type | Name | Description |
|---|---|---|
| GradientUnitTypes | gradientUnitType | Identifies which property will be assign the initial seed value. GradientUnitTypes |
| double | value | Value that will be assigned to the property identified by GradientUnitTypes parameter |
Remarks
As all properties are connected only one value is needed for the others to be calculated
Examples
Gradient gradient = new Gradient(GradientUnitTypes.Percentage, 75);
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Invalid argument passed |
Properties
View SourceFeetPerKm
Ft/km Property
Declaration
public double FeetPerKm { get; set; }
Property Value
| Type | Description |
|---|---|
| double | Feet Per km value (Ft/km) |
FeetPerNM
Ft/NM Property
Declaration
public double FeetPerNM { get; set; }
Property Value
| Type | Description |
|---|---|
| double | Feet Per NM value (Ft/NM) |
MetresPerKm
m/km Property
Declaration
public double MetresPerKm { get; set; }
Property Value
| Type | Description |
|---|---|
| double | Metres Per km value (m/km) |
MetresPerNM
m/NM Property
Declaration
public double MetresPerNM { get; set; }
Property Value
| Type | Description |
|---|---|
| double | Metres Per NM value (m/NM) |
Percentage
Percentage Property
Declaration
public double Percentage { get; set; }
Property Value
| Type | Description |
|---|---|
| double | Percentage value |
Remarks
Must be > 0 otherwise ArgumentOutOfRangeException will be thrown
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Percentage can't be less than zero |
SeedGradientUnit
Seed unit
Declaration
public GradientUnitTypes SeedGradientUnit { get; }
Property Value
| Type | Description |
|---|---|
| GradientUnitTypes | GradientUnitTypes of the seed value |
SlopeDegrees
Slope Property
Declaration
public double SlopeDegrees { get; set; }
Property Value
| Type | Description |
|---|---|
| double | Value of the slope |
Methods
View SourceToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
View SourceToString(GradientUnitTypes)
Declaration
public string ToString(GradientUnitTypes gradientUnitType)
Parameters
| Type | Name | Description |
|---|---|---|
| GradientUnitTypes | gradientUnitType |
Returns
| Type | Description |
|---|---|
| string |
ToString(IFormatProvider, GradientUnitTypes)
Declaration
public string ToString(IFormatProvider provider, GradientUnitTypes gradientUnitType)
Parameters
| Type | Name | Description |
|---|---|---|
| IFormatProvider | provider | |
| GradientUnitTypes | gradientUnitType |
Returns
| Type | Description |
|---|---|
| string |