List of SSC commands and other useful info

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

List of SSC commands and other useful info

Post #1by Rassilon » 04.04.2004, 15:56

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...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Post #2by granthutchison » 05.04.2004, 21:42

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

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Post #3by granthutchison » 05.04.2004, 21:50

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

TERRIER
Posts: 717
Joined: 29.04.2003
With us: 21 years 6 months
Location: West Yorkshire, England

Post #4by TERRIER » 18.11.2004, 19:42

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 ]
1.6.0:AMDAth1.2GHz 1GbDDR266:Ge6200 256mbDDR250:WinXP-SP3:1280x1024x32FS:v196.21@AA4x:AF16x:IS=HQ:T.Buff=ON Earth16Kdds@15KkmArctic2000AD:FOV1:SPEC L5dds:NORM L5dxt5:CLOUD L5dds:
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #5by selden » 18.11.2004, 21:05

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.
Selden

TERRIER
Posts: 717
Joined: 29.04.2003
With us: 21 years 6 months
Location: West Yorkshire, England

Post #6by TERRIER » 19.11.2004, 20:32

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 ?
1.6.0:AMDAth1.2GHz 1GbDDR266:Ge6200 256mbDDR250:WinXP-SP3:1280x1024x32FS:v196.21@AA4x:AF16x:IS=HQ:T.Buff=ON Earth16Kdds@15KkmArctic2000AD:FOV1:SPEC L5dds:NORM L5dxt5:CLOUD L5dds:
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #7by selden » 19.11.2004, 20:51

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)
Selden

psCargile
Posts: 25
Joined: 01.01.2007
With us: 17 years 10 months

Post #8by psCargile » 12.02.2007, 08:39

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.


Return to “Development”