It comes from buildstardb.cpp, function HipparcosStar TheSun(), where parallax is set to 1000000.0f; this causes sun to be listed with distance 0.00326167 ly in data/stars.txt and data/nearstars.stc :O Compare that to astro::AUtoLightYears(1), which gives 1.580302e-5.
I wonder if it is even used...
Is Sun distance wrong?
In older versions of Celestia, the Sun is offset from [0,0,0] in order to avoid problems caused by division by zero.
This has been changed in v1.5.0 (currently in prerelease) so that the Solar System's barycenter is at the origin and the Sun correctly orbits around it. The Sun's orbital path looks quirky in v1.5.0 because the Sun's orbit does not follow an ellipse due to the motions of the major planets.
This has been changed in v1.5.0 (currently in prerelease) so that the Solar System's barycenter is at the origin and the Sun correctly orbits around it. The Sun's orbital path looks quirky in v1.5.0 because the Sun's orbit does not follow an ellipse due to the motions of the major planets.
Selden