mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-08 13:10:34 +08:00
stop manually defining physical constants
This commit is contained in:
committed by
Lorenz Meier
parent
7538ea44e3
commit
d75fd72c02
@@ -32,7 +32,7 @@
|
||||
############################################################################
|
||||
|
||||
set(SRCS
|
||||
airspeed.c
|
||||
airspeed.cpp
|
||||
battery.cpp
|
||||
board_serial.c
|
||||
bson/tinybson.c
|
||||
|
||||
@@ -236,7 +236,7 @@ float calc_true_airspeed(float total_pressure, float static_pressure, float temp
|
||||
{
|
||||
float density = get_air_density(static_pressure, temperature_celsius);
|
||||
|
||||
if (density < 0.0001f || !isfinite(density)) {
|
||||
if (density < 0.0001f || !PX4_ISFINITE(density)) {
|
||||
density = CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user