diff --git a/flight/INS/ins.c b/flight/INS/ins.c index d70bb4003..bc472ec6e 100644 --- a/flight/INS/ins.c +++ b/flight/INS/ins.c @@ -479,7 +479,7 @@ void get_mag_data() mag_data.scaled.axis[0] = -(mag_data.raw.axis[0] * mag_data.calibration.scale[0]) + mag_data.calibration.bias[0]; mag_data.scaled.axis[1] = -(mag_data.raw.axis[1] * mag_data.calibration.scale[1]) + mag_data.calibration.bias[1]; - mag_data.scaled.axis[2] = -(mag_data.raw.axis[1] * mag_data.calibration.scale[2]) + mag_data.calibration.bias[2]; + mag_data.scaled.axis[2] = -(mag_data.raw.axis[2] * mag_data.calibration.scale[2]) + mag_data.calibration.bias[2]; mag_data.updated = true; }