views:

97

answers:

1

An astounding alignment occurs 2048/5/28 with the inner 5 planets having heliocentric longitudes (in degrees): 248.229, 66.631, 246.967, 249.605, 67.684.

The planets are at most 0.875 degrees from the line (through Sol) with slope 67.823 degrees. In this case, the method sought (PA) would give: PA(248.229, 66.631, 246.967, 249.605, 67.684) = (67.823, 0.875)

I have tried two simple algorithms which both fail on the case: 2003/9/9: 340.256, 180.320, 346.156, 342.316, 150.285

One method gives slope=127.867, deviation=51.019 and the other 271.867, 85.251. I think a correct method would give s=163.466, d=7.515.

The main problem is that planets on opposite sides of Sol can be (nearly) on the same line.

Python or javascript appreciated. Yay I figured out how to edit! Or not.

def score3(wList):
  wSize = len(wList)
  #print wList

  first = wList[0]
  d1 = first - 90.0
  if d1 < 0.0:    d1 += 360.0
  d2 = first + 90.0
  if d2 > 360.0:  d1 -= 360.0
  if d1 > d2:   d1,d2 = d2,d1

  sum = 0.0
  for wx in range(0,wSize):
    curr = wList[wx]
    if (curr > d1) and (curr < d2):
      new = curr
    else:
      new = (curr + 180.0) % 360.0
      wList[wx] = new
    sum += new
    #print '%7.3f --> %7.3f' % (curr, new)
  avg = sum / wSize
  #print avg, wList

  score = 0.0
  for wx in range(0,wSize):
    curr = wList[wx]
    diff = curr - avg
    if diff < 0:   diff = - diff
    score += diff
  score /= wSize

  return avg, score
A: 

Dumb as dirt method didn't work for reasons that should have been obvious: your data can be pathological for any choice of half-plane to map to. I'm going to recommend a least squares approach, but you do need to deal with the radial ambiguity.

That means the function that you are looking to minimize is:

\sum (forceAngleIntoQuandrantI(a_i - A))^2

or something equivalent. That is, the planet can never lie more than 90 degrees from the proposed line.

Now, if you use a forcing routine like I showed initially (you can still find that in the edit history for this answer), the problem is no longer analytical and you'll have to use an iterative approach (see Bisection Method for a simple approach). Or you can note that sin^2(theta) is monotonically increasing in quadrants I,IV and symmetric about the +- 90 degree line and minimize

\sum sin^4(a_i - A) 

without clipping using the analytical methods described in the MathWorld link (or look at wikipdia if you prefer).

dmckee