reload .xyz trajectory data

Description: All about writing scripts for Celestia in Lua and the .cel system

lukass
Topic author
lukass
Topic author
Posts: 1
With us: 5 months 1 day

#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

selden
Avatar
selden
Posts: 10052
With us: 14 years 11 months
Location: NY, USA

#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”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest