To calculate True Air Speed (TAS) we can use the IndicatedAirSpeed object. We can also retrieve the value of the K computed component. To offer flexibility, there are two constructors both require the air speed and an altitude value with a temperature variation optional.
The air speed and altitude are objects in their own right.
AirSpeed airspeedSi = new AirSpeed(217, AirSpeedUnits.Kph);
Altitude altitude = new Altitude(2000, AltitudeUnits.Feet);
Having created an AirSpeed and Altitude we can instantiate the IndicatedAirSpeed object as follows:
IndicatedAirSpeed Ias = new IndicatedAirSpeed(airspeedSi , altitude);
Once this has been initialised, then access through properties provides the True Air Speed (TAS) and the K value.
Ias.K
Ias.TrueAirSpeed
To improve the quality of any code, where possible the SDK uses enums rather than strings hence for units of speed and altitude you can see these in the example above.
Unit testing is used to test the results of the computed TAS and K values with data coming from both ICAO Doc 8168 and FAA criteria documentation.
SDK Documentation – Click the link below:
IndicatedAirSpeed
AirSpeed
Altitude