From d3ee4ebf6454614130054edca653bed418818fe7 Mon Sep 17 00:00:00 2001 From: Reilly Callaway Date: Wed, 30 Mar 2022 14:07:15 +1100 Subject: [PATCH] AP_Math: Add kg/m^3 to g/cm^3 conversion define --- libraries/AP_Math/definitions.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_Math/definitions.h b/libraries/AP_Math/definitions.h index 89a1dbb1d8..446c92fd78 100644 --- a/libraries/AP_Math/definitions.h +++ b/libraries/AP_Math/definitions.h @@ -117,3 +117,6 @@ static const double WGS84_E = (sqrt(2 * WGS84_F - WGS84_F * WGS84_F)); // Amps microseconds to milliamp hours #define AUS_TO_MAH 0.0000002778f + +// kg/m^3 to g/cm^3 +#define KG_PER_M3_TO_G_PER_CM3(x) (0.001 * x)