Orbiter Trajectories into Celestia

General discussion about Celestia that doesn't fit into other forums.
Topic author
Boxx
Posts: 10
Joined: 01.08.2008
With us: 16 years 3 months

Orbiter Trajectories into Celestia

Post #1by Boxx » 15.11.2009, 23:07

Hello !

Is there anybody ready to write an "Import Function" of Orbiter Spaceflight Simulator trajectories into Celestia? It doesn't seem that the topic exists yet, so I am creating the topic and I provide here a step-by-step procedure that I tested first. But I don't know how to program it in C+ or Lua language (and what should be the best language? maybe not inside Celestia...).

Indeed have you ever wanted to create your own XYZ trajectory in Celestia? Well, it's quite difficult! Then "just" record and export it from Orbiter! But actually it's not so simple. Tell me your interests, your needs for explanations or your advises!

... procedure to follow...
Boxx
http://boxx.over-blog.com/
"Here is the box, the lamb you want is inside", Saint-Ex'

Topic author
Boxx
Posts: 10
Joined: 01.08.2008
With us: 16 years 3 months

Orbiter Trajectories into Celestia (procedure)

Post #2by Boxx » 15.11.2009, 23:16

This step-by-step "export" procedure to Celestia is still a bit complicated manually, and it can surely be simplified and improved. At least I tested it:

1°) Create your own trajectory in Orbiter with the "Recorder" (Ctrl-F5), say a trip from Earth to Mars
2°) Your trajectory is stored in a ".pos" file in Orbiter's "Flights" folder, see format in [Orbiter]/Doc/Technotes/RecorderRef.pdf
3°) One block of lines is created for each of the bodies (Earth, Sun, Mars) that successively becomes the biggest contributor in the gravity vector within your trajectory.
  • Block headlines with STARTMJD for the starting time and the coordinate system (here "Polar", I did not see any cartesian case).
  • After the headlines, the lines provide T(sec.after STARTMJD), R(m), Phi(rad), Theta(rad) and their d/dt values. The reference is the BodyFixed reference frame (rotating Earth, then Sun J2000 ecliptic and then rotating Mars)
4°) Transform each block in lines with cartesian XYZ (+vx, vy, vz) still in the BodyFixed reference frame (I validated with a spreadsheet...wow! but it works).
  • Attention: there is a mistake here in Dr.Martin Schweiger's Recorder Doc.: use x= R.cos(Theta).cos(Phi) ; y= R.cos(Theta).sin(Phi) ; z= R.sin(Theta) (Phi is Longitude, Theta is Latitude, Z=South-to-North, [Z,X]= Null-Longitude, Y=Z^X)
  • also convert XYZ in km and copy/paste in 3 different .txt files (one per block)
  • convert Orbiter time T in Julian date : newT= T+ 2'400'000.5 + STARTMJD

5°) Rename ".txt" in ".xyz" and store in [Celestia]/extra/[yourTrip]/Data. Be careful again: decimal must be indicated with a dot "." and not a coma "," (French-writing systems!). Eventually replace all comas with dots in the files
6°) In [Celestia]/extra/[yourTrip] write the ".ssc" file: create 3 objects (1 per block) and call the .xyz with sampledTrajectory {...}. Attention : specify the BodyFixed reference frame (except for Sun that is a star)

