PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Go to the source code of this file.
Functions | |
float | calc_IAS_corrected (enum AIRSPEED_COMPENSATION_MODEL pmodel, enum AIRSPEED_SENSOR_MODEL smodel, float tube_len, float tube_dia_mm, float differential_pressure, float pressure_ambient, float temperature_celsius) |
Calculate indicated airspeed. More... | |
float | calc_IAS (float differential_pressure) |
Calculate indicated airspeed (IAS). More... | |
float | calc_TAS_from_EAS (float speed_equivalent, float pressure_ambient, float temperature_celsius) |
Calculate true airspeed (TAS) from equivalent airspeed (EAS). More... | |
float | calc_EAS_from_IAS (float speed_indicated, float scale) |
Calculate equivalent airspeed (EAS) from indicated airspeed (IAS). More... | |
float | calc_TAS (float total_pressure, float static_pressure, float temperature_celsius) |
Directly calculate true airspeed (TAS) More... | |
float | get_air_density (float static_pressure, float temperature_celsius) |
Calculates air density. More... | |
float | calc_EAS_from_TAS (float speed_true, float pressure_ambient, float temperature_celsius) |
Calculate equivalent airspeed (EAS) from true airspeed (TAS). More... | |
float calc_EAS_from_IAS | ( | float | speed_indicated, |
float | scale | ||
) |
Calculate equivalent airspeed (EAS) from indicated airspeed (IAS).
Note that we neglect the conversion from CAS (calibrated airspeed) to EAS.
speed_indicated | current indicated airspeed |
scale | scale from IAS to CAS (accounting for instrument and pitot position erros) |
Definition at line 232 of file airspeed.cpp.
Referenced by MavlinkReceiver::handle_message_hil_sensor(), and AirspeedValidator::update_EAS_TAS().
float calc_EAS_from_TAS | ( | float | speed_true, |
float | pressure_ambient, | ||
float | temperature_celsius | ||
) |
Calculate equivalent airspeed (EAS) from true airspeed (TAS).
It is the inverse function to calc_TAS_from_EAS()
speed_true | current true airspeed |
pressure_ambient | pressure at the side of the tube/airplane |
temperature_celsius | air temperature in degrees celcius |
Definition at line 282 of file airspeed.cpp.
References CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C, and get_air_density().
Referenced by AirspeedModule::update_ground_minus_wind_airspeed().
float calc_IAS | ( | float | differential_pressure | ) |
Calculate indicated airspeed (IAS).
Note that the indicated airspeed is not the true airspeed because it lacks the air density and instrument error compensation.
differential_pressure | total_ pressure - static pressure |
Definition at line 195 of file airspeed.cpp.
References CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C, and f().
Referenced by MavlinkReceiver::handle_message_hil_sensor().
float calc_IAS_corrected | ( | enum AIRSPEED_COMPENSATION_MODEL | pmodel, |
enum AIRSPEED_SENSOR_MODEL | smodel, | ||
float | tube_len, | ||
float | tube_dia_mm, | ||
float | differential_pressure, | ||
float | pressure_ambient, | ||
float | temperature_celsius | ||
) |
Calculate indicated airspeed.
Calculate indicated airspeed (IAS).
Note that the indicated airspeed is not the true airspeed because it lacks the air density compensation. Use the calc_true_airspeed functions to get the true airspeed.
differential_pressure | total_ pressure - static pressure |
Definition at line 58 of file airspeed.cpp.
References AIRSPEED_COMPENSATION_MODEL_NO_PITOT, AIRSPEED_COMPENSATION_MODEL_PITOT, AIRSPEED_COMPENSATION_TUBE_PRESSURE_LOSS, AIRSPEED_SENSOR_MODEL_MEMBRANE, AIRSPEED_SENSOR_MODEL_SDP3X, CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C, f(), get_air_density(), and M_PI_F.
Referenced by Sensors::diff_pres_poll().
float calc_TAS | ( | float | total_pressure, |
float | static_pressure, | ||
float | temperature_celsius | ||
) |
Directly calculate true airspeed (TAS)
Here we assume to have no instrument or pitot position error (IAS = CAS), and neglect the CAS to EAS conversion (CAS = EAS). Note that the true airspeed is NOT the groundspeed, because of the effects of wind.
total_pressure | pressure inside the pitot/prandtl tube |
static_pressure | pressure at the side of the tube/airplane |
temperature_celsius | air temperature in degrees celcius |
Definition at line 249 of file airspeed.cpp.
References CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C, f(), and get_air_density().
float calc_TAS_from_EAS | ( | float | speed_equivalent, |
float | pressure_ambient, | ||
float | temperature_celsius | ||
) |
Calculate true airspeed (TAS) from equivalent airspeed (EAS).
Note that the true airspeed is NOT the groundspeed, because of the effects of wind
speed_equivalent | current equivalent airspeed |
pressure_ambient | pressure at the side of the tube/airplane |
temperature_celsius | air temperature in degrees celcius |
Definition at line 218 of file airspeed.cpp.
References CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C, and get_air_density().
Referenced by Sensors::diff_pres_poll(), MavlinkReceiver::handle_message_hil_sensor(), and AirspeedValidator::update_EAS_TAS().
float get_air_density | ( | float | static_pressure, |
float | temperature_celsius | ||
) |
Calculates air density.
static_pressure | ambient pressure in millibar |
temperature_celcius | air / ambient temperature in celcius |
Definition at line 267 of file airspeed.cpp.
References CONSTANTS_ABSOLUTE_NULL_CELSIUS, and CONSTANTS_AIR_GAS_CONST.
Referenced by calc_EAS_from_TAS(), calc_IAS_corrected(), calc_TAS(), and calc_TAS_from_EAS().