Some buf fixes and small enhancements
This commit is contained in:
@@ -27,5 +27,6 @@ class OneValue(Page):
|
||||
if self.ref1.value:
|
||||
ctx.show_text(self.ref1.format())
|
||||
else:
|
||||
ctx.show_text(self.placeholder)
|
||||
#print(dir(self.bd))
|
||||
ctx.show_text("---") # self.bd.getPlaceholder())
|
||||
ctx.stroke()
|
||||
|
||||
@@ -17,21 +17,21 @@ class SkyView(Page):
|
||||
def __init__(self, pageno, cfg, boatdata):
|
||||
super().__init__(pageno, cfg, boatdata)
|
||||
|
||||
def pol2cart(azimuth, elevation):
|
||||
def pol2cart(azimut, elevation):
|
||||
'''
|
||||
Polar to Cartesian coordinates within the horizon circle.
|
||||
azimuth in radians
|
||||
x = math.sin(azimuth) * elevation * self.radius
|
||||
y = math.cos(azimuth) * elevation * self.radius
|
||||
x = math.sin(azimut) * elevation * self.radius
|
||||
y = math.cos(azimut) * elevation * self.radius
|
||||
'''
|
||||
pass
|
||||
# (x, y) = self.pol2cart(sat.az, sat.el)
|
||||
|
||||
|
||||
def draw(self, ctx):
|
||||
|
||||
# Name
|
||||
ctx.select_font_face("Ubuntu", cairo.FontSlant.NORMAL, cairo.FontWeight.BOLD)
|
||||
#ctx.set_font_size(32)
|
||||
#ctx.set_font_size(32)
|
||||
#self.draw_text_center(ctx, 200, 40, "Satellite Info")
|
||||
|
||||
# Spezialseite
|
||||
@@ -70,7 +70,7 @@ class SkyView(Page):
|
||||
ctx.show_text(f"{s:02d}")
|
||||
ctx.rectangle(305, y-12, 85, 14)
|
||||
ctx.stroke()
|
||||
|
||||
|
||||
ctx.set_line_width(1.0)
|
||||
for s in self.bd.sat.values():
|
||||
x = cx + math.sin(s.azimuth) * s.elevation * r
|
||||
@@ -82,4 +82,4 @@ class SkyView(Page):
|
||||
|
||||
# Satellitenliste mit SNR-Balken sortiert nach nummer
|
||||
for prn_num in sorted(self.bd.sat):
|
||||
print(prn_num)
|
||||
print(prn_num)
|
||||
|
||||
Reference in New Issue
Block a user