Page 1 of 1

Planet vector of travel around the galaxy

Posted: 18.07.2013, 16:56
by jiveabillion
Would it be possible to show the vector each planet is traveling in its path around the galaxy with a script?

Re: Planet vector of travel around the galaxy

Posted: 29.07.2013, 20:41
by Marco Klunder
Hello jiveabillion,

It is possible in scripts to show velocity vectors for objects in Celestia, within a script.
It is however the design of Celestia, what these velocity vectors represent.
And your question, regarding the path around the galaxy is not (yet) one of the possibilities.

Objects have their orbits (or static positions) defined within Celestia (-addons) configuration files.
The velocity vector that can be shown within a script, represents the direction an object is moving in these pre-defined orbits.
It is even possible to give a vector a size, which may be determined/calculated as the result of its current velocity within its orbit.
All this can be done with the object:addreferencemark() / object:removereferencemark() CELX methods.

See: http://en.wikibooks.org/wiki/Celestia/Celx_Scripting/CELX_Lua_Methods/Celx_object#addreferencemark
http://en.wikibooks.org/wiki/Celestia/Celx_Scripting/CELX_Lua_Methods/Celx_object#removereferencemark
for more detail explenation of these scripting methods.

Example:

Code: Select all

moon=celestia:find("Sol/Earth/Moon")
refmarktable5={}
refmarktable5.type = "velocity vector"
refmarktable5.size = 2000
refmarktable5.color = "green"
refmarktable5.opacity = 1.0
refmarktable5.tag = "Speedvector"
moon:addreferencemark(refmarktable5)
wait(10)
moon:removereferencemark(refmarktable5.tag)