allsky: [BUG] ERROR: _initialiseSun failed ... and the proposed solution

RPi5, Bookwoorm, branch point release 4

I added a variable ${SUN_DAWN} in the Overlay Editor and enabled “Include Sun” under “Layout Defaults” in the Overlay Editor Options. No values were output in the overlay. The following error was written in allksy.log. ERROR: _initialiseSun failed on line 1079 - Sun never reaches 6 degrees below the horizon, at this location.

In /home/pi/allsky/scripts/modules/allsky_overlay.py the value for lat and lon was determined too high by a factor of 100 in the _initialiseSun function.

lat = self._convertLatLon(self._observerLat)
lon = self._convertLatLon(self._observerLon)

I divided the value by 100 and the overlay worked correctly and there were no more errors.

lat = self._convertLatLon(self._observerLat) / 100
lon = self._convertLatLon(self._observerLon) / 100

In both functions, lat and lon are determined in the same way. I also made the correction there without testing it. _initialiseSunOld and _initSatellites

The _initialiseMoon function determines lat and lon differently. This works correctly.

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 15

Commits related to this issue

Most upvoted comments

Fix now added.

Interestingly something is changing the locale decimal separator. Its deep in the Skyfield library so I will talk to them about it. For now I have just added a ‘temporary fix’

image

image

image

Added a quick fix.

First test is your coordinates, Locale as de_DE.UTF-8 and entering the lat/lon with a ‘.’ rather than a ‘,’

Initial results look good but I need to test it further

image