star distance calculation error (solved)
-
Topic authorphoenix
- Posts: 214
- Joined: 18.06.2002
- With us: 22 years 5 months
- Location: Germany - Berlin
star distance calculation error (solved)
hi,
I've noticed that celestia's shown star-distance in the upper left corner is somehow miscalculated.
lets take hip 32349 and hip 99240 for example.
celestia shows a rounded distance of 22.446 ly
using startextdump I extracted the XYZ values of those stars:
32349 -1.612565 -5.482873 -6.427964
99240 4.284276 -14.01134 13.49721
now calculating the distance like celestia does:
sqrt(($x1 - $x2) * ($x1 - $x2) + ($y1 - $y2) * ($y1 - $y2) + ($z1 - $z2) * ($z1 - $z2));
that gives me a excat distance of 22.4615235921 (rounded to 22.462)
I'm getting the same margin of error between 0.02 and 0.05 ly for any random stars-combination.
So, where is the error? wrong values in stars.txt or some miscalculation in celestia?
I've noticed that celestia's shown star-distance in the upper left corner is somehow miscalculated.
lets take hip 32349 and hip 99240 for example.
celestia shows a rounded distance of 22.446 ly
using startextdump I extracted the XYZ values of those stars:
32349 -1.612565 -5.482873 -6.427964
99240 4.284276 -14.01134 13.49721
now calculating the distance like celestia does:
sqrt(($x1 - $x2) * ($x1 - $x2) + ($y1 - $y2) * ($y1 - $y2) + ($z1 - $z2) * ($z1 - $z2));
that gives me a excat distance of 22.4615235921 (rounded to 22.462)
I'm getting the same margin of error between 0.02 and 0.05 ly for any random stars-combination.
So, where is the error? wrong values in stars.txt or some miscalculation in celestia?
Last edited by phoenix on 15.09.2006, 13:39, edited 1 time in total.
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)
Is this to do with the solar system not being at the co-ordinate origin?
Try putting this .stc file in your extras directory (will break some cel URLs)
Does the problem remain?
Try putting this .stc file in your extras directory (will break some cel URLs)
Code: Select all
0 "Sol:Sun"
{
RA 0
Dec 0
Distance 0
SpectralType "G2V"
AbsMag 4.83
RotationPeriod 609.12 # 25.38 days
Obliquity 7.25 # correct orientation relative to ecliptic
EquatorAscendingNode 75.77 #
RotationOffset 23.00 # standard meridian
}
Does the problem remain?
Cham wrote:It is time that we put back our sun on its right place. Who cares about breaking some old cel URL ? Please, put back our star at its place for accuracy !
Yeah, I agree here - not having the sun at 0,0,0 is ridiculous. If there's a new Celestia 1.5.0 coming out, this should be changed for that.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system
And if really some of those broken cel URL are still alive, their creator will update them.
So PLEASE Chris, update Sol's position ! In the name of accuracy !!
So PLEASE Chris, update Sol's position ! In the name of accuracy !!
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
I intend to make the origin the solar system barycenter, not the sun itself. The International Celestial Reference System uses the solar system barycenter as it's origin. With a new feature in Celestia 1.5.0, it will be possible to set the origin of a Sun-orbiting body to either the solar system barycenter or the Sun. It will be interesting to watch the Sun's movement around the barycenter.
--Chris
--Chris
- PlutonianEmpire
- Posts: 1374
- Joined: 09.09.2004
- Age: 40
- With us: 20 years 2 months
- Location: MinneSNOWta
- Contact:
chaos syndrome wrote:From what I can tell, the speed of light is being fixed in 1.5.0, which would break the cel URLs anyway.
So we might as well put Sol at the centre. Or maybe the Sol-Jupiter barycentre?
The speed of light wasn't accurate in celestia before?
Terraformed Pluto: Now with New Horizons maps! :D
-
Topic authorphoenix
- Posts: 214
- Joined: 18.06.2002
- With us: 22 years 5 months
- Location: Germany - Berlin
chaos syndrome wrote:Is this to do with the solar system not being at the co-ordinate origin?
Try putting this .stc file in your extras directory (will break some cel URLs)Code: Select all
0 "Sol:Sun"
{
RA 0
Dec 0
Distance 0
SpectralType "G2V"
AbsMag 4.83
RotationPeriod 609.12 # 25.38 days
Obliquity 7.25 # correct orientation relative to ecliptic
EquatorAscendingNode 75.77 #
RotationOffset 23.00 # standard meridian
}
Does the problem remain?
no the distance is still off by about 0,016 ly
moving the solar system to 0,0,0 is about 206.8 au from its original position.
but if only the coordinate-system is shiftet, the relative distances between the stars would remain intact.
something else is wrong here, maybe the difference between the star and the observer is taken into account but not calculated right towards the other star.
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)
chris wrote:I intend to make the origin the solar system barycenter, not the sun itself. The International Celestial Reference System uses the solar system barycenter as it's origin. With a new feature in Celestia 1.5.0, it will be possible to set the origin of a Sun-orbiting body to either the solar system barycenter or the Sun. It will be interesting to watch the Sun's movement around the barycenter.
--Chris
That'll work too
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system
phoenix wrote:no the distance is still off by about 0,016 ly
moving the solar system to 0,0,0 is about 206.8 au from its original position.
but if only the coordinate-system is shiftet, the relative distances between the stars would remain intact.
something else is wrong here, maybe the difference between the star and the observer is taken into account but not calculated right towards the other star.
No, it isn't about the coordinate system. The coordinate system is ok, it is only the position of Sol which isn't correct. So changing that position will change the relative distance. It's not enough to explain your discrepancy, however.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"
No, it isn't about the coordinate system. The coordinate system is ok, it is only the position of Sol which isn't correct. So changing that position will change the relative distance. It's not enough to explain your discrepancy, however.
What do you mean Cham ,
how can the distance between 2 bodies (stars) be different if the observer-coordinate changes ?
Ren?©
rra wrote:No, it isn't about the coordinate system. The coordinate system is ok, it is only the position of Sol which isn't correct. So changing that position will change the relative distance. It's not enough to explain your discrepancy, however.
What do you mean Cham ,
how can the distance between 2 bodies (stars) be different if the observer-coordinate changes ?
Ren?©
The problem is with Sol's position, and NOT the coordinate system. Actually, Sol isn't placed at (0, 0, 0). It should be there ! That's all.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"