Commit Graph

19 Commits

Author SHA1 Message Date
Randy Mackay 7c9d9b9800 AP_Math: use DEG_TO_RAD in longitude_scale
Also increased accuracy of RadiansToCentiDegrees although it is like the
compiler will throw away the extra digits anyway.
2013-05-05 14:31:24 +09:00
Andrew Tridgell e1f9297551 AP_Math: move print_latlon() to location.cpp 2013-04-20 13:52:36 +10:00
Andrew Tridgell 8b119934ea AP_Math: fixed grammar error 2013-04-12 12:48:08 +10:00
tobias 217b8d7a59 cleanup: use const for struct Location pointers and references
this allows the compiler to generate more efficient code
2013-04-09 12:10:32 +10:00
Andrew Tridgell 091b474a1d AP_Math: added wrap_360_cd() and wrap_180_cd()
moved from per-vehicle code
2013-03-29 13:13:37 +11:00
Randy Mackay 7729ec950e AP_Math: longitude_scale function made public
Added LATLON_TO_M and LATLON_TO_CM #defines
2013-01-27 23:21:39 +09:00
Randy Mackay d2767b911c AP_Math: switch get_distance_cm to return uint32_t
Includes changes required on ArduCopter and ArduPlane side as well
2013-01-26 17:04:12 +09:00
James Bielman 5631f865b2 Update floating point calculations to use floats instead of doubles.
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Andrew Tridgell d8bed0c2aa AP_Math: fixed get_distance() function 2012-12-20 14:53:23 +11:00
Andrew Tridgell a072afa223 AP_Math: expand some macros into functions
this saves some flash
2012-12-20 14:52:38 +11:00
Pat Hickey 7dbe198e5c AP_Math: port to work on coreless arduino (AP_HAL) 2012-12-20 14:51:24 +11:00
uncrustify 64eaadb332 uncrustify libraries/AP_Math/location.cpp 2012-08-21 19:03:33 -07:00
Jason Short a66e43aff1 Location Lib : Abs was overflowing causing bad comparison 2012-08-15 22:01:51 -07:00
Jason Short ff38dadd00 Location Lib. Potential fix for bad angle and distance calcs.
last_lat changed to int32_t since it can be negative.
2012-08-15 21:36:55 -07:00
Andrew Tridgell 87fca1985f AP_Math: added location_update() and location_offset() functions
these will be used by AHRS dead reckoning
2012-08-11 11:56:54 +10:00
Andrew Tridgell 8ae35cae1c AP_Math: rename get_bearing() to get_bearing_cd() to make units obvious 2012-08-08 12:12:30 +10:00
Andrew Tridgell a72f6acef6 AP_Math: added get_distance_cm() to return in centimeters 2012-07-11 07:49:05 +10:00
Andrew Tridgell 1cd8c54f21 AP_Math: cope with co-located waypoints in location_passed_point() 2012-07-04 14:24:04 +10:00
Andrew Tridgell dd200cba31 Math: added location functions to math library
these do common calculations on struct Location
2012-07-04 12:42:46 +10:00