The Lyddane bug

ROB MATSON (ROBERT.D.MATSON@cpmx.saic.com)
7 Apr 1997 14:02:27 -0800

Hi Jim (Varney),

For some reason neither of the email addresses that I have for you is working:

jamesv@softcom.net
jvarney@mail2.QUIKNET.com

I don't know if the trouble is at my end or yours, so I'm sending it to
Seesat-L (with apologies to everyone else!)

 - - - - - -

Hi Jim,

You wrote:  "I can see where alfdp changes from + to -, forcing a quadrant
change in Actan and xnodes goes from ~ 0.000001 to ~ 6.28318.

Is it the - Cos(xinc)*xnodes that causes the trouble?  Cos(xinc)*xnodes for
-0.001 <> for 6.28."

Yes.  Really, it is the uncareful handling of xnodes that is the source of the
trouble.  If omgasm was only dependent on the sine or cosine of xnodes, there
wouldn't be any problems.  But omgasm is dependent on the actual value of
xnodes, and this is why the routine fails.  Omgasm is *supposed* to be a
function of the CHANGE in xnodes:  the difference between its unperturbed
value (e.g. line 220), and the perturbed value based on ACTAN(alfdp,betdp). 
The SR #3 code isn't "smart" enough to realize that .001 radians minus 6.282
radians is not -6.281 radians.  It's .002185 radians.
That's the whole nature of the Lyddane bug.  And it was never fixed by either
T.S. Kelso or Space Command in any version ever published.  --Rob