Radek here is my suggestion:-
1. Simplify - do we need the skymap,full GPS info - i dont but interested to know if others do. The location map is fine and enough for me !
2. Set up simple ALL user environment variables called Latposition,Lonposition,Elevation (names could be anything ). Allow user to set these via a simple Web interface/panel. Put them in users profile. That makes them permanent (unless edited again). Should only need to be done once unless user has moved location and has no GPS and no internet. This becomes the default!
3. Location map function - using something like openstreetmap we can simply allow a user to select a location and get the coordinates (lat/Long) example here
forum.openstreetmap.org/viewtopic.php?id=57038
and set Environment vars above to extracted Lat/Lon. Again only needs to be done once per session BUT does need Internet
4. Using GPSPIPE command and DQ application (json parser) extract Lat,Lon,Elevation,Date/Time - null is returned if nothing exists for TPV data - so command could be as simple as gpspipe -w -n 4 -p |grep TPV |jq .lon (for longtitude) and set Environment variable appropriately. but only if value is returned (the GPSPIPE command will return nothing if no TPV data has been produced.
This could be a script on a timer as per GPSPanel. GPSPIPE doesn't need root permissions to work with GPSD !
This will have no effect if no GPS device is fitted or working!
Note - have tried out the simple GPSPIPE commands on my Ublox7 and they work - when the GPS device works.
So unless the Environment vars have been changed in one of the above ways the "default" ones in the profile will always apply.
This is much like you existing system but simpler IMO and doesn't depend on Python but would need Java for the Openstreetmap item described in (3).
Anyway just an idea !