Orbiter as a visualization tool

laura

New member
Joined
Feb 20, 2017
Messages
17
Reaction score
0
Points
0
Hello everyone!

I was wodering if there is any option in Orbiter which allows the use of the visualization implementing the trayectory and orientation of the spacecraft I have got though my own propagator.

Thanks a lot!
 

FlyingSinger

Tutorial Publisher
Tutorial Publisher
Donator
Beta Tester
Joined
Mar 17, 2008
Messages
53
Reaction score
2
Points
8
You can use the Orbiter flight recorder/playback feature for this. The flight recorder files are normally created within Orbiter, by turning on the Record feature while Orbiter is running a scenario. There are several time-step indexed ASCII files created and saved during the recording period (.atc, .att, .pos, .dat). These contain state vector, event, and auxiliary information which allow Orbiter to later play back the flight. You can see examples of these in the Orbiter ./Flights directory (you can open them with Notepad or another text editor).

The format of these files and of the recording conventions are well documented in ./Doc/Technotes/RecorderRef.pdf. Using this information and following the examples, you can create flight recorder files with state vector information from your own calculated trajectory and then play these back within Orbiter with the spacecraft of your choice. You might try recording in Orbiter a brief scenario which is close to your situation as a template (e.g., orbiting Moon or whatever). This will give you correctly formatted files you can edit to replace the position and velocity data in the .pos file, the attitude data in .att file, and other relevant data in the .atc (articulation) and system.dat (camera info, annotation, etc.) files.

One of the reasons Dr. Schweiger created the Flight Recorder feature was precisely for this application. I believe it was used for a project at ESA and that Martin may have presented a paper related to this feature. I think this was introduced in Orbiter 2006.

Update: Here is the presentation Martin did for ESA in 2006. It includes a few slides on "visualisation of externally provided trajectory data:" http://orbit.medphys.ucl.ac.uk/press/orbiter2006.pdf
 
Last edited:

laura

New member
Joined
Feb 20, 2017
Messages
17
Reaction score
0
Points
0
Thank you so much for your quick answer! I will take a look :D
 

laura

New member
Joined
Feb 20, 2017
Messages
17
Reaction score
0
Points
0
It finally worked!! However, it seems that once you have propagated your own trajectory, a few parameters must be set in order to perform the simulation.

So, I am not pretty sure if Orbiter can perfom as a simply visualization tool without running its own propagator during the running simulation.

Furthermore, I was wondering if for the development of a launcher, the stage separation could be modelled as an animation or if there is other options.

Thank you!
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,660
Reaction score
2,381
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Furthermore, I was wondering if for the development of a launcher, the stage separation could be modelled as an animation or if there is other options.

Depends on what you want to display. There are many possibilities in Orbiter. What kind of separation do you want to model, like for example hot staging.
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
It finally worked!! However, it seems that once you have propagated your own trajectory, a few parameters must be set in order to perform the simulation.

So, I am not pretty sure if Orbiter can perfom as a simply visualization tool without running its own propagator during the running simulation.
I am not sure I am following. During a playback, vessel states are interpolated from the external state samples. They are not propagated by Orbiter's state integrator. You can however mix replays with an active simulation, i.e. have some vessels played back from external data, and others actively propagated.

Furthermore, I was wondering if for the development of a launcher, the stage separation could be modelled as an animation or if there is other options.

There are essentially two methods of representing stage separation in Orbiter:

  1. Model the individual stages as separate vessels. The launch stack is then created by docking the stages together, and stage separation is handled by undocking the lower stages.
  2. Represent the launch stack as a single vessel. At stage separation, reconfigure the vessel to remove the lower stage (delete meshes, modify mass, centre of gravity, etc.). At the same time, spawn a new vessel representing the discarded lower stage.
Note that option 1 is only available in Orbiter 2016, not in earlier versions, since previously docked vessels on the ground were not permitted. Consequentially, most existing multi-stage code samples are using method 2. An example for method 1 is the stock Atlantis code in the Orbiter 2016 SDK.

Also note that the two methods are handled differently in playbacks. This is due to a limitation in the playback mechanism: vessels spawned during the simulation are always active, rather than controlled by external state data. So if you employ method 2, the lower stage can't be pre-scripted after separation.
 

laura

New member
Joined
Feb 20, 2017
Messages
17
Reaction score
0
Points
0
Thank you both for your help.

It sounds much better the first option so I could extract all the data set from the simulator...

Thanks a a lot and I will keep you posted.
 

laura

New member
Joined
Feb 20, 2017
Messages
17
Reaction score
0
Points
0
Hello again!!! I have been working on the playback module, but I still cannot understand how the .att file Works.

Thanks again in advance.
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
Each line in the att file contains 4 numbers: time (relative to simulation start) and 3 Euler angles that define the spacecraft orientation against a reference frame.

Let's say the reference frame is the local horizon (I think this is the default). Then the Euler angles [math]\alpha, \beta, \gamma[/math] are the spacecraft's bank, pitch and yaw angle, respectively.

