Commit Graph

19 Commits

Author SHA1 Message Date
Andrew Tridgell e1ffd37411 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 891ed81f74 AP_Math: rename get_bearing() to get_bearing_cd() to make units obvious 2012-08-08 12:12:30 +10:00
Andrew Tridgell 63a83b95b4 AP_Math: added get_distance_cm() to return in centimeters 2012-07-11 07:49:05 +10:00
Andrew Tridgell 7be29c8b04 AP_Math: the windows arduino build is missing acosf() 2012-07-04 14:14:58 +10:00
Andrew Tridgell 8fa1acb141 AP_Math: add include of math.h
this is needed for location.cpp
2012-07-04 13:59:23 +10:00
Andrew Tridgell 84a489498d Math: added location functions to math library
these do common calculations on struct Location
2012-07-04 12:42:46 +10:00
Andrew Tridgell b6040878b4 Math: added a function to combine standard rotations
this will allow us to have an overall board rotation plus a per-sensor
rotation
2012-03-19 17:29:02 +11:00
Andrew Tridgell 6d08e38d5d AP_Math: made rotation matrices more C++
thanks to Adam for the suggestion
2012-03-11 15:37:07 +11:00
Andrew Tridgell a9b8c4dd82 AP_Math: re-work quaternion functions to be more C++ like
thanks to Adam for the suggestion!
2012-03-11 15:37:07 +11:00
Andrew Tridgell 85c3c1d2ea Math: added vector3.rotate() and matrix3.rotation() methods
these operate on a "enum Rotation" which defines a set of standard
rotations. These are much faster than our previous method, plus use
less memory
2012-03-11 15:37:07 +11:00
Andrew Tridgell a8fd31a5e1 AP_Math: added quaternion->matrix and earth frame routines
this will be used for 3d acceleration
2012-03-10 10:34:31 +11:00
Andrew Tridgell f2e6714598 AP_Math: added quaternion helper functions and a test suite 2012-03-10 10:34:30 +11:00
Andrew Tridgell df6013616e AP_Math: added rotmat <-> euler functions
these will make the dcm matrix manipulation easier to understand
2012-02-24 11:52:55 +11:00
Andrew Tridgell 8190204287 AP_Math: added safe_sqrt() function
this function will never return NAN. It will return zero for negative
numbers.
2012-02-24 11:52:55 +11:00
Andrew Tridgell 1a32ececb4 AP_Math: added a safe_asin() function
this adds range checking to asin()
2012-02-24 11:52:55 +11:00
Andrew Tridgell 2b8f0c3a48 AP_Param: moved AP_Vector3f and AP_Matrix3f declarations to AP_Math.h
this avoids us needing AP_Math.h in every utility sketch and example
2012-02-18 10:51:57 +11:00
Andrew Tridgell 338fb1642a AP_Math: make out vector and matrix elements used types with fixed sizes
this prevents differences between CPU types
2011-12-16 20:09:11 +11:00
Andrew Tridgell cd9fb3c47a AP_Math: added a Polygon_outside() function
this tests if a point is outside of a polygon. This will be used as
part of our geo-fencing support, and also for a new 'fenced mode'
2011-12-15 14:34:58 +11:00
DrZiplok@gmail.com 097161cd8d Beginnings of a math library for ArduPilot(Mega) systems.
The vector classes are light adaptations of work by Bill Perone
(billperone@yahoo.com), the Matrix3 class draws on them for
inspiration.

Bill's matrix classes are too heavyweight and not templated, so
they're less suitable for us here.

This code compiles, and some trivial tests seem to work, but
it should not be considered "golden" yet.



git-svn-id: https://arducopter.googlecode.com/svn/trunk@441 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-08 08:21:46 +00:00