mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_ADSB: correct climbRate in SageTechMXS
down vs up issue
This commit is contained in:
parent
030c34345d
commit
5984857751
@ -334,9 +334,10 @@ void AP_ADSB_Sagetech_MXS::auto_config_operating()
|
||||
|
||||
mxs_state.op.identOn = false;
|
||||
|
||||
float vertRate;
|
||||
if (AP::ahrs().get_vert_pos_rate_D(vertRate)) {
|
||||
mxs_state.op.climbRate = vertRate * SAGETECH_SCALE_M_PER_SEC_TO_FT_PER_MIN;
|
||||
float vertRateD;
|
||||
if (AP::ahrs().get_vert_pos_rate_D(vertRateD)) {
|
||||
// convert from down to up, and scale appropriately:
|
||||
mxs_state.op.climbRate = -vertRateD * SAGETECH_SCALE_M_PER_SEC_TO_FT_PER_MIN;
|
||||
mxs_state.op.climbValid = true;
|
||||
} else {
|
||||
mxs_state.op.climbValid = false;
|
||||
|
Loading…
Reference in New Issue
Block a user