Hi everybody,
I'm new to Celstia and I am trying to figure it out if it is possible to interface MATLAB (used for attitude and orbit simulations) with Celestia (for visualization purposes). I found this guy actually made it (https://www.youtube.com/watch?v=kLJmx2JcyXE) but I was not able to find any details on how to load data computed in MATLAB in Celestia.
Any suggestion and/or references?
Thanks!
Celestia integration with MATLAB
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Hi! You can find an useful help here: https://en.wikibooks.org/wiki/Celestia
below you can see how Celestia does load trajectories files, they are simple text files and can be producted by MATLAB.
https://en.wikibooks.org/wiki/Celestia/Trajectories#SampledTrajectory
below you can see how Celestia does load trajectories files, they are simple text files and can be producted by MATLAB.
https://en.wikibooks.org/wiki/Celestia/Trajectories#SampledTrajectory
Never at rest.
Massimo
Massimo
- John Van Vliet
- Posts: 2944
- Joined: 28.08.2002
- With us: 22 years 2 months
Celestia also uses the SPICE data for orbital data
-- i use this for almost everything
and there is a Matlab API
http://naif.jpl.nasa.gov/naif/toolkit_MATLAB.html
now i do not know if this also runs in Octave ( a gpl'ed clone of matlab)
so you might have to already have a paid for and valid license for matlab
but using matlab to calculate orbits looks like adding a extra unneeded level of complexity
for the NAIF spice instructions in celestia see:
http://forum.celestialmatters.org/viewforum.php?f ... 849c53323c93faaa999a77df23614d
-- i am a bit over do for updates on that forum
that video is using the Juno xyzv files created from the spice kernels
( there is a program in the src folder of the celestia source code to convert the spice bsp files to a xyzv text file
and just using a *.m file to pass options to celestia -- like using a cel: url
---- this is where juno is now using the whole solar system spice
i added Juno to the spice forum
http://forum.celestialmatters.org/viewtopic.php?f=18&t=846
-- i use this for almost everything
and there is a Matlab API
http://naif.jpl.nasa.gov/naif/toolkit_MATLAB.html
now i do not know if this also runs in Octave ( a gpl'ed clone of matlab)
so you might have to already have a paid for and valid license for matlab
but using matlab to calculate orbits looks like adding a extra unneeded level of complexity
for the NAIF spice instructions in celestia see:
http://forum.celestialmatters.org/viewforum.php?f ... 849c53323c93faaa999a77df23614d
-- i am a bit over do for updates on that forum
that video is using the Juno xyzv files created from the spice kernels
( there is a program in the src folder of the celestia source code to convert the spice bsp files to a xyzv text file
and just using a *.m file to pass options to celestia -- like using a cel: url
---- this is where juno is now using the whole solar system spice
Code: Select all
cel://Follow/Sol:JunoSpaceCraft/2016-09-21T18:34:07.25765?x=AMCh20+eMOY&y=ANMIxDrImh0&z=ACisdkU5PzT//////////w&ow=0.586084&ox=-0.0296566&oy=-0.808194&oz=-0.0494896&select=Sol:JunoSpaceCraft&fov=34.1133&ts=1<d=0&p=0&rf=4069303&lm=10468&tsrc=0&ver=3
i added Juno to the spice forum
http://forum.celestialmatters.org/viewtopic.php?f=18&t=846
but using matlab to calculate orbits looks like adding a extra unneeded level of complexity
We use MATLAB to write our own GNC code for AOCS, I'd like to use Celestia only to show the results of my algorithms in a more graphical way than simple plots, which speaks more than 1000 words to engineers but do not impress non technical people.
One last questions: besides trajectories, can Celestia get attitude data as input as well in a similar way?
Thank you very much
You might want to consider adapting OpenSimKit instead of recreating the features you want from scratch.
While Celestia does include a "planetographic" coordinate system which makes use of altitude, you'd probably have to write a "scripted orbit" in order to use it with arbitrary, changing values. A scripted orbit can use whatever positioning algorithm is appropriate. For example, one could be written to read positions in realtime so Celestia wouldn't have to be restarted each time a new trajectory file was created.
These features have been implemented for Celestia's use in OpenSimKit. See http://opensimkit.org/ and http://opensimkit.org/resources/FCXNL-10A08-1864803-1-1864803witt.pdf
While Celestia does include a "planetographic" coordinate system which makes use of altitude, you'd probably have to write a "scripted orbit" in order to use it with arbitrary, changing values. A scripted orbit can use whatever positioning algorithm is appropriate. For example, one could be written to read positions in realtime so Celestia wouldn't have to be restarted each time a new trajectory file was created.
These features have been implemented for Celestia's use in OpenSimKit. See http://opensimkit.org/ and http://opensimkit.org/resources/FCXNL-10A08-1864803-1-1864803witt.pdf
Selden