Class HUD_Airspeed
Aircraft HUD instrument displaying airspeed using a rotating hand indicator.
Namespace: NWH.Aerodynamics.AircraftController.Instruments
Assembly: NWH.Aerodynamics.dll
Syntax
public class HUD_Airspeed : HUD_Instrument
Fields
| Edit this page View SourceclockwiseRotation
When true, hand rotates clockwise with increasing airspeed (typical for aircraft instruments).
Declaration
[Tooltip("If true angle will be lerped in clockwise fashion which is usual for most aircraft.")]
public bool clockwiseRotation
Field Value
| Type | Description |
|---|---|
| bool |
hand
Transform representing the rotating hand indicator.
Declaration
[Tooltip("Hand / indicator for the airspeed.")]
public Transform hand
Field Value
| Type | Description |
|---|---|
| Transform |
maxAirspeed
Maximum airspeed value (in knots) corresponding to maxSpeedRotation.
Declaration
[Tooltip("Maximum indicated airspeed. Corresponds to maxSpeedRotation.")]
public float maxAirspeed
Field Value
| Type | Description |
|---|---|
| float |
maxSpeedRotation
Hand rotation when displaying maxAirspeed.
Declaration
[Tooltip("Rotation of the hand at maxAirspeed.")]
public Quaternion maxSpeedRotation
Field Value
| Type | Description |
|---|---|
| Quaternion |
minAirspeed
Minimum airspeed value (in knots) corresponding to minSpeedRotation.
Declaration
[Tooltip("Minimum indicated airspeed. Corresponds to minSpeedRotation.")]
public float minAirspeed
Field Value
| Type | Description |
|---|---|
| float |
minSpeedRotation
Hand rotation when displaying minAirspeed.
Declaration
[Tooltip("Rotation of the hand at minAirspeed.")]
public Quaternion minSpeedRotation
Field Value
| Type | Description |
|---|---|
| Quaternion |
Methods
| Edit this page View SourceAwake()
Declaration
public override void Awake()
Overrides
| Edit this page View SourceGetCurrentRotation()
Returns the current rotation of the hand indicator.
Declaration
public Quaternion GetCurrentRotation()
Returns
| Type | Description |
|---|---|
| Quaternion | Current hand rotation |
GetRotationForAirspeed(float)
Calculates hand rotation for a given airspeed value.
Declaration
public Quaternion GetRotationForAirspeed(float airspeedKTS)
Parameters
| Type | Name | Description |
|---|---|---|
| float | airspeedKTS | Airspeed in knots |
Returns
| Type | Description |
|---|---|
| Quaternion | Rotation for the hand at the given airspeed |
Update()
Declaration
public override void Update()