Added vertical distance

This commit is contained in:
Mark Qvist 2023-10-27 01:03:59 +02:00
parent 10d7e18264
commit e59e087475
3 changed files with 20 additions and 2 deletions

View File

@ -1,4 +1,4 @@
__debug_build__ = False
__debug_build__ = True
__disable_shaders__ = False
__version__ = "0.7.0"
__variant__ = "beta"
@ -3605,6 +3605,9 @@ class SidebandApp(MDApp):
self.map_action(direction="right")
def object_details_action(self, sender=None, from_conv=False, from_telemetry=False, source_dest=None):
if self.sideband.config["telemetry_enabled"] == True:
self.sideband.update_telemetry()
self.root.ids.screen_manager.transition.direction = "left"
self.root.ids.nav_drawer.set_state("closed")

View File

@ -782,8 +782,12 @@ class Location(Sensor):
above_horizon = False
srh = shared_radio_horizon(cs, cr)
if self.data["altitude"] != None and d["altitude"] != None:
dalt = salt-alt
else:
dalt = None
rendered["distance"] = {"euclidian": ed, "orthodromic": od}
rendered["distance"] = {"euclidian": ed, "orthodromic": od, "vertical": dalt}
rendered["azalt"] = {
"azimuth": aa[0], "altitude": aa[1], "above_horizon": above_horizon,
"altitude_delta": atd, "local_angle_to_horizon": ath}

View File

@ -282,6 +282,17 @@ class RVDetails(MDRecycleView):
ed_text = f"Euclidian distance [b]{RNS.prettydistance(ed)}[/b]"
extra_entries.append({"icon": "axis-arrow", "text": ed_text})
if "vertical" in s["distance"]:
vd = s["distance"]["vertical"]
if vd != None:
if vd < 0:
relstr = "lower"
vd = abs(vd)
else:
relstr = "greater"
vd_text = f"Altitude is [b]{RNS.prettydistance(vd)}[/b] {relstr} than this device"
extra_entries.append({"icon": "altimeter", "text": vd_text})
if "angle_to_horizon" in s["values"]:
oath = s["values"]["angle_to_horizon"]
if oath != None: