Quaternions:
I know they have their benefits, but can you get your head round them?
No? - neither can I...
( I may be good @ many things but this is NOT one of them )
Here goes...
Some background:
http://www.ogre3d.org/wiki/index.php/Qu ... ion_Primer
Got all that?
No? Ok, here's hopefully a helpful start:

Crappy drawing - no?
But the point is this is how most of us think.
Heres a table of useful Quaternions:
Still makes little sence?
Remembering the crappy diagram of a ship

its pointing along the Z+ axis.
This is equivalent to the first row of the 'grabbed' table.
Want to face the other way? ( Z-)
Pick an axis that you will rotate about: I'll say X for arguments sake & rotate 180deg.
Equivalent to the second row in the 'grabbed' table.
So what do we know?
0-1 = 0-180deg rotation about the axis we've picked - in this case X.
Consequences?
Imagine the rotation happening in the 'crappy' diagram...
Got it? Yes you're now facing along z- but upsidedown!!
( This is why you launch upsidedown from my Consitution ship's dock - doh! )
Oolite expects a dock to be made facing Z+ & then I had to rotate it into place facing backward for the model.
How to fix?
Well: looking @ the 'grabbed' table we could also rotate 180 deg round the Z axis too.
So...
0 1 0 0 in row two plus 0 0 0 1 in row four = 0 1 0 1 !!
AhHa!!
or maybe I should have just roatated about the Y axis... 0 0 1 0 in the first place...
A lot of the time it doesn't matter what way up you end ( you're placing a turret )
But, it may matter for things like docks or other sub-entities...
- Quick table:
Entity name X Y Z - W X Y Z
Fore 0 0 0 1 0 0 0
Aft 0 0 0 0 1 0 0
Up 0 0 0 .5 .5 0 0
Down 0 0 0 .5 -.5 0 0
Port 0 0 0 .5 0 .5 0
Starboard 0 0 0 .5 0 -.5 0
Hmmm, bugger - no formating...
Hope this helps...
W? I hear you ask?
Have a think, compare to the table Dr. Nil kindly supplied - spot the difference? What ( if any ) difference does it make?
Think of W as a way of making the numbers add up to 1.0ish...
Next time rotating Sub-entities!!
( maybe )
Ps
Feel free to contribute ammendments / suggestions / other useful tit-bits...