fratsloos / fr24_card

Lovelace card for showing Dump1090 data from FR24 in Home Assistant
44 stars 5 forks source link

Add elevation angle above the horizon to columns #5

Closed Roofcatbusy closed 2 years ago

Roofcatbusy commented 2 years ago

Hello, nice card! congratulations and thanks for your efforts. It would be nice if it is possible to add another column, which shows elevation angle (angle between horizon and aircraft) for a given aircraft. I often wonder how high (low) above the horizon is the arcraft and making trig on the fly is a bit difficult.

Regards, Alexey

fratsloos commented 2 years ago

Hi Alexey, thanks for your comment! I'm wondering if you have any information about how to calculate the angle?

Roofcatbusy commented 2 years ago

Sorry for delay with the answer, in first approximation one can calculate elevation angle as arcTangens ( height/distance)

BTW, another idea for improvement of your great card is developing separate "sensor" for reading number of planes "visible" by dump1090. As I understand stats could be found in status.jsonfile aside of aircraft.jsonwhich you already use. such sensor will alow to build historic charts of number of planes visible which is a kind of "vanity chart" :) for dump1090 users. If you prefer I can open separate issue for that.

Update: I've managed to create such sensor using rest platform in HA, so previous paragraph is irrelevant )

Regards Alexey

fratsloos commented 2 years ago

in first approximation one can calculate elevation angle as arcTangens ( height/distance)

That's beyond my head. Do you have an example calculation that uses data from the card?

Update: I've managed to create such sensor using rest platform in HA, so previous paragraph is irrelevant )

As I was reading your message, my first thought was to do that with a different rest sensor in HA. And you already did. Great! Else I would have told you that the number of planes is beyond the scope of the card. :)