Browse Source

AP_Math: add KELVIN_TO_C define

gps-1.3.1
Peter Barker 3 years ago committed by Peter Barker
parent
commit
e988bf9046
  1. 4
      libraries/AP_Math/definitions.h

4
libraries/AP_Math/definitions.h

@ -72,7 +72,9 @@ static const double WGS84_B = (WGS84_A * (1 - WGS84_F)); @@ -72,7 +72,9 @@ static const double WGS84_B = (WGS84_A * (1 - WGS84_F));
static const double WGS84_E = (sqrt(2 * WGS84_F - WGS84_F * WGS84_F));
#endif
#define C_TO_KELVIN 273.15f
#define C_TO_KELVIN(temp) (temp + 273.15f)
#define KELVIN_TO_C(temp) (temp - 273.15f)
#define F_TO_KELVIN(temp) C_TO_KELVIN(((temp - 32) * 5/9))
#define M_PER_SEC_TO_KNOTS 1.94384449f
#define KNOTS_TO_M_PER_SEC (1/M_PER_SEC_TO_KNOTS)

Loading…
Cancel
Save