mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 11:53:33 +08:00
AirspeedSelector: add synthetic airspeed option
Synthetic airspeed is calculated based on the thrust setpoint and the thrust<->airpseed model as configured in the parameters.
This commit is contained in:
committed by
Silvan Fuhrer
parent
c3c863ad95
commit
5842c991ec
@@ -214,3 +214,8 @@ float calc_calibrated_from_true_airspeed(float speed_true, float air_density)
|
||||
{
|
||||
return speed_true * sqrtf(air_density / kAirDensitySeaLevelStandardAtmos);
|
||||
}
|
||||
|
||||
float calc_true_from_calibrated_airspeed(float speed_calibrated, float air_density)
|
||||
{
|
||||
return speed_calibrated * sqrtf(kAirDensitySeaLevelStandardAtmos / air_density);
|
||||
}
|
||||
|
||||
@@ -137,6 +137,8 @@ __EXPORT float calc_TAS(float total_pressure, float static_pressure, float tempe
|
||||
*/
|
||||
__EXPORT float calc_calibrated_from_true_airspeed(float speed_true, float air_density);
|
||||
|
||||
__EXPORT float calc_true_from_calibrated_airspeed(float speed_calibrated, float air_density);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -142,5 +142,13 @@ param_modify_on_import_ret param_modify_on_import(bson_node_t node)
|
||||
}
|
||||
}
|
||||
|
||||
// 2025-03-19: translate ASPD_FALLBACK_GW to ASPD_FALLBACK
|
||||
{
|
||||
if (strcmp("ASPD_FALLBACK_GW", node->name) == 0) {
|
||||
strcpy(node->name, "ASPD_FALLBACK");
|
||||
PX4_INFO("copying %s -> %s", "ASPD_FALLBACK_GW", "ASPD_FALLBACK");
|
||||
}
|
||||
}
|
||||
|
||||
return param_modify_on_import_ret::PARAM_NOT_MODIFIED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user