commander: quick mag cal with fixed heading use MAV_CMD_FIXED_MAG_CAL_YAW message

- use proper Mavlink MAV_CMD_FIXED_MAG_CAL_YAW command for initiating magnetometer quick cal
 - MAV_CMD_FIXED_MAG_CAL_YAW allows specifying the yaw and optionally latitude and longitude if the vehicle doesn't have GPS
This commit is contained in:
Daniel Agar
2020-09-06 19:25:11 -04:00
committed by GitHub
parent 1ac31100cc
commit ca9b6bc137
5 changed files with 73 additions and 31 deletions
+3 -1
View File
@@ -39,10 +39,12 @@
#ifndef MAG_CALIBRATION_H_
#define MAG_CALIBRATION_H_
#include <math.h>
#include <stdint.h>
#include <uORB/uORB.h>
int do_mag_calibration(orb_advert_t *mavlink_log_pub);
int do_mag_calibration_quick(orb_advert_t *mavlink_log_pub, float heading_radians = 0);
int do_mag_calibration_quick(orb_advert_t *mavlink_log_pub, float heading_radians = 0, float latitude = NAN,
float longitude = NAN);
#endif /* MAG_CALIBRATION_H_ */