Skip to content

Commit

Permalink
CurrentState: add GlideRatio and verticalspeed_fpm #2193
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Aug 9, 2019
1 parent 19a8b3a commit a823ed1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ExtLibs/ArduPilot/CurrentState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ public float crit_AOA
float _airspeed;
float _groundspeed;
float _verticalspeed;
float _verticalspeed_fpm;

[DisplayText("Vertical Speed (speed)")]
public float verticalspeed
Expand All @@ -564,6 +565,20 @@ public float verticalspeed
set { _verticalspeed = _verticalspeed * 0.4f + value * 0.6f; }
}

[DisplayText("Vertical Speed (fpm)")]
public double verticalspeed_fpm
{
get
{
return vz * -3.28084;
}
}

[DisplayText("Glide Ratio")]
public double glide_ratio
{
get { var hor = Math.Sqrt(vx * vx + vy * vy); return hor / vz; }
}

//nav state
[DisplayText("Roll Target (deg)")]
Expand Down

0 comments on commit a823ed1

Please sign in to comment.