#include <math.h>
| Defines | |
| #define | M2_PI | 
| Functions | |
| double | saturate (const double x, const double dw_bnd, const double up_bnd) | 
| double | sign (const double x) | 
| double | fmax (double a, double b) | 
| double | fmin (double a, double b) | 
| bool | approx_equal (double x, double y, double tol) | 
| double | angle_diff (double a1, double a2, double offset) | 
| void | quaternion2euler (double(&q)[4], double(&euler)[3]) | 
| 
 | 
| This macro defines 2*pi for efficiency. | 
| 
 | ||||||||||||||||
| This function returns the difference angle between two angles (a1 
 | 
| 
 | ||||||||||||||||
| This function implements an approximate equality check with the specified tolerance. It is useful for equality comparison of floating point numbers. | 
| 
 | ||||||||||||
| This function returns the maximum of two floating point numbers | 
| 
 | ||||||||||||
| This function returns the minimum of two floating point numbers | 
| 
 | ||||||||||||
| This function converts a quaternion rotation given in "q" to euler angles returns [pitch, roll, yaw] in the vector "euler". It is based on conversion routine in HeadingServoModule by S.Skaff | 
| 
 | ||||||||||||||||
| This function defines a saturation function. It limits a given input to an interval [dw_bnd, up_bnd] | 
| 
 | 
| This function implements the signum function. It returns either -1, 0 or 1 depending on whether the input argument is negative, 0 or positive, respectively. |