Rev 765 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 765 | Rev 772 | ||
---|---|---|---|
Line 310... | Line 310... | ||
310 | uint16_t div_factor; |
310 | uint16_t div_factor; |
311 | int16_t heading; |
311 | int16_t heading; |
Line 312... | Line 312... | ||
312 | 312 | ||
313 | if (MM3_Timeout) |
313 | if (MM3_Timeout) |
314 | { |
- | |
315 | // calibration factor for transforming Gyro Integrals to angular degrees |
- | |
316 | div_factor = (uint16_t)ParamSet.UserParam3 * 8; |
- | |
317 | 314 | { |
|
318 | // Offset correction and normalization (values of H are +/- 512) |
315 | // Offset correction and normalization (values of H are +/- 512) |
319 | Hx = (((int32_t)(MM3.x_axis - MM3_calib.X_off)) * 1024) / (int32_t)MM3_calib.X_range; |
316 | Hx = (((int32_t)(MM3.x_axis - MM3_calib.X_off)) * 1024) / (int32_t)MM3_calib.X_range; |
320 | Hy = (((int32_t)(MM3.y_axis - MM3_calib.Y_off)) * 1024) / (int32_t)MM3_calib.Y_range; |
317 | Hy = (((int32_t)(MM3.y_axis - MM3_calib.Y_off)) * 1024) / (int32_t)MM3_calib.Y_range; |