Finally you get the trajectory in Celestia... actually 3 separate trajectories because Orbiter records in the most gravity-significant reference (other settings possible?). A final step would be to merge the 3 trajectories in only one, but it requires to take into account the rotating reference of each body in the global Solar reference: another challenge! (I'm working on it)
Boxx
http://boxx.over-blog.com/
"Here is the box, the lamb you want is inside", Saint-Ex'

Avatar
Hungry4info
Posts: 1133
Joined: 11.09.2005
With us: 19 years 2 months
Location: Indiana, United States

Re: Orbiter Trajectories into Celestia

Post #3by Hungry4info » 15.11.2009, 23:22

That would be amazing in so many ways.
Current Setup:
Windows 7 64 bit. Celestia 1.6.0.
AMD Athlon Processor, 1.6 Ghz, 3 Gb RAM
ATI Radeon HD 3200 Graphics

Topic author
Boxx
Posts: 10
Joined: 01.08.2008
With us: 16 years 3 months

Re: Orbiter Trajectories into Celestia

Post #4by Boxx » 20.11.2009, 11:42

A converter tool does exist as an Orbiter Add-on: "Orb2Cel MFD v.2" by brianj.
It is still not perfect but it's a good starting point.

I tested it and I have written a detailed review.
Find this add-on and join the discussion there : [Orbiter-Forum topic]
Boxx
http://boxx.over-blog.com/
"Here is the box, the lamb you want is inside", Saint-Ex'

DOJOMO
Posts: 49
Joined: 10.08.2005
With us: 19 years 3 months

Re: Orbiter Trajectories into Celestia

Post #5by DOJOMO » 20.11.2009, 14:03

I have attached a solution to the problem that I think was produced by either Selden or Fridger a while ago. I kept a copied it and have reproduced it below. I don't have a link to it, sorry. Please thank them as I had nothing to do with it.

"This problem was submitted by me a long time ago, and if I remember correctly Selden gave me the correct solution.
Here are the steps:
1- rightclick on your celestia desktop icon (windows) and go to properties;
2- in the target-path for the celestia.exe add " --fullscreen" i.e double space double minus sign fullscreen.( no extra quote marks) Without double space it doesn't work;
3- push OK;
4- open Celestia using the desktop icon ;
5- open "Render" and "Select display mode";
6- you'll find the Resolution as "Windowed Mode";
7- select the Resolution you wish to use, e.g. 1600x1200x32;
8- push OK;
9- repeat steps 4, 5 and 6, but this time choose "Windowed Mode";
10- push OK;
11- repeat steps 4, 5 and 6, but this time choose "1600x1200x32";
12- push OK;
13- close Celestia.
Now every time you'll open Celestia from the desktop icon, Celestia will open at 1600x1200x32."

Regards
Dojomo
Celestia svn 5178
Sony Vaio VPCF12c5E laptop Intel(R) Core(TM) i5 CPU M 450 @ 2.4GHz, 500gb hard drive, 1Gb nvidea GeForce GT 330M GPU Open GL 2.0, Windows 7 Professional 64 bit. Fully updated.

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: Orbiter Trajectories into Celestia

Post #6by Fenerit » 26.11.2009, 13:34

Excuse me, just a noob question here. Does someone knows more about this program?

http://sta.estec.esa.int/Space_Trajectory_Analysis/About.html

It seem, I say "seem" because the informations are a bit cryptics, that makes custom orbits for then to be showed with the aid of Celestia that is embedded into. Are these orbits saved in xyzv format or what?
Never at rest.
Massimo

Guckytos
Posts: 439
Joined: 01.06.2004
With us: 20 years 5 months
Location: Germany

Re: Orbiter Trajectories into Celestia

Post #7by Guckytos » 26.11.2009, 17:11

Fenerit wrote:Excuse me, just a noob question here. Does someone knows more about this program?

http://sta.estec.esa.int/Space_Trajectory_Analysis/About.html

It seem, I say "seem" because the informations are a bit cryptics, that makes custom orbits for then to be showed with the aid of Celestia that is embedded into. Are these orbits saved in xyzv format or what?

Chris would be good resource to ask that question, as he is programming on it.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: Orbiter Trajectories into Celestia

Post #8by chris » 26.11.2009, 22:09

Fenerit wrote:Excuse me, just a noob question here. Does someone knows more about this program?

http://sta.estec.esa.int/Space_Trajectory_Analysis/About.html

It seem, I say "seem" because the informations are a bit cryptics, that makes custom orbits for then to be showed with the aid of Celestia that is embedded into. Are these orbits saved in xyzv format or what?

They orbits in STA are saved in temporary files that are almost Celestia compatible. What you would probably want to do is to use STA's 'export to CSV' feature to generate a comma-separated value file. You could then use a simple Python or Perl script (or any language, really) to convert it to a Celestia xyzv file by removing the commas.

--Chris

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: Orbiter Trajectories into Celestia

Post #9by Fenerit » 26.11.2009, 23:13

chris wrote:
Fenerit wrote:Excuse me, just a noob question here. Does someone knows more about this program?

http://sta.estec.esa.int/Space_Trajectory_Analysis/About.html

It seem, I say "seem" because the informations are a bit cryptics, that makes custom orbits for then to be showed with the aid of Celestia that is embedded into. Are these orbits saved in xyzv format or what?

They orbits in STA are saved in temporary files that are almost Celestia compatible. What you would probably want to do is to use STA's 'export to CSV' feature to generate a comma-separated value file. You could then use a simple Python or Perl script (or any language, really) to convert it to a Celestia xyzv file by removing the commas.

--Chris

Then the problem of having custom orbits is solved! I don't want to hijack this topic furthermore, but I suppose the relation between STA and Celestia be hardcoded, because there isn't track about the possibility of downloading the former separately and to install it on a exant copy of Celestia. Anyhow, as said, I shut here.
Never at rest.
Massimo

Topic author
Boxx
Posts: 10
Joined: 01.08.2008
With us: 16 years 3 months

Re: Orbiter Trajectories into Celestia

Post #10by Boxx » 28.11.2009, 00:55

Fenerit wrote:Then the problem of having custom orbits is solved! I don't want to hijack this topic furthermore
it's ok, no hijack at all. I'm interested too in STA : I still don't understand how it works exactly and what it is about (only plotting trajectories on a map?).

Regarding the link I've indicated [here again], orbiter add-on's creator has participated in the discussion but maybe someboby else should take further the add-on programming... any volunteer? I can provide the equations :)
Boxx
http://boxx.over-blog.com/
"Here is the box, the lamb you want is inside", Saint-Ex'

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: Orbiter Trajectories into Celestia

