|
|
@@ -379,7 +379,10 @@ public class AimHandler : MonoBehaviour
|
|
|
|
|
|
// }
|
|
|
mag0o = UnityVectorTo0o(Mag);
|
|
|
- if (!MagCalibrater.Update(mag0o)) {
|
|
|
+ try {
|
|
|
+ if (!MagCalibrater.Update(mag0o)) return;
|
|
|
+ } catch(System.Exception) {
|
|
|
+ MagCalibrater = new MagnetometerAutoCalibrater();
|
|
|
return;
|
|
|
}
|
|
|
mag0o = MagCalibrater.EllipsoidFitting.Map(mag0o);
|