IoannisNasios/solarsystem

Bug in the calculation of earths longitude

lens17 opened this issue · 3 comments

Bug description

When calculating the position of the planets for the days 01. Feb. 1994 to 20. Feb. 1994 in the heliocentric model, the longitude values for all planets are increasing, except earths longitude, which is decreasing. I am pretty sure, that the earth orbits the sun in the same direction as the other planets but maybe I misunderstood some other part.

Steps to reproduce

  1. Initiate the heliocentric model for multiple successive days
  2. Check the longitude values of the planets

Expected behavior

The values should all increase from 0 to 360, before being reset to 0.

Actual behavior

The values are all increasing except for the planet earth, which produces decreasing values.

Example

Mercury Venus Earth ... Uranus Neptune Pluto
1 Feb 40.128605 321.130176 47.594349 ... 292.491378 290.984694 235.954543
2 Feb 46.059545 322.712984 46.579564 ... 292.502617 290.990671 235.961465
3 Feb 52.104250 324.296022 45.565080 ... 292.513856 290.996647 235.968387
4 Feb 58.246625 325.879301 44.550905 ... 292.525095 291.002623 235.975309
5 Feb 64.467773 327.462829 43.537049 ... 292.536333 291.008600 235.982230
6 Feb 70.746318 329.046617 42.523519 ... 292.547572 291.014576 235.989152
7 Feb 77.058894 330.630674 41.510326 ... 292.558810 291.020553 235.996073
8 Feb 83.380793 332.215008 40.497476 ... 292.570048 291.026529 236.002995
9 Feb 89.686727 333.799628 39.484978 ... 292.581286 291.032506 236.009916
10 Feb 95.951654 335.384541 38.472841 ... 292.592524 291.038482 236.016837
11 Feb 102.151601 336.969754 37.461072 ... 292.603762 291.044458 236.023758
12 Feb 108.264414 338.555276 36.449680 ... 292.614999 291.050435 236.030678
13 Feb 114.270379 340.141112 35.438671 ... 292.626236 291.056411 236.037599
14 Feb 120.152674 341.727269 34.428053 ... 292.637474 291.062388 236.044520
15 Feb 125.897627 343.313754 33.417835 ... 292.648711 291.068364 236.051440
16 Feb 131.494795 344.900571 32.408023 ... 292.659947 291.074341 236.058360
17 Feb 136.936874 346.487727 31.398624 ... 292.671184 291.080318 236.065280
18 Feb 142.219483 348.075227 30.389646 ... 292.682421 291.086294 236.072200
19 Feb 147.340858 349.663076 29.381096 ... 292.693657 291.092271 236.079120
20 Feb 152.301490 351.251279 28.372979 ... 292.704893 291.098247 236.086040

@len17 thank you for your notice. You were right. There was a bug in Earth's position when view='horizontal'. True position should be 360 - position. Bug Fixed and new version released.

I somehow still have earth on a "wrong" position. I compare the position with the diagram on www.in-the-sky.org and www.theplanetstoday.com and Earth seems to be shifted roughly about 180°. See attached a plot for today (13.04.2020) from the package and from theplanetstoday.com.

Plot (neglecting the latitudes and distances):

Plot (neglecting the latitudes and distances)

Screenshot from theplanetstoday.com:

Screenshot from theplanetstoday.com

You are once more correct! It was 180 off not 360. Thank you once more. I think it should be ok now.