node-red-contrib-sun-position
node-red-contrib-sun-position copied to clipboard
Potential error in time by elevation calculation (getSunTimeByElevation)
Hi,
using the time inject node I'm trying to inject the time when the sun reaches an elevation of 9° at my location as per screenshot below:
![](https://user-images.githubusercontent.com/10376791/174488925-638db739-84e1-4fb0-b221-223069e0d756.png)
Doing so, the following rise object gets injected into the payload:
{"value":"2022-06-19T03:17:54.351Z","ts":1655608674351.8875,"elevation":0.15707963267948966,...}
However the timestamp, which is 05:17 in GMT+2, seems to be off for around 1 h 3 min, as it should be somewhere between 06:19 and 06:20 GMT+2.
The sunset object however is giving me a time of 21:18 GMT+2 whereas it should be around 20:14 GMT+2.
The location is set correctly in the position-config node.
I encountered this issue on Node Red version 2.2.2 and library version 2.1.1.
Help would be highly appreciated, maybe I just didn't figure out quite right how to use this function.