Page 1 of 1

List of SSC commands and other useful info

Posted: 04.04.2004, 15:56
by Rassilon
Ive decided to start a thread with all of the not so common ssc commands with thier syntax as simple to understand as possible for everyone interested...It will help me also when something new is added to update this thread with the new command...I will add to it as needed...so if there is one you arent sure of ask here and if I dont know it selden will...If I am incorrect please say so so I can edit in the correct info...

Orientation [ angle x-axis y-axis z-axis ]
Orientation is the command used with 3ds, cms or cmod files to correctly orient then in the simulations universal coordinate system. Angle is -360 to 360 floating point number. x-axis, y-axis and z-axis is -360 - 360 floating point number.

Align.log
celestia --verbose >align.log
Sends output to a text file located in the Celestia root folder titled 'align.log' and will open with any conventional text editor. The commands to access Edit mode in Celestia are as follows:

SHIFT + 2 or '@' Enter edit mode.
SHIFT + 1 or '!' Save output of edit mode to Align.log

To orient the object use your left mouse button while holding the CTRL and SHIFT keys all together.


Next on the list MeshCenter...Maybe someone could enlighten me to its syntax and usage...

Posted: 05.04.2004, 21:42
by granthutchison
MeshCenter has the syntax

MeshCenter [ x y z ]

where x, y and z are all all float values.

By default, Celestia builds a bounding box around a mesh object, and takes the centre of the bounding box to be the centre of the object. But various objects like moons, asteroids and spacecraft have their centre of gravity offset from the centre of the bounding box - in Celestia they'll rotate around the wrong axis, locations will appear in the wrong position, and Goto Object will take you to the wrong position. So you need to tell Celestia where you want the centre of the object to be, relative to the centre of the bounding box.
The coordinates x, y and z are the displacements for the object centre relative to the bounding box centre. You can find out what they should be from your modelling program. Some programs will give you the centre coordinates directly; for others, you'll need to work them out from the maximum and minimum coordinates of the mesh object.

Grant

Posted: 05.04.2004, 21:50
by granthutchison
To add to Rass's description of the Orientation command:

The values x-axis, y-axis and z-axis actually define a vector, which is the axis around which the object is rotated through angle degrees. They can take any value, but it's unusual to set them to more than 1 or less than -1.
The commonest forms of syntax are:

Orientation [ angle 1 0 0 ]
(rotates around x axis)

Orientation [ angle 0 1 0 ]
(rotates around y axis)

Orientation [ angle 0 0 1 ]
(rotates around z axis)

Rotation is clockwise around the following axes:
y ... the north rotational pole of the object
x ... the direction opposite the prime meridian when Celestia time = Epoch, and RotationOffset = 0
z ... at right angles to the above, forming a left-handed coordinate system

Setting the axis negative reverses the direction of rotation.

Grant

Posted: 18.11.2004, 19:42
by TERRIER
I've had a go at aligning my ISS model, using the Edit Mode.

Pressing the '@' key seems to activate everything OK, as the wordsEdit Mode are displayed at the top of the screen.

After a bit of tricky manoevering with the mouse, I've managed to change the orientation of the model to how I like it, and saved the result using the '!' key.
I then exited Edit Mode by pressing the '@' key again.

However when I opened up the main Celestia directory, the align.log file was nowhere to be seen.

I then tried a search for the file throughout my entire computer system, but nothing was found. It appears that no file was ever created. :cry:

Would the fact that I have named my main Celestia directory file Celestia1.4.0p6 be the cause of the problem ?

My second question is;
Can all 3 orientation commands for x,y and z be specified within an .ssc file ?
ie [ 34 1 0 0 ] [ 25 0 1 0 ] [ 90 0 0 1 ]

Posted: 18.11.2004, 21:05
by selden
Terrier,

Which version of Celestia did you use and exactly what command line did you use?

I just tried generating new alignment coordinates for the ISS and had no problems.

Here's the procedure that I used:

open a command window (Run/cmd)

cd Program Files\Celestia
celestia --verbose >align.log
(Celestia window opens)
[return]iss[return]
g
Shift-@
twiddle the model's orientation with ctrl-shift-LMB
Shift-!
exit Celestia
type align.log

The procedure above causes the file to be created in the Celestia main directory.
Note that there are two hyphens in front of "verbose" and that the file isn't actually closed and readable until you exit from Celestia.

This was tested with Celestia v1.4.0pre6 and with Celestia v1.3.2final.

Posted: 19.11.2004, 20:32
by TERRIER
Cheers for the pointers Seldon, I have two main drives on my computer - C-drive and D-drive, and both include a copy of 1.4.0p6. The one on my D-drive has all my add-ons and I've re-named it 'Celestia1.4.0p6'. This was causing me some confusion. :oops:

The following command lines for Celestia on my C drive work like a charm :D ;

cd C:\Program Files\Celestia
celestia --verbose >align.log
align.log


The result in the align.log of some 'random alignment' :lol: I did to the ISS model was;

Code: Select all

#0/Earth/ISS
Orientation: [-0.128809,-0.962289,-0.239599], 33.806
Saving preferences . . .
Opened registry key


Do I have to incorporate this info into the ISS ssc file to give it the new orientation ?

Posted: 19.11.2004, 20:51
by selden
Terrier,

I've never actually done this for an SSC object, and I haven't looked at the code recently, so I'm not exactly sure what'll happen, but...

One of the declarations you can use when describing an object in an SSC file is
Orientation [ # # # #]

I'm guessing your results would be inserted as

Code: Select all

Orientation [-0.128809 -0.962289 -0.239599 33.806 ]

Note that the commas have to be replaced by spaces.

I don't know how this interacts with the other object rotation commands. I know it replaces some of them. The rotation commands I mean are

Code: Select all

# RotationPeriod (hours) number
     If not supplied, Rotation period (in hours) = orbital period (in days) * 24.

# PrecessionRate number (default = 0.0) (deg/?)
# RotationOffset number (default = 0.0) (deg)
# RotationEpoch number (no default) (JulianDay)
# Obliquity number (default = 0.0) (deg)
# EquatorAscendingNode number (default = 0.0) (deg)

Posted: 12.02.2007, 08:39
by psCargile
In v 1.4.1 you can take the align.log data:

Code: Select all

Orientation: [0.0133964,0.999795,0.0151858], 133.005


read as Orientation: [x-axis, y-axis, z-axis], angle

and convert it to the ssc data:

Code: Select all

Orientation  [ 133.005 0.0133964 0.999795 0.0151858 ]


read as Orientation [angle x y z]
or

Code: Select all

Orientation [ 133.005 0 1 0 ]


Rounding the axis identifiers to zeros and ones works too.

These numbers were generated from something I made, so newbies shouldn't plug in the above numbers for their spacecraft.

I discovered this fooling around with the Orientation commands when [ 135 0 1 0 1 ] was very close to my shift-2 manipulating.