mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-11-25 14:50:37 +01:00
Added vertical distance
This commit is contained in:
parent
10d7e18264
commit
e59e087475
@ -1,4 +1,4 @@
|
|||||||
__debug_build__ = False
|
__debug_build__ = True
|
||||||
__disable_shaders__ = False
|
__disable_shaders__ = False
|
||||||
__version__ = "0.7.0"
|
__version__ = "0.7.0"
|
||||||
__variant__ = "beta"
|
__variant__ = "beta"
|
||||||
@ -3605,6 +3605,9 @@ class SidebandApp(MDApp):
|
|||||||
self.map_action(direction="right")
|
self.map_action(direction="right")
|
||||||
|
|
||||||
def object_details_action(self, sender=None, from_conv=False, from_telemetry=False, source_dest=None):
|
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.screen_manager.transition.direction = "left"
|
||||||
self.root.ids.nav_drawer.set_state("closed")
|
self.root.ids.nav_drawer.set_state("closed")
|
||||||
|
|
||||||
|
@ -782,8 +782,12 @@ class Location(Sensor):
|
|||||||
above_horizon = False
|
above_horizon = False
|
||||||
|
|
||||||
srh = shared_radio_horizon(cs, cr)
|
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"] = {
|
rendered["azalt"] = {
|
||||||
"azimuth": aa[0], "altitude": aa[1], "above_horizon": above_horizon,
|
"azimuth": aa[0], "altitude": aa[1], "above_horizon": above_horizon,
|
||||||
"altitude_delta": atd, "local_angle_to_horizon": ath}
|
"altitude_delta": atd, "local_angle_to_horizon": ath}
|
||||||
|
@ -282,6 +282,17 @@ class RVDetails(MDRecycleView):
|
|||||||
ed_text = f"Euclidian distance [b]{RNS.prettydistance(ed)}[/b]"
|
ed_text = f"Euclidian distance [b]{RNS.prettydistance(ed)}[/b]"
|
||||||
extra_entries.append({"icon": "axis-arrow", "text": ed_text})
|
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"]:
|
if "angle_to_horizon" in s["values"]:
|
||||||
oath = s["values"]["angle_to_horizon"]
|
oath = s["values"]["angle_to_horizon"]
|
||||||
if oath != None:
|
if oath != None:
|
||||||
|
Loading…
Reference in New Issue
Block a user