Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1612 dongfang 1
#include<inttypes.h>
2
#include "attitude.h"
3
 
4
/*
5
 * Angular unit scaling: Number of units per degree
6
 */
7
#define MATH_DRG_FACTOR GYRO_DEG_FACTOR_PITCHROLL
8
 
9
/*
10
 * Fix-point decimal scaling: Number of units for 1 (so if sin(something)
11
 * returns UNIT_FACTOR * 0.8, the result is to be understood as 0.8)
12
 * a * sin(b) = (a * int_sin(b * DRG_FACTOR)) / UNIT_FACTOR
13
 */
14
#define MATH_UNIT_FACTOR 8192
15
 
16
int16_t int_sin(int32_t arg);
17
int16_t int_cos(int32_t arg);
18
int16_t int_tan(int32_t arg);