Subversion Repositories FlightCtrl

Rev

Rev 2044 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2044 Rev 2045
Line 15... Line 15...
15
// Changed: We want to be able to multiply 2 sines/cosines and still stay comfortably (factor 100) within 31 bits.
15
// Changed: We want to be able to multiply 2 sines/cosines and still stay comfortably (factor 100) within 31 bits.
16
// 4096 = 12 bits, square = 24 bits, 7 bits to spare.
16
// 4096 = 12 bits, square = 24 bits, 7 bits to spare.
17
#define MATH_UNIT_FACTOR_LOG 12
17
#define MATH_UNIT_FACTOR_LOG 12
18
#define MATH_UNIT_FACTOR (1L<<MATH_UNIT_FACTOR_LOG)
18
#define MATH_UNIT_FACTOR (1L<<MATH_UNIT_FACTOR_LOG)
Line 19... Line -...
19
 
-
 
20
int16_t sin_mkdegrees(int32_t arg);
-
 
21
int16_t cos_mkdegrees(int32_t arg);
-
 
22
int16_t tan_mkdegrees(int32_t arg);
-
 
23
 
19
 
24
int16_t sin_360(int16_t arg);
20
int16_t sin_360(int16_t arg);
25
int16_t cos_360(int16_t arg);
21
int16_t cos_360(int16_t arg);