Subversion Repositories FlightCtrl

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2189 - 1
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-
2
 
3
#ifndef AP_MATH_H
4
#define AP_MATH_H
5
// Assorted useful math operations for ArduPilot(Mega)
6
//#include <AP_Common.h>
7
#include <stdint.h>
8
//#include "rotations.h"
9
//#include "vector2.h"
10
#include "Vector3.h"
11
#include "Matrix3.h"
12
//#include "quaternion.h"
13
//#include "polygon.h"
14
 
15
// define AP_Param types AP_Vector3f and Ap_Matrix3f
16
// AP_PARAMDEFV(Matrix3f, Matrix3f, AP_PARAM_MATRIX3F);
17
// AP_PARAMDEFV(Vector3f, Vector3f, AP_PARAM_VECTOR3F);
18
 
19
// a varient of asin() that always gives a valid answer.
20
float safe_asin(float v);
21
 
22
// a varient of sqrt() that always gives a valid answer.
23
float safe_sqrt(float v);
24
 
25
// find a rotation that is the combination of two other
26
// rotations. This is used to allow us to add an overall board
27
// rotation to an existing rotation of a sensor such as the compass
28
// enum Rotation rotation_combination(enum Rotation r1, enum Rotation r2, bool *found = NULL);
29
 
30
#endif