mirror of
https://github.com/liberatedsystems/Sideband_CE.git
synced 2024-09-03 04:13:27 +02: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
|
||||
__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")
|
||||
|
||||
|
@ -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}
|
||||
|
@ -281,6 +281,17 @@ class RVDetails(MDRecycleView):
|
||||
if ed != None:
|
||||
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"]
|
||||
|
Loading…
Reference in New Issue
Block a user