Post #11by Fenerit » 28.11.2009, 10:41

Boxx wrote:
Fenerit wrote:Then the problem of having custom orbits is solved! I don't want to hijack this topic furthermore
it's ok, no hijack at all. I'm interested too in STA : I still don't understand how it works exactly and what it is about (only plotting trajectories on a map?).
.
.

Well, from what I understood, STA makes orbits with the aid of windowed graphics tools in which users can place its custom parameters; then STA shows the results for the body under analisys inside a windows that is just a Celestia's version embedded in. I've not downloaded STA yet because this fact of having Celestia embedded in make me perplex about version's conflicts and such. Chris says that these custom orbits are salveables in CSV format and are as xyzv files but with the commas between values; thing that could be resolved by the search/replace of an editor (commas replaced with spaces), then saved as .xyzv; thereof the usual CustomOrbit directive would allow "our Celestia" to trace it.

EDIT LATER:
The map plotting function is another feature of STA but these orbits are simulate inside the 3d environment of that Celestia's version underlying.
Never at rest.
Massimo

Topic author
Boxx
Posts: 10
Joined: 01.08.2008
With us: 16 years 3 months

Re: Orbiter Trajectories into Celestia

Post #12by Boxx » 01.12.2009, 11:45

Thank you again for providing the link to STA, a very interesting tool indeed! I tested it: very good potential, unfortunately many bugs (most not reported) and unconsistant documentation on many "little" points. It's surprising because the project was started 4 years ago with strong partners like ESA! Some comments here:

Fenerit wrote:I've not downloaded STA yet because this fact of having Celestia embedded in make me perplex about version's conflicts and such.
Don't worry about that : you install STA in its own directory, then a mini-Celestia is also installed in STA directories (STA+ included mini-Celestia are about 180MB). It did not change anything in my already installed Celestia. This is a very clever way to re-use Celestia environment. However 1 remark: why did they change the standard Celestia .xyzv format in the Export function (comas instead of spaces)?!?

Furthermore:
- I was unable to define a (fictional) ground station or a simple location on Mars (and other bodies?) : only Earth is allowed!!!
- The junctions between successive trajectory segments are *very* difficult to be defined (and sometimes still in develoment), some wizard or default calculated settings would help. Otherwise it would remain a "rocket scientist"-only tool
- some key-shortcuts do not work, or not always (maybe bugs in the focus management)

Keep up the project... and boost it!
Boxx
http://boxx.over-blog.com/
"Here is the box, the lamb you want is inside", Saint-Ex'

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: Orbiter Trajectories into Celestia

Post #13by Fenerit » 01.12.2009, 13:11

Happy to have help in these matters. BTW, orbits aren't between my major concerns here in Celestia, but never mind. Just one point I haven't been able to parse: although incomplete and buggy, does the resulting STA's csv work within the "default" Celestia once converted into xyzv?
Never at rest.
Massimo

Topic author
Boxx
Posts: 10
Joined: 01.08.2008
With us: 16 years 3 months

Re: Orbiter Trajectories into Celestia

Post #14by Boxx » 01.12.2009, 14:32

Yes it should work. I only had a quick look on the csv format : after replacing comas by spaces it "should" work, sure, but (further example of non-maturity) the documentation does not tell the reference plane! (or I did not find...). I'd like to help, but help me help them!

Actually I concentrated myself on the difficulties to graphically build my first trajectory : a high-excentricity orbit around Mars flying just above a given location at the perigee (say the pit crater Annie on Arsia Mons)... wow! well... just don't try :cry:
Boxx
http://boxx.over-blog.com/
"Here is the box, the lamb you want is inside", Saint-Ex'

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: Orbiter Trajectories into Celestia

Post #15by Fenerit » 02.12.2009, 01:52

The STA forum http://sourceforge.net/apps/phpbb/sta/ seem a bit "rest". But probably something more can tell.
Never at rest.
Massimo


Return to “Celestia Users”