Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.84k stars 832 forks source link

Location=auto fails to set correct light pollution level #2762

Open 10110111 opened 2 years ago

10110111 commented 2 years ago

Expected Behaviour

Launching newly-installed Stellarium should set location according to some ways of self-location, and corresponding light pollution level should be set. At the very least this should work for major cities.

Actual Behaviour

Launching Stellarium in Saint Petersburg, Russia, with [init_location]/location=auto sets correct geographical coordinates and a name of the location, "St Petersburg". Light pollution level is set to 23.3 mag/arcsec² (Bortle class 2), which is way too low for Saint Petersburg.

OTOH, selecting location from the Location dialog as a particular entry in the list, "Saint Petersburg, Eastern Europe", results in a much more realistic light pollution level of 18 mag/arcsec² (Bortle class 9).

System

Logfile

log.txt

github-actions[bot] commented 2 years ago

Hello @10110111!

Thank you for suggesting this enhancement.

alex-w commented 2 years ago

When [init_location]/location=auto then Stellarium using network tool to obtaining coordinates and time zone from IP address - nothing else. Of course we set some default value of light pollution and we guess that probability of small city in this location is high.

alex-w commented 2 years ago

Related to #1619

github-actions[bot] commented 2 years ago

Hello @10110111!

Thank you for suggesting this feature.

gzotti commented 2 years ago

Sure, an optimistic Bortle 2 was the default value for network-based locations. If you can query this (or another) online repo to look up such data, please go ahead. Same goes for the unknown timezone when clicking into the map.

10110111 commented 2 years ago

Until we get a good online source of such data, Stellarium should, if city name is known, look into its own location database for a known location with close coordinates. They don't have to match exactly (as don't the names, see the OP), but should be within some 20 km of distance or so. If nothing is found, then OK, just use Bortle 2 as now.

gzotti commented 2 years ago

Well, for reasons unknown at least my IP is resolved to be in a little town tens of km away which is not in the location list. So, looking up location name "may" work, but at least I cannot test that, and we must expect errors... It was good enough for "naked-eye" location though.

gzotti commented 2 years ago

Seriously, the point about default Bortle 2 is of course that also people living in towns "expect" to see a great sky on screen. If inhabitants of major cities are launching a freshly-found Stellarium and immediately see a Bortle 9 sky and don't know what to do, it may never become a very interesting program for them, and the sky and amateur astronomy will probably never get them. The screen may suggest how much you would see in a good site. I hope when SB then walks out into the floodlight of his parking lot, he will understand that the floodlight is actually not natural and disturbs the view of the things that the screen view had promised.

gzotti commented 2 years ago

What would be nice though would indeed be a zoomable map panel which solves #1619 and the timezone query. In this case the user is assumed to really want to know the localized conditions. Also when setting location from GPS, although for the latter the user may deliberately be offline in the field. This would be topic of a plugin that extends the location panel, or even be a full replacement module. (Offline use at least as good as what we have now must remain available!)

10110111 commented 2 years ago

Seriously, the point about default Bortle 2 is of course that also people living in towns "expect" to see a great sky on screen.

Not necessarily. My first use of Stellarium was when I wondered "what is this bright point in the sky?" while I was in a highly light-polluted city. Of course Venus or Jupiter would be immediately displayed by Stellarium at any light pollution level, which would answer this question (and it did at that time, although there were also lots of stars displayed that were invisible to me in real life).

Anyway, in fact, there's no such problem: the default is manual light pollution level, so the user does see a great sky.

But then, choosing light pollution level from database should just work, while it currently doesn't. It only does if you manually "travel" to your place via the Location dialog—or remain in Paris, the center of the world when first launching Stellarium offline. This is the point of this issue.

Atque commented 2 years ago

Also, 23,3 mag/arc sec^2 is quite optimistic. I don’t think a clear sky could be darker than 22.00.

10110111 commented 2 years ago

@Atque whether it could is very debatable, see this question of mine that I still haven't got answered satisfactorily.

gzotti commented 2 years ago

The location=auto switch should be disabled by serious users anyway. It is a first setting. And new users should be served a good sky.

10110111 commented 2 years ago

The location=auto switch should be disabled by serious users anyway.

It's not obvious if the default location is exactly what the user wants thanks to the IP location.

gzotti commented 2 years ago

Not sure what you mean. The default is IP location, and if that fails, last-used location, or Paris as ultimate fallback.

After the first few runs, the user may be curious enough to explore the menu and set the proper location, add an own location, etc. Maybe creating a new location should allow adding the other elements from StelLocation: place role, LP level, ....

10110111 commented 2 years ago

The default is IP location

Yes, this is what I mean: I have multiple machines, and for several months I wondered why I have correct automatic LP on one and very low LP on all others. And the answer was that I never bothered to switch the other machines to locations away from default, because the default was exactly correct. Am I not a serious user? ;)

gzotti commented 2 years ago

Well, the "other machines" are then still on "beginner mode", i.e. good sky at close-enough coordinates. But how do you have "current automatic LP" on the first? If you have set your location manually by selecting a location from the location DB and then fine-tuning the coordinates, this was just a name-based lookup. And yes, it may be useful to allow adding the other location data while adding a new location.

10110111 commented 2 years ago

But how do you have "current automatic LP" on the first?

This my development machine, where I have "travelled" to other locations mainly for testing. Then I returned home, and, since both this machine and the others show my city name as the location, I didn't understand what was going on. I expected there was a failure to access the DB (some kind of firewall interfering or whatnot), and only found yesterday that it wasn't even accessed. It didn't even cross my mind that having the same location manually vs automatically should visibly change anything: this is just intuitively wrong.

gzotti commented 2 years ago

OK. This may look confusing. Still I strongly vote for showing a good sky to beginners at their first startups until they set up, or at least check their proper location and move away from IP-lookup.

10110111 commented 2 years ago

But isn't it already the default even if the current issue is solved? The default light pollution mode is "manual", so the beginners will get good skies until they choose "get from DB".

gzotti commented 2 years ago

Ah OK, good point. In this case, do it. Just make sure default installations start with a good sky until a new user (who may not be familiar with terminology around LP!) does something to change this.