aaronwmorris / indi-allsky

Software to manage a Linux-based All Sky Camera.
GNU General Public License v3.0
190 stars 31 forks source link

Lat and Lon do not update on config page with GPS Location #1298

Open degan6 opened 1 month ago

degan6 commented 1 month ago

The system lat and lon do not update on the onLocation Tab when the GPS is enabled.

The correct coordinates are in the log, and on the status pages but the config remains the same.

I have built a portable allsky camera and would like to avoid having to set the lat and log each time I deploy it. This would help me track where the camera was placed.

Thank you for this great software.

degan6 commented 1 month ago

I created this pull request that adds a line to the location config page.

https://github.com/aaronwmorris/indi-allsky/pull/1302

I think, ideally, the location should be updated based on the GPS location, but I get that could be a tall feature request affecting a few people.

I hope this small change will save others time.

If I am completely wrong, let me know and I'll take another look.

Thank you again for putting this project online! It is making my life better!

aaronwmorris commented 4 weeks ago

I finally re-read the line you added, but I believe that to be incorrect. If the location changes according to GPS, it should update both the location in the status as well as the location in the config.

There are rules that prevent location updates until the Latitude and Longitude have changed by at least 0.1 degrees, which is roughly 7 miles.

degan6 commented 4 weeks ago

Thanks for taking a look @aaronwmorris. I'll take another and test it again.

Part of me thinks this might be a bug with the UI, where the config gets updated but the config page doesn't show the new value somehow.

aaronwmorris commented 3 weeks ago

The config should be loaded with pretty much every page load.

aaronwmorris commented 2 weeks ago

I just realized there is another possibility... when the config is loaded, it loads the latest config based on a date column in the database. If you changed the time where the new time is older than the current system date, the config can get stuck on the "latest" config which is technically in the future. This would not correct until the new time has surpassed the old time, which might be a few hours.