forked from Archive/PX4-Autopilot
Merge remote-tracking branch 'upstream/master' into hott-esc
This commit is contained in:
commit
1a408431e1
|
@ -282,7 +282,7 @@ void tune_error(void)
|
||||||
|
|
||||||
void do_rc_calibration(int status_pub, struct vehicle_status_s *status)
|
void do_rc_calibration(int status_pub, struct vehicle_status_s *status)
|
||||||
{
|
{
|
||||||
if (current_status.offboard_control_signal_lost) {
|
if (current_status.rc_signal_lost) {
|
||||||
mavlink_log_critical(mavlink_fd, "TRIM CAL: ABORT. No RC signal.");
|
mavlink_log_critical(mavlink_fd, "TRIM CAL: ABORT. No RC signal.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ float calc_indicated_airspeed(float differential_pressure)
|
||||||
if (differential_pressure > 0) {
|
if (differential_pressure > 0) {
|
||||||
return sqrtf((2.0f*differential_pressure) / CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C);
|
return sqrtf((2.0f*differential_pressure) / CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C);
|
||||||
} else {
|
} else {
|
||||||
return -sqrtf((2.0f*fabs(differential_pressure)) / CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C);
|
return -sqrtf((2.0f*fabsf(differential_pressure)) / CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -106,6 +106,6 @@ float calc_true_airspeed(float total_pressure, float static_pressure, float temp
|
||||||
return sqrtf((2.0f*(pressure_difference)) / density);
|
return sqrtf((2.0f*(pressure_difference)) / density);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
return -sqrtf((2.0f*fabs(pressure_difference)) / density);
|
return -sqrtf((2.0f*fabsf(pressure_difference)) / density);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue