Show / Hide Table of Contents

Struct GradientSlopeCalculator

Object to cover the different types of Gradient and Slope calculations

Namespace: FpAssistantCore.GeneralAviation
Assembly: FpAssistantCoreScl.dll
Syntax
public struct GradientSlopeCalculator
Remarks

There are three components which are a horizontal distance, a vertical distance and a gradient.

Constructors

View Source

GradientSlopeCalculator(LinearDistanceUnits, LinearDistanceUnits)

Constructor to initialise with a specific value and unit type

Declaration
public GradientSlopeCalculator(LinearDistanceUnits horizontalDistanceUnit, LinearDistanceUnits verticalDistanceUnit)
Parameters
Type Name Description
LinearDistanceUnits horizontalDistanceUnit

Declare the linear distance unit for the horizontal distant parameter

LinearDistanceUnits verticalDistanceUnit

Unit type of the vertical distance used in the calculations

Properties

View Source

GradientPercentage

Contains the numerical value of the gradient percentage

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

Numerical value of the percentage

View Source

HorizontalDistance

Contains the numerical value of the distance

Declaration
public LinearDistance HorizontalDistance { get; set; }
Property Value
Type Description
LinearDistance

Numerical value of the distance

View Source

SlopeDegrees

Contains the numerical value of the slope angle in degrees

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

Numerical value of the slope (Degrees)

View Source

VerticalDistance

Contains the numerical value of the change in elevation along the distance

Declaration
public LinearDistance VerticalDistance { get; set; }
Property Value
Type Description
LinearDistance

Numerical value of the change in elevation

Methods

View Source

CalculateDistance()

Declaration
public void CalculateDistance()
View Source

CalculateElevationChange()

Declaration
public void CalculateElevationChange()
View Source

CalculateGradient()

Declaration
public void CalculateGradient()
View Source

DistanceFromHeightAndPercentage(Double, Double)

Calculates a horizontal distance based on a known vertical distance and a percentage slope

Declaration
public static double DistanceFromHeightAndPercentage(double height, double percentage)
Parameters
Type Name Description
System.Double height

vertical height gain

System.Double percentage

Percentage

Returns
Type Description
System.Double

Distance along the horizontal

View Source

PercentageDistance(Double, Double)

Calculates a distance which is a percentage of another distance

Declaration
public static double PercentageDistance(double distance, double percentage)
Parameters
Type Name Description
System.Double distance

Distance for percentage calculation

System.Double percentage

Percentage

Returns
Type Description
System.Double

Value of the percentage distance

Examples

50% of 200 units is 100 units

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