Subversion Repositories FlightCtrl

Rev

Rev 2052 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2052 Rev 2160
Line 71... Line 71...
71
 * In this explanation it is assumed that the ADC values are 0 based, and gravity is included.
71
 * In this explanation it is assumed that the ADC values are 0 based, and gravity is included.
72
 * The sine of v is the far side / the hypothenusis:
72
 * The sine of v is the far side / the hypothenusis:
73
 * sin v = acc / sqrt(acc^2 + acc_z^2)
73
 * sin v = acc / sqrt(acc^2 + acc_z^2)
74
 * Using that v is a small angle, and the near side is about equal to the the hypothenusis:
74
 * Using that v is a small angle, and the near side is about equal to the the hypothenusis:
75
 * sin v ~= acc / acc_z
75
 * sin v ~= acc / acc_z
76
 * Assuming that the helicopter is hovering at small pitch and roll angles, acc_z is about 410,
76
 * Assuming that the multicopter is hovering at small pitch and roll angles, acc_z is about 410,
77
 * and sin v ~= v (small angles, in radians):
77
 * and sin v ~= v (small angles, in radians):
78
 * sin v ~= acc / 410
78
 * sin v ~= acc / 410
79
 * v / 57.3 ~= acc / 410
79
 * v / 57.3 ~= acc / 410
80
 * v ~= acc * 57.3 / 410
80
 * v ~= acc * 57.3 / 410
81
 * acc / v ~= 410 / 57.3 ~= 7, that is: There are about 7 counts per degree.
81
 * acc / v ~= 410 / 57.3 ~= 7, that is: There are about 7 counts per degree.