Page 1 of 1

Scripts and Barycenters

Posted: 22.11.2005, 18:49
by Malenfant
It would seem that Barycenters do not follow the general hierarchy that other objects use in Celestia - a star orbiting a Barycenter is not a 'child' of the Barycenter. Whereas a planet orbiting a star is a 'child' of the star, and a moon orbiting a planet is a 'child' of the planet.

Aside from the general inconsistency of implementation, this causes problems for celx script-writers since it seems there's no obvious way to use barycenters in a script. For example, I wanted to write a script where the user selected a barycenter and then activated the script that would take the observer to a distance from the barycenter where the stars orbiting it fit exactly inside the field of view. But without the ability to find the children of the barycenter, this (apparently) becomes impossible.

Is there any way to get around this problem or correct this implementation inconsistency? Probably the easiest way would be to add something to Celestia's code that looked for "OrbitBarycenter" in the stc and if it found it assigned that Barycenter as the parent of the star? Otherwise the only way to correct this would be to change how barycenters are declared which would be somewhat problematic I'd guess.

Posted: 22.11.2005, 18:58
by Cham
Yes, this is an annoying problem. And we can't see the stars orbit around their common CM, which is also very annoying. I'm not sure how this could be solved. Its related to the precision Celestia needs, to place the different hierarchical objects.

Posted: 22.11.2005, 20:59
by jll
A workaround that i used in celestia before 1.4 is to define the barycenter as a star with an important AppMag (ex 60).
The star thus defined is near "invisible" in normal use.

Look at He2-104 at celestiamotherlode.net.

i hope this will help you

Bye
jll

Posted: 23.11.2005, 19:05
by Malenfant
jll wrote:A workaround that i used in celestia before 1.4 is to define the barycenter as a star with an important AppMag (ex 60).
The star thus defined is near "invisible" in normal use.

Look at He2-104 at celestiamotherlode.net.

i hope this will help you

Bye
jll


That might help in specific cases, but not generally.