diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-07-04 15:48:01 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-07-04 15:48:01 +0200 |
commit | cefebb9699760b23b1298ee46a0d72ae22b6ecd8 (patch) | |
tree | 0e20569ba82c1af7f5c0687e2273547da6d859a0 /src/modules/systemlib/geo/geo.h | |
parent | d72e9929aa7f3066c3c8c6a09df7a9690b3cdbc5 (diff) | |
download | px4-firmware-cefebb9699760b23b1298ee46a0d72ae22b6ecd8.tar.gz px4-firmware-cefebb9699760b23b1298ee46a0d72ae22b6ecd8.tar.bz2 px4-firmware-cefebb9699760b23b1298ee46a0d72ae22b6ecd8.zip |
Small improvements in system lib
Diffstat (limited to 'src/modules/systemlib/geo/geo.h')
-rw-r--r-- | src/modules/systemlib/geo/geo.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/systemlib/geo/geo.h b/src/modules/systemlib/geo/geo.h index 84097b49f..dadec51ec 100644 --- a/src/modules/systemlib/geo/geo.h +++ b/src/modules/systemlib/geo/geo.h @@ -45,9 +45,23 @@ * Additional functions - @author Doug Weibel <douglas.weibel@colorado.edu> */ +#pragma once + +__BEGIN_DECLS #include <stdbool.h> +#define CONSTANTS_ONE_G 9.80665f /* m/s^2 */ +#define CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C 1.225f /* kg/m^3 */ +#define CONSTANTS_AIR_GAS_CONST 287.1f /* J/(kg * K) */ +#define CONSTANTS_ABSOLUTE_NULL_CELSIUS -273.15f /* °C */ +#define CONSTANTS_RADIUS_OF_EARTH 6371000 /* meters (m) */ + +/* compatibility aliases */ +#define RADIUS_OF_EARTH CONSTANTS_RADIUS_OF_EARTH +#define GRAVITY_MSS CONSTANTS_ONE_G + +// XXX remove struct crosstrack_error_s { bool past_end; // Flag indicating we are past the end of the line/arc segment float distance; // Distance in meters to closest point on line/arc @@ -111,3 +125,5 @@ __EXPORT float _wrap_180(float bearing); __EXPORT float _wrap_360(float bearing); __EXPORT float _wrap_pi(float bearing); __EXPORT float _wrap_2pi(float bearing); + +__END_DECLS |