To convert between the Euler angles and a rotation matrix, consider that the rotation can be decomposed into 3 separate rotations: bank around the z-axis, pitch around the x-axis, and yaw around the y-axis:

[math]R = R_1 R_2 R_3[/math]
with

[math] R_1 = \left[\begin{array}{ccc} \cos\alpha & \sin\alpha & 0 \\ -\sin\alpha & \cos\alpha & 0 \\ 0 & 0 & 1 \end{array}\right], \quad R_2 = \left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos\beta & -\sin\beta \\ 0 & \sin\beta & \cos\beta \end{array}\right], \quad R_3 = \left[\begin{array}{ccc} \cos\gamma & 0 & -\sin\gamma \\ 0 & 1 & 0 \\ \sin\gamma & 0 & \cos\gamma \end{array}\right] [/math]
and therefore

[math] R = \left[\begin{array}{ccc} \cos\alpha \cos\gamma - \sin\alpha \sin\beta \sin\gamma & \sin\alpha \cos\beta & -\cos\alpha \sin\gamma - \sin\alpha \sin\beta \cos\gamma \\ -\sin\alpha \cos\gamma - \cos\alpha \sin\beta \sin\gamma & \cos\alpha \cos\beta & \sin\alpha \sin\gamma - \cos\alpha \sin\beta \cos\gamma \\ \cos\beta \sin\gamma & \sin\beta & \cos\beta \cos\gamma \end{array}\right] [/math]
and to map back from R to the Euler angles:

[math]R_{32} = \sin\beta \Rightarrow \beta = \arcsin R_{32}[/math]
[math]\frac{R_{12}}{R_{22}} = \frac{\sin\alpha}{\cos\alpha} \Rightarrow \alpha = \arctan\frac{R_{12}}{R_{22}}[/math]
[math]\frac{R_{31}}{R_{33}} = \frac{\sin\gamma}{\cos\gamma} \Rightarrow \gamma = \arctan\frac{R_{31}}{R_{33}}[/math]
Note that if you use the ecliptic frame instead of the local horizon as reference, the definition of the Euler angles is a bit different, so the corresponding rotation matrices also look different. In that case they follow the definition in the documentation for VESSEL::GetGlobalOrientation().

Does that answer your question?
 

laura

New member
Joined
Feb 20, 2017
Messages
17
Reaction score
0
Points
0
Thank you so much again Martins.

I must apologize because I meant the .atc file, the one containing the info about ENG.

The first column is related to the simulation time, but then, I cannot follow how to connect the engine group¿? to its level.


Each line in the att file contains 4 numbers: time (relative to simulation start) and 3 Euler angles that define the spacecraft orientation against a reference frame.

Let's say the reference frame is the local horizon (I think this is the default). Then the Euler angles [math]\alpha, \beta, \gamma[/math] are the spacecraft's bank, pitch and yaw angle, respectively.

To convert between the Euler angles and a rotation matrix, consider that the rotation can be decomposed into 3 separate rotations: bank around the z-axis, pitch around the x-axis, and yaw around the y-axis:

[math]R = R_1 R_2 R_3[/math]
with

[math] R_1 = \left[\begin{array}{ccc} \cos\alpha & \sin\alpha & 0 \\ -\sin\alpha & \cos\alpha & 0 \\ 0 & 0 & 1 \end{array}\right], \quad R_2 = \left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos\beta & -\sin\beta \\ 0 & \sin\beta & \cos\beta \end{array}\right], \quad R_3 = \left[\begin{array}{ccc} \cos\gamma & 0 & -\sin\gamma \\ 0 & 1 & 0 \\ \sin\gamma & 0 & \cos\gamma \end{array}\right] [/math]
and therefore

[math] R = \left[\begin{array}{ccc} \cos\alpha \cos\gamma - \sin\alpha \sin\beta \sin\gamma & \sin\alpha \cos\beta & -\cos\alpha \sin\gamma - \sin\alpha \sin\beta \cos\gamma \\ -\sin\alpha \cos\gamma - \cos\alpha \sin\beta \sin\gamma & \cos\alpha \cos\beta & \sin\alpha \sin\gamma - \cos\alpha \sin\beta \cos\gamma \\ \cos\beta \sin\gamma & \sin\beta & \cos\beta \cos\gamma \end{array}\right] [/math]
and to map back from R to the Euler angles:

[math]R_{32} = \sin\beta \Rightarrow \beta = \arcsin R_{32}[/math]
[math]\frac{R_{12}}{R_{22}} = \frac{\sin\alpha}{\cos\alpha} \Rightarrow \alpha = \arctan\frac{R_{12}}{R_{22}}[/math]
[math]\frac{R_{31}}{R_{33}} = \frac{\sin\gamma}{\cos\gamma} \Rightarrow \gamma = \arctan\frac{R_{31}}{R_{33}}[/math]
Note that if you use the ecliptic frame instead of the local horizon as reference, the definition of the Euler angles is a bit different, so the corresponding rotation matrices also look different. In that case they follow the definition in the documentation for VESSEL::GetGlobalOrientation().

Does that answer your question?
 
Top