fetzerch / grafana-sunandmoon-datasource

SunAndMoon is a datasource plugin for Grafana that calculates the position of Sun and Moon as well as the Moon illumination. ☀️🌙🧛‍♂️
MIT License
41 stars 8 forks source link

Elevation not used in calculations #49

Open ArrEssJay opened 2 years ago

ArrEssJay commented 2 years ago

Sun and moon positions are (to a greater or lesser extent) dependent on elevation as well as latitude/longitude. The suncalc library used accepts an optional height parameter, defaulting to the geodetic surface.

It would be useful if this plugin could additionally store and use an elevation parameter (or estimate it from an elevation model) for more accurate calculations.

fetzerch commented 1 year ago

Remark: suncalc only supports this in getTimes (which is currently only used for annotations). The request to add support also to getPosition: https://github.com/mourner/suncalc/issues/141 is still open.