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:
Marco Hauswirth
2025-05-02 13:37:18 +02:00
committed by Silvan Fuhrer
parent c3c863ad95
commit 5842c991ec
14 changed files with 222 additions and 56 deletions
+5
View File
@@ -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);
}
+2
View File
@@ -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
+8
View File
@@ -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;
}