Page 1 of 1

Coordinates in celestia

Posted: 05.07.2004, 16:15
by Paolo-82
Hello!

I hope you can help me, and I'm sorry in advance for my English.

The question is:
I need to know where the coordinate (0, 0, 0) is in celestia, the origin of the axis.
Before I thought that the origin was on the Earth on the position of vernal equinox or on the Sun.
But if I force the position of a star in the position x=0, y=0, z=0 (or RA=0, dec=0 and distance=0), I can see that it isn't so. I modify the function StarDatabase::loadBinary(istream& in), I've added these lines: (nStars is a counter from 0 to totalStars)

Code: Select all

if(stars[nStars].getCatalogNumber() == 88140)
{
   star->setPosition(Point3f(0.0f, 0.0f, 0.0f));
   // or alternatively
   //star->setPosition(astro::equatorialToCelestialCart(0.0f, 0.0f, 0.0f));   
}

if(stars[nStars].getCatalogNumber() == 0) // the Sun
{
   cout << "RA: " << RA << " dec: " << dec << " parallax: " << parallax << " distance: " <<

distance << '\n';
}

After compiling I can see that the star HD88140 is very far from the Sun... Out of the solar system.
The Sun is far 0.00326167 light years (206 AU) along the x axis from the origin... Why?

Thanks.

Paolo

Re: Coordinates in celestia

Posted: 05.07.2004, 16:37
by granthutchison
Paolo-82 wrote:The Sun is far 0.00326167 light years (206 AU) along the x axis from the origin... Why?
The Sun is assigned Hipparcos number zero in Celestia's stars database (file stars.dat). Its other parameters are stored to conform to the Hipparcos dataset, which means that it must be assigned a trigonometrical parallax and an apparent magnitude, rather than a distance and an absolute magnitude. Celestia (more or less at random) assigns it the very high parallax of 1000000 milliarcseconds (corresponding to 0.00326167 ly), and an apparent magnitude of -15.168, which produces the correct calculated absolute magnitude. The Sun can't be placed at the origin of the coordinate system without having an infinite parallax and infinite apparent magnitude.

Maybe if Chris were doing it over again he'd choose to have distance and absolute magnitude fields in stars.dat, computed from the original Hipparcos data - that would then allow the Sun to be placed at the coordinate origin without creating infinities. But maybe there are other considerations I don't know about.

Grant

Re: Coordinates in celestia

Posted: 06.07.2004, 04:37
by chris
granthutchison wrote:Maybe if Chris were doing it over again he'd choose to have distance and absolute magnitude fields in stars.dat, computed from the original Hipparcos data - that would then allow the Sun to be placed at the coordinate origin without creating infinities. But maybe there are other considerations I don't know about.


Grant,
Excellent summary of why the Sun is not at (0, 0, 0) in Celestia. If there weren't compatibility concerns with existing scripts and cel URLs, I'd definitely change the stars.dat to use rectangular coordinates and absolute magnitudes to avoid problems at the origin.

--Chris

Posted: 07.07.2004, 09:18
by Guest
Thanks a lot for your reply! Now I have understood. :wink: