diff --git a/lib/xmet/hodograph.py b/lib/xmet/hodograph.py index 68baa90..c90e0c2 100644 --- a/lib/xmet/hodograph.py +++ b/lib/xmet/hodograph.py @@ -18,6 +18,9 @@ def radians(degrees: float) -> float: def degrees(radians: float) -> float: return (radians * (180.0 / math.pi)) - 90 +def knots(ms: float) -> float: + return ms * 1.944 + class Hodograph(): def __init__(self, width, height): self.width = min(width, height) @@ -151,7 +154,8 @@ class Hodograph(): if sx_last is not None and sy_last is not None: cr.move_to(x + sx_last, x + sy_last) - sx, sy = self.sample_to_screen(sample.wind_speed, sample.wind_dir) + sx, sy = self.sample_to_screen(knots(sample.wind_speed), + sample.wind_dir) if first: cr.move_to(x + sx, y + sy)