reload .xyz trajectory data

All about writing scripts for Celestia in Lua and the .cel system
Topic author
lukass
Posts: 1
Joined: 22.03.2017
With us: 7 years 1 month

reload .xyz trajectory data

Post #1by lukass » 22.03.2017, 12:27

Dears,

I would like to reload .xyz files via a .celx file while Celestia is running.

Is that anyhow possible? Or is Celestia restricted to only read in orbit/trajectory data when it is launched?

Cheers,
Lukas

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 21 years 8 months
Location: NY, USA

Post #2by selden » 22.03.2017, 20:17

Although Celestia's native SampledOrbit and SampledTrajectory xyz files can't be reloaded while Celestia is running, you can define and write your own ScriptedOrbit and ScriptedRotation functions which reload their xyz (or other data) files whenever you want. Since they have to be written in Lua, they can do whatever Lua programming can do, including I/O.

See https://en.wikibooks.org/wiki/Celestia/Trajectories#ScriptedOrbit
https://en.wikibooks.org/wiki/Celestia/Rotation_Models#ScriptedRotation
and
https://en.wikibooks.org/wiki/Celestia/Celx_Scripting/CELX_Lua_Methods
Selden


Return to “Scripting”