From f2fef76e1056a47136c2a0240fa583689935a788 Mon Sep 17 00:00:00 2001 From: kd Date: Sat, 27 Apr 2024 17:14:33 +0200 Subject: [PATCH] fix: #22 calculate immediate variation if #22 --- Sail_Instrument/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sail_Instrument/plugin.py b/Sail_Instrument/plugin.py index d67d2b7..4ce9f1d 100644 --- a/Sail_Instrument/plugin.py +++ b/Sail_Instrument/plugin.py @@ -380,7 +380,8 @@ def mag_variation(self, lat, lon): try: self.variation except Exception as x: - self.variation=0 + self.variation = self.variation_model.GeoMag(lat, lon).dec + self.variation_time = time.monotonic() return self.variation