Is it possible to change the xyz file??

All about writing scripts for Celestia in Lua and the .cel system
Topic author
MARKS
Posts: 8
Joined: 11.03.2007
With us: 17 years 2 months
Location: Spain

Is it possible to change the xyz file??

Post #1by MARKS » 30.06.2008, 12:01

Hello all, i would like to know if there is a function or something to change a xyz file while celestia is running, in order to change the tayectory of a satellite.
For example if it has an engine, which is turn on in a specific time, to change its trayectory. Sorry for my poor English, and thank you all.

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

Re: Is it possible to change the xyz file??

Post #2by selden » 30.06.2008, 12:12

Orbits which change dynamically at runtime have to be defined using
ScriptedOrbit, using functions written in Lua.

See http://en.wikibooks.org/wiki/Celestia/T ... iptedOrbit
Selden

Topic author
MARKS
Posts: 8
Joined: 11.03.2007
With us: 17 years 2 months
Location: Spain

Re: Is it possible to change the xyz file??

Post #3by MARKS » 30.06.2008, 16:34

Hi Selden, thank you for your answer. But what I'm trying to do is to generate diferents xyz files with a matlab menu aplication, and then, within a specific time, I want to charge that xyz files, while Celestia is running. Is there any way to do that? Or the only way to change trayectories is by using LUA?
Thanks a lot.

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

Re: Is it possible to change the xyz file??

Post #4by selden » 30.06.2008, 16:49

Sorry, I don't know of any way to replace trajectory files at runtime when they're explicitly specified using SSC SampledOrbit or SampledTrajectory directives.

One could use a Lua ScriptedOrbit function which gets its coordinates from different files on demand, though.

One could define different objects which use the different trajectories, but without knowing what you're actually trying to accomplish, I don't know if that'd be appropriate.
Selden


Return to “Scripting”