Compare commits

..

No commits in common. "f58dd8816f059fb72dd430ae21982c051e669f46" and "ea38bdaa502f18cad20e8cdc938158ca03d11fbd" have entirely different histories.

View file

@ -8,7 +8,7 @@ WIND_SPEED_MAX = 140 # knots
WIND_SPEED_MIN = 10 WIND_SPEED_MIN = 10
WIND_SPEED_STEP = 10 WIND_SPEED_STEP = 10
WIND_DIR_STEP = 30 # degrees WIND_DIR_STEP = 45 # degrees
def radians(degrees: float) -> float: def radians(degrees: float) -> float:
return (degrees + 90) * (math.pi / 180.0) return (degrees + 90) * (math.pi / 180.0)
@ -108,8 +108,7 @@ class Hodograph():
text = "%dkt" % speed text = "%dkt" % speed
extents = cr.text_extents(text) extents = cr.text_extents(text)
for angle in (0, 180): sx, sy = self.sample_to_screen(speed, 180)
sx, sy = self.sample_to_screen(speed, angle)
cr.move_to(x + sx + extents.width * 0.25, cr.move_to(x + sx + extents.width * 0.25,
y + sy - extents.height * 1.5) y + sy - extents.height * 1.5)