-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Longitude & Latitude failing to set properly for values between 0 & -1 #5386
Comments
True, but thats more or less a theoretical bug - these positions (0 to -0.999) are @ Atlantic ocean 700 km next to an island in the middle of nowhere |
A longitude band and a latitude band, rather than a single tiny point. The worst case is about a 15 minute sunset/sunrise error. The UK sits right in the middle of the band. My location is latitude -0.89 which got taken as 0.89 so almost worst case. |
this solves the issue // better char to double |
@ggaavv - your are right, I was too sick, sorry |
Testing gemu suggestion |
Fix float calculations in range from 0 to -1 (#5386)
Just implemented a fix. Pls test and report back. |
Hi, The issue has been fixed. Please, test it and if the issue is solved, please close this issue. Thanks |
Thanks for the quick fix. Working perfectly. |
Longitude Latitude failing to set properly for values between 0 & -1.
Working for number below -1
14:11:54 RSL: STATUS2 = {"StatusFWR":{"Version":"6.4.1(sonoff)","BuildDateTime":"2018-12-24T14:41:00","Boot":31,"Core":"2_4_2","SDK":"2.2.1(cfd48f3)"}}
Failing above -1
14:25:39 CMD: latitude -0.2
14:25:39 RSL: Received Topic /latitude, Data Size 4, Data -0.2
14:25:39 RSL: Group 0, Index 1, Command LATITUDE, Data -0.2
14:25:39 RSL: RESULT = {"Latitude":"0.200000"}
14:25:59 CMD: Longitude -0.2
14:25:59 RSL: Received Topic /Longitude, Data Size 4, Data -0.2
14:25:59 RSL: Group 0, Index 1, Command LONGITUDE, Data -0.2
14:25:59 RSL: RESULT = {"Longitude":"0.200000"}
Working below -1
14:25:49 CMD: latitude -1.2
14:25:49 RSL: Received Topic /latitude, Data Size 4, Data -1.2
14:25:49 RSL: Group 0, Index 1, Command LATITUDE, Data -1.2
14:25:49 RSL: RESULT = {"Latitude":"-1.200000"}
14:26:04 CMD: Longitude -1.2
14:26:04 RSL: Received Topic /Longitude, Data Size 4, Data -1.2
14:26:04 RSL: Group 0, Index 1, Command LONGITUDE, Data -1.2
14:26:04 RSL: RESULT = {"Longitude":"-1.200000"}
The text was updated successfully, but these errors were encountered: