Page 1 of 1

Precessionrate/Obliquity bug in 1.5++ (1.5.1 pre)

Posted: 09.03.2008, 22:39
by rthorvald
I have discovered a new bug in my recent 1.5+ copy off SVN. It is a little difficult to describe, since i don??t know what causes it, so i have prepared a small test add-on that demonstrate the bug: Download here (1,8 mb)

In it, the Mother Object in Earth orbit holds two other objects:
- The Rotating thingy, which sits on the Mother Object via a LongLat declaration
- The Rotator, which rotates around the Mother Object at a pace that should keep the Rotating Thingy aligned with itself all the time (it should stay fixed on the same LongLat relative to it).

This it does in the 1.5 official distribution (OSX). But on the copy off SVN three days ago, it does not - here, the Rotating Thingy wanders all over the place.

I do not know what causes this, but suspect there is something wrong in the Obliquity and/or Precessionrate code.

Here is the SSC file, if you want to skip the download - just substitute with a couple of models of your own:

Code: Select all


"Mother Object" "Sol/Earth"
   {
    Class "spacecraft"
   Radius 12.215
   Mesh "th_placeholder.cmod"
        LongLat    [ 0 45.1 74.7 ]
   Albedo   0.1
   Orientation   [ 90 1 0 0 ]
   RotationPeriod   2
   Obliquity   -45
   EquatorAscendingNode   -55
   PrecessionRate   878.94208577352
   RotationOffset   242
   }

"Rotating thingy" "Sol/Earth"
   {
    Class "spacecraft"
   Radius 12.215
   Mesh "th_06skycity0.cmod"
        LongLat    [ 0 45.1 74.7 ]
   Clickable false
   Albedo 1e-32
   Orientation   [ 90 1 0 0 ]
   RotationPeriod   2
   Obliquity   -45
   EquatorAscendingNode   -55
   PrecessionRate   878.94208577352
   RotationOffset   242
   }

"Rotator" "Sol/Earth/Mother Object"
   {
    Class "spacecraft"
        Mesh         "th_02clipper.cmod"
   Radius         0.09
   LongLat    [ 0 -4.175 -1.251 ]
   Albedo 1e-32
   Orientation      [ 90 0 1 0 ]
   RotationOffset      65
   }



Again, this works in 1.5 official as well as in all the 1.5 Pre releases and even in 1.4 - but NOT in the current SVN pack.

- rthorvald

Posted: 10.03.2008, 01:21
by chris
Thanks for the bug report, Runar. It took me a while to track down the problem, but the fix was very simple.

The problem was with the default equatorial frame and not precession specifically. The equatorial frame for any object with a changing equatorial plane would behave as if the plane were fixed.

I committed the fix to SVN, revision 4187.

--Chris