This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:lesson7 [2019/11/07 16:43] golikov |
en:lesson7 [2019/11/14 16:49] golikov |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== OrbiCraft positioning with magnetometer ====== | + | ====== Lesson 07. OrbiCraft positioning with magnetometer ====== |
===== Program for turning by magnetometer ===== | ===== Program for turning by magnetometer ===== | ||
Create the program listed below. Factors for mag_calibrated function must be taken from Magneto software. | Create the program listed below. Factors for mag_calibrated function must be taken from Magneto software. | ||
Line 207: | Line 207: | ||
int hyro_state = 0; // Initialize angular velocity sensor status | int hyro_state = 0; // Initialize angular velocity sensor status | ||
int mag_state = 0; // Initialize magnetometer status | int mag_state = 0; // Initialize magnetometer status | ||
- | // int alpha_goal = 0; // Target angle | + | int alpha_goal = 0; // Target angle |
double mag_alpha = 0; | double mag_alpha = 0; | ||
int i; | int i; |