// report AHRS2 state void GCS_MAVLINK::send_ahrs2(AP_AHRS &ahrs) { #if AP_AHRS_NAVEKF_AVAILABLE Vector3f euler; struct Location loc {}; if (ahrs.get_secondary_attitude(euler)) { mavlink_msg_ahrs2_send(chan, euler.x, euler.y, euler.z, loc.alt*1.0e-2f, loc.lat, loc.lng); } AP_AHRS_NavEKF &_ahrs = reinterpret_cast<AP_AHRS_NavEKF&>(ahrs); if (_ahrs.get_NavEKF2().activeCores() > 0) { _ahrs.get_NavEKF2().getLLH(loc); _ahrs.get_NavEKF2().getEulerAngles(-1,euler); mavlink_msg_ahrs3_send(chan, euler.x, euler.y, euler.z, loc.alt*1.0e-2f, loc.lat, loc.lng, 0, 0, 0, 0); } #endif }
// report AHRS2 state void GCS_MAVLINK::send_ahrs2(AP_AHRS &ahrs) { #if AP_AHRS_NAVEKF_AVAILABLE Vector3f euler; struct Location loc; if (ahrs.get_secondary_attitude(euler) && ahrs.get_secondary_position(loc)) { mavlink_msg_ahrs2_send(chan, euler.x, euler.y, euler.z, loc.alt*1.0e-2f, loc.lat, loc.lng); } #endif }