OwnWeb / map_elevation

A widget to display elevation of a track (polyline) like Leaflet.Elevation
MIT License
28 stars 9 forks source link

Adjusting for the curvature of the Earth #9

Open W2NJL opened 2 years ago

W2NJL commented 2 years ago

Hi all, This is probably a totally out of scope/senseless request, so please feel free to ignore! But, I just wanted to quickly explain my use-case for this wonderful plugin in an effort to see if maybe you had some thoughts on how to adjust for this. I am actually using map_elevation to display the terrain path between the transmitter and receiver for FM radio signals. See my demo here:

https://1drv.ms/v/s!AgvDyC8pLkdhk-d-ACe9goGiHRo5OQ?e=ML7oRw

A few folks have brought to my attention (and this comes more into play with FM signals traveling from one place to another) that my terrain path profile does not take into account the curvature of the Earth. For an example of a tool that does this, the path profiler at HeyWhatsThat.com does if you change the parameters to "curved earth": https://www.heywhatsthat.com/profiler.html

Anyway, total shot in the dark, but I was just wondering if maybe any of you had a thought (I'm willing to implement it myself) on how to maybe integrate this with map_elevation. I am sure this is not your intended use case!

Thank you so much and have a wonderful holiday!

HugoHeneault commented 2 years ago

Hello @W2NJL

Thanks for your kind words. You're right, we're not taking earth curve into account. I don't have much time these days to check it, but if you come up with some ideas, I'll be happy to help you integrate it in map_elevation :)

Just to be sure to understand it right, you're not only talking about having a small curve below the chart? CleanShot 2021-12-28 at 17 57 09

tuarrep commented 2 years ago

Thanks for this interesting suggestion.

I clearly understand your use case as I've, years ago, set up FM relays in mountains 😀

It's a niche use case of this package and it's not really in its initial scope.

By the way, I've thought a bit about it and I think it can be an almost independent opt-in feature and a nice challenge.

I'm in favor of letting this open in case any of us or someone wants to challenge itself on calculating the arc of earth and the offset to add to the geographical elevation.

Feel free to open a PR, even in a draft state, I'll be happy to review it.

Bests