Vorüberlegungen für die Anker-Seite
This commit is contained in:
parent
6214d08174
commit
b1fdb592b0
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
Ankerinfo / -alarm
|
Ankerinfo / -alarm
|
||||||
|
|
||||||
|
Daten
|
||||||
|
- Position des Ankers
|
||||||
|
- Wassertiefe beim Ankern
|
||||||
|
- Gesteckte Kettenlänge
|
||||||
|
- aktuelle Position des Schiffs
|
||||||
|
- aktuelle Wassertiefe an Schiffsposition
|
||||||
|
- aktuelle Schiffsausrichtung bearing/heading
|
||||||
|
- aktuelle Windrichtung
|
||||||
|
- aktuelle Windstärke
|
||||||
|
- Alarm aktiv J/N
|
||||||
|
- Alarmradius
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -18,11 +30,29 @@ class Anchor(Page):
|
||||||
self.buttonlabel[2] = 'INC'
|
self.buttonlabel[2] = 'INC'
|
||||||
self.buttonlabel[5] = 'SET'
|
self.buttonlabel[5] = 'SET'
|
||||||
|
|
||||||
|
# Der sinnvolle Abstand ist abhängig von der Länge der gesteckten Kette
|
||||||
|
# Die initial eingegebene Position des Ankers sollte nactträglich justiert
|
||||||
|
# werden können
|
||||||
|
|
||||||
|
self.chain_length = 60 # maximale Länge die ausgesteckt werden kann
|
||||||
|
self.chain = 35 # aktuell gesteckte Länge
|
||||||
|
self.anchor_lat = 0
|
||||||
|
self.anchor_lon = 0
|
||||||
|
self.anchor_depth = -1
|
||||||
|
self.lat = 0
|
||||||
|
self.lon = 0
|
||||||
|
self.heading = -1
|
||||||
|
self.depth = -1
|
||||||
|
self.alarm_range = 20
|
||||||
|
self.alarm_armed = False
|
||||||
|
self.alarm = False # Alarm ist ausgelöst und aktiv
|
||||||
|
self.wind_angle = -1
|
||||||
|
|
||||||
def draw(self, ctx):
|
def draw(self, ctx):
|
||||||
|
|
||||||
# Name
|
# Name
|
||||||
ctx.select_font_face("Ubuntu", cairo.FontSlant.NORMAL, cairo.FontWeight.BOLD)
|
ctx.select_font_face("Ubuntu", cairo.FontSlant.NORMAL, cairo.FontWeight.BOLD)
|
||||||
ctx.set_font_size(20)
|
ctx.set_font_size(20)
|
||||||
|
|
||||||
ctx.move_to(2, 50)
|
ctx.move_to(2, 50)
|
||||||
ctx.show_text("Anchor")
|
ctx.show_text("Anchor")
|
||||||
|
|
Loading…
Reference in New Issue