So... here's how things are worked out at system creation time
- the planet is placed at its location
- the sun is placed in the
- the planet is rotated so that its axis points along a vector described by the cross product of the sun vector and the vector [1,0,0]. This ensures the axis has a consistent direction perpendicular to the sun (All Oolite main planets have an axial tilt of 0)
- the station is placed in the direction of the
Can't get this right, cim
. I'm probably not understanding something here.
Known problematic system is Ribior (6, 35). From planetinfo.plist I can extract the following:
station_vector = "-0.807 0.141 0.573";
sun_vector = "-0.204 -0.494 0.846";
The axis of the planet would then be parallel to:
> Vector3D(-0.204, -0.494, 0.846).cross([1,0,0]);
(-0, 0.846, 0.494)
And to see if the station is near the equatorial orbit I check the dot product:
> Vector3D(-0.204, -0.494, 0.846).cross([1,0,0]).dot([-0.807, 0.141, 0.573]);
Not even close to zero, so something is obviously wrong somewhere. But where?