Page 4 of 7

Posted: Thu Oct 29, 2009 1:19 pm
by Commander McLane
Makara wrote:
Ahhhh - so you are saying that the original quaternion (1 0 0 0) was a rotation about an undefined axis.
No, (1 0 0 0) is simply the normal, unrotated quaternion.

Posted: Sat Oct 31, 2009 5:16 pm
by JensAyton
Commander McLane wrote:
Makara wrote:
Ahhhh - so you are saying that the original quaternion (1 0 0 0) was a rotation about an undefined axis.
No, (1 0 0 0) is simply the normal, unrotated quaternion.
To be specific: given an axis [x, y, z] and a twist angle α, the quaternion is (cos α, x sin α, y sin α, z sin α). Not rotating an object is equivalent to rotating it 0 ° about an arbitrary axis. cos 0 ° is 1, and sin 0 ° is 0, so the identity rotation is (1, 0, 0, 0) regardless of what axis you’re rotating 0 ° about. In other words, it is a rotation about an undefined axis, but it’s also explicitly a rotation of 0 °, so the axis doesn’t matter.

Oolite normalizes all quaternions it reads in, which means scaling all its components by the same value has no effect. (1, 0, 0, 0) is therefore equivalent to (47, 0, 0, 0) or (0.1, 0, 0, 0).

The obvious question is why you’d use such a brain-bending representation. I’m glad you asked!
  • Rotating a vector by a quaternion only requires multiplication and addition/subtraction, since the trig functions are already baked in.
  • Normalizing a quaternion only requires multiplication, addition and one square root.
  • Every normalized quaternion represents a rotation, and every rotation is represented by exactly one normalized quaternion. Quaternions which can’t be normalized, such as (0, 0, 0, 0), can reasonably be treated as the identity rotation.
The quaternion page on EliteWiki provides examples, and quaternions and spacial rotation on Wikipedia explains the maths (or, alternatively, makes your brain dribble out of your ears).

Posted: Sat Oct 31, 2009 9:33 pm
by Thargoid
Ahruman wrote:
Oolite normalizes all quaternions it reads in, which means scaling all its components by the same value has no effect. (1, 0, 0, 0) is therefore equivalent to (47, 0, 0, 0) or (0.1, 0, 0, 0).
To ask a somewhat tangential side question then, how does the rotational velocity key for subentities work? That's defined as a quaternion, so is the rotation speed there fixed, or relating to the pitch/roll/yaw settings for the sub-entity, or something else?

Posted: Sun Nov 01, 2009 1:23 pm
by JensAyton
Thargoid wrote:
To ask a somewhat tangential side question then, how does the rotational velocity key for subentities work? That's defined as a quaternion, so is the rotation speed there fixed, or relating to the pitch/roll/yaw settings for the sub-entity, or something else?
The rotational velocity key is rotation per second.

For instance, if you want to rotate once per 20 seconds around the Z axis:
α = 360 ° / 20 = 18 °
[x, y, z] = [0, 0, 1]
sin α ≈ 0.30902
cos α ≈ 0.95106
Q = (0.95106, 0, 0, 0.30902)

Given the normalization step, this can equally be written as (3.07768, 0, 0, 1), where 3.07768 = 0.95106 / 0.30902. In fact, in this form, the first number is the cotangent (1/tangent) of α, and the other three numbers are a unit vector. This works with any unit vector. How convenient. :-)

In practical terms, you could thus use 3 0 0 1 as the rotation parameters, and fiddle with the 3 until it looks right (higher values mean slower rotations).

Note: because this uses an orientation representation to represent rotation per second, it’s not possible to specify rotations faster than one rps. On the other hand, simply rotating a model isn’t a very good way to represent a propeller, because of temporal aliasing.

Posted: Mon Nov 09, 2009 3:28 pm
by Thargoid
Happily I can confirm that if I make the 0 0 0 0 to 1 0 0 0 change on the cmounts using my jump gates, the Caddie Omega works fine with them rather than just exploding like it did before.

This is under 1.73, and also under 1.74 v2727 (which does the modification itself on the fly).

Posted: Mon Nov 09, 2009 3:35 pm
by Screet
Thargoid wrote:
Happily I can confirm that if I make the 0 0 0 0 to 1 0 0 0 change on the cmounts using my jump gates, the Caddie Omega works fine with them rather than just exploding like it did before.
Does it also work after several times of loading oolite / flying around without flushing the cache in between?

That's where my problem with the said fix is: I can fly through fuel stations, but after some time I cannot until I flush the cache again :?

Screet

Posted: Mon Nov 09, 2009 3:38 pm
by Makara
Thargoid wrote:
Happily I can confirm that if I make the 0 0 0 0 to 1 0 0 0 change on the cmounts using my jump gates, the Caddie Omega works fine with them rather than just exploding like it did before.

This is under 1.73, and also under 1.74 v2727 (which does the modification itself on the fly).
Eric did some interesting testing work on this problem (in this thread) and came up with some useful results. The popping problem still exists even without the cmounts being present - although they do seem to guarantee an explosion.

btw - yours aren't the only caddy-killers in the Ooniverse, Thargoid, just the most widespread :wink:

Posted: Mon Nov 09, 2009 3:43 pm
by Thargoid
The jump gates (which I haven't released yet, but shouldn't be too long) were killing every time without fail. I've just tried a few back-and-forward trips with the mods made, and so far no explosions at all.

And I know my stuff isn't the only thing triggering the problem, but it frustrates me as much as ClymAngus and McLane as we all want all players to enjoy our OXPs to their full without worrying that they're going to mysteriously explode in the process (or at least that their Commanders might ;) ).

Posted: Mon May 24, 2010 6:28 pm
by Thargoid
Due to one of the changes in the current version of trunk (1.74) the Neo-Caduceus DCN no longer works with it (and gives log errors).

As these are beginning to be reported, and as I'd prepared it anyway - with ClymAngus's approval I'm offering an evolutionary upgrade of the DCN for anyone who wants to update it.

You can download it here - all you need to do is unzip that file and copy the script.js file within it to the Config folder in your neocaduceus.oxp install (you will overwrite the existing one). Then restart your game with the shift key held down to refresh your cache and your DCN should have evolved into the more powerful (and 1.74 compatible) version 2.0.

Note that this update IS NOT COMPATIBLE WITH OOLITE 1.73.4 or lower - if you try using it there it will just self-destruct and you'll still have no self-repair (although no more log errors either).

If you're using 1.73.4 just leave things as they are until you update to 1.74 when it's released. By that time hopefully ClymAngus will have his web hosting sorted and a new OXP version with this built-in.

Posted: Wed May 26, 2010 5:08 pm
by Thargoid
Slight update just uploaded (same URL as above) to remove a rogue ship.hasEquipment which I'd missed, as it's now depreciated.

Posted: Thu May 27, 2010 10:53 pm
by Cobramac
Greetings,

Anyone able to post a working link for this OXP please, i would very much appreciate it.

Posted: Thu May 27, 2010 11:05 pm
by Cody
Hi Cobramac, and welcome to 'the friendliest forum this side of Riedquat'.

I think that the link will be restored in the next few days... ClymAngus had some problems with his hosting company, which he said will be sorted by the end of the month.

Posted: Thu May 27, 2010 11:17 pm
by Cobramac
Thanks for the quick reply and the warm welcome :)

I thought his site has been down for some time and may take some further time to establish at the new hosts, and in light of my eager anticipation of adding the OXP, was hoping someone would be kind enough to provide an interim link if at all possible :P

Thanks again for the warm welcome !

Posted: Fri May 28, 2010 6:11 am
by Thargoid
As a very temporary measure (until CA's site and normal download service is restored) I've hosted the NeoCaddy here.

Note that this already has the 1.74 version of the script installed. If you want the test release version, once you've installed the OXP (in the usual fashion) you need to go into AddOns/neocaduceus.oxp/Config and then rename script.js to script.174, then also rename script.173 to script.js .

Doing that will switch the ship to the DCN self-repair script for test rather than trunk.

Posted: Fri May 28, 2010 3:33 pm
by Cobramac
Thank you very much for hosting the oxp Thargoid, much appreciated :)