Open 10110111 opened 3 years ago
The model for refraction from the astronomical literature which we implemented in 2010 fails below about -2°. See figure 18.6 in the User Guide. This is totally irrelevant for terrestrial observers as there are no sites on the ground where you would see into the funny zone where we have to "unsquash" the sun but yes, from a balloon in the stratosphere will make a different observation. Don't say it's wrong, this is too obvious. Please provide a better model.
Thank you @10110111 for suggesting this.
This is totally irrelevant for terrestrial observers as there are no sites on the ground where you would see into the funny zone where we have to "unsquash" the sun
What about e.g. Rosa Khutor Peak 2320? At such altitude the true horizon is at -1.546°. Stellarium produces the following solar disk at these parameters, when it just touches the true horizon. It's already elongated at the bottom, with the total vertical diameter larger than horizontal.
And I've been actually able to at least see the Sun on 2017-07-17 20:02:03 MSK, where Stellarium calculates solar disk to be at -0.975°. I.e. the surrounding mountains didn't obscure it. I could have watched the Sun going even lower if I had an opportunity to remain at the peak that day. Here's how it looked:
Please provide a better model
In fact, I have developed some code that calculates refraction angle from refractivity altitude profile, taking altitude and view elevation as input. But I don't know how to use the current parameters of pressure and temperature to generate the whole refractivity profile.
Also, the algorithm is a bit computationally intensive (involves numerical quadrature, and below mathematical horizon even multiple times).
(The altitude issue also relates with #740 )
At nonzero altitude true horizon sinks below mathematical horizon. This means that e.g. the solar disk should flatten at a lower elevation than if it's observed from sea level. Moreover, in no case should it be stretched vertically.
Actual behavior of refraction in Stellarium contradicts both of these conditions. See the following animation (see it fullscreen to view the azimuthal grid):
https://user-images.githubusercontent.com/6376882/108884229-68d44800-7617-11eb-8595-00ff2bc94a93.mp4
Here I had chosen the altitude of 5 km. At this altitude true horizon is at -2.267° (ignoring refraction that would elevate it a bit). By the azimuth/elevation grid you can estimate where it should be. Notice that
This becomes very prominent with the WIP ShowMySky atmosphere when altitude is really high, e.g. with the following 30 km screenshot:
In fact, as you can see above, extinction is also wrong in these conditions.