Subversion Repositories FlightCtrl

Rev

Blame | Last modification | View Log | RSS feed

#include<inttypes.h>
#include "attitude.h"

/*
 * Angular unit scaling: Number of units per degree
 */

#define MATH_DRG_FACTOR GYRO_DEG_FACTOR_PITCHROLL

/*
 * Fix-point decimal scaling: Number of units for 1 (so if sin(something)
 * returns UNIT_FACTOR * 0.8, the result is to be understood as 0.8)
 * a * sin(b) = (a * int_sin(b * DRG_FACTOR)) / UNIT_FACTOR
 */

#define MATH_UNIT_FACTOR 8192

int16_t int_sin(int32_t arg);
int16_t int_cos(int32_t arg);
int16_t int_tan(int32_t arg);