This is republished from earlier. No changes, just bringing it back to the top of the page:

Python code for Lagrange calculations, and large body orbits

Note this is the same formula as listed in my letter for science. This website format makes it somewhat difficult to read. Please use the text file here for easiest reading.

https://www.dropbox.com/s/30kp7r43f7f9ayq/Lagrange%20Points.txt?dl=0

—

IN = float(input(“Enter IN: “))

N = float(input(“Enter N: “))

NP = float(input(“Enter NP: “))

IN = 0.5 if IN == 0 else IN

N = 0.5 if N == 0 else N

NP = 0.5 if NP == 0 else NP

init = IN * 1/2

baselimiter = N*1/2 + (IN*1/2*NP*1/2 / IN)

lset = init – baselimiter

easepoint = lset / 100

subdivide = lset / IN

limitconverto1 = (lset / init) * (init / lset)

infalatetoinput = (((init * float(IN))) / init )

forwardlimit = limitconverto1 * infalatetoinput

lpoint1 = init / lset * 1000000

lpoint1balance = lpoint1 – 1000000

result = init, baselimiter, lset, easepoint, subdivide, lset / init, init / lset, limitconverto1, infalatetoinput, forwardlimit, lpoint1, lpoint1balance

result = 0 if result == 0.5 else result

print(result)

—

End of code*********

baselimiter will calculate for ***L3 , lpointbalance or init / lset will calculate for ***L1

L2 is not yet defined

noteable ratios = .85714

2.014147

—

EARTH

300000000 – sun to earth diameter, radius 150000000

3000000 – L2 diameter, radius 1500000

768000- earth to moon diameter, radius 384400

Known calculations for earth to moon:

652800 – L1 – 326400 km

897800 – L2 – 448900 km

763400 – L3 – 381700 km

Calculations made by this formula for earth to moon:

L1 – 337916.9286208069 km

L2 –

L3 – 37785554.56 km

384472.282 is current measured distance from Earth to Moon in km

Calculated distance for moon in km by this formula = 37401154.56

Calculating Earth to moon Lagrange points, starting with Sun to earth, earth to moon, and sun to earth radius. Please remember that these numbers vary in the real world as orbits are completed. They are not supposed to be static numbers.

At some point this will lead to being able to calculate the over time numbers. It can be done with perfect accuracy, that will take time to figure out.

Enter IN: 299209236.48 – Sun to earth diameter

Enter N: 768800 – Earth to moon diameter

Enter NP: 149604618.24 – Sun to earth radius/distance from center points

=

(149604618.24, 37785554.56, 111819063.68, 1118190.6368, 0.37371528030176404, 0.7474305606035281, 1.3379169286208068, 1.0, 299209236.48, 299209236.48, 1337916.928620807, 337916.9286208069, 419060.55529411766)

***L3 calculated as 37785554.56 ***L1 calculated as 337916.9286208069

Calculating best distance of moon (easepoint): Sun to earth, to moon

Enter IN: 299209236.48

Enter N: 149604618.24

Enter NP: 149604618.24

(149604618.24, 112203463.68, 37401154.56, 374011.5456, 0.125, 0.25, 4.0, 1.0, 299209236.48, 299209236.48, 4000000.0, 3000000.0, 419060.55529411766)

***384472.282 – current measured distance for moon in km

Calculated distance for moon in km by this formula = 37401154.56

Note that this does not include the ratios for planets between the sun and earth. I am still working out how to do that. This is plenty to show that I am on the right path.

Enter IN: 185920000

Enter N: 92900000

Enter NP: 92900000

(92960000.0, 69675000.0, 23285000.0, 232850.0, 0.1252420395869191, 0.2504840791738382, 3.9922697015245867, 1.0, 185920000.0, 185920000.0)

***238900 – current measured distance for moon in miles

Calculated distance for moon in miles by this formula = 232850.0,

—

JUPITER

Reminder: Please download the text file. It is MUCH easier to read.

Calculating best distance for Jupiters moons Sun to Jupiter, to moon

1557201254.4 diameter around sun (perfect circle)

778600627.2 (radius from sun)

***CALLISTO

Enter IN: 1557201254.4

Enter N: 778600627.2

Enter NP: 778600627.2

(778600627.2, 583950470.4000001, 194650156.79999995, 1946501.5679999995, 0.12499999999999996, 0.24999999999999992, 4.000000000000001, 0.9999999999999999, 1557201254.4, 1557201254.3999999, 4000000.000000001, 3000000.000000001, 2180954.137815126)

3759426 ***1879713 – current measured distance for farthest moon (Callisto) in km

***GANYMEDE

Enter IN: 1557201254.4

Enter N: 1879713

Enter NP: 3759426 (Diameter for Callisto to Jupiter)

(778600627.2, 1879713.0, 776720914.2, 7767209.142000001, 0.4987928901324163, 0.9975857802648326, 1.002420062297326, 1.0, 1557201254.4, 1557201254.4, 1002420.062297326, 2420.062297326047, 2180954.137815126)

***1,070,000 is current measured distance from Jupiter (Ganymede) in km 2*420 = 840, 1879713 – 840000 is 1039713 ***

***This formula calculated 1,102,993. (1879713-776720=***1102993) and (1946501-776720=***1169781) 1,070,000 is current measured distance from Jupiter (Callisto) in km

***EUROPA

Enter IN: 1557201254.4

Enter N: 1102993 (Radius from Ganymede to Jupiter)

Enter NP: 2205986 (Diameter for Ganymede to Jupiter)

(778600627.2, 1102993.0, 777497634.2, 7774976.342, 0.4992916824354698, 0.9985833648709396, 1.001418644831164, 1.0, 1557201254.4, 1557201254.4, 1001418.6448311639, 1418.6448311639251, 2180954.137815126)

1*418 = 418, 1070000 – 418000 – is 652000***

1*418 = 418, 1102993 – 418000 – is 684993***

1*418 = 418, 1169781 – 418000 – is 751781***

671,000 is current measured distance from Jupiter (Europa) in km

Enter IN: 778600627.2 (using radius because there are more moons in orbit now)

Enter N: 1102993 (Radius from Ganymede Jupiter)

Enter NP: 2205986 (Diameter for Ganymede to Jupiter

(389300313.6, 1102993.0, 388197320.6, 3881973.2060000002, 0.49858336487093957, 0.9971667297418791, 1.0028413204869504, 1.0, 778600627.2, 778600627.2, 1002841.3204869505, 2841.3204869504552, 1090477.068907563)

***388,197

***671,000 is current measured distance from Jupiter (Europa) in km

***This formula calculated 681,803. (1070000-388197=***681803) and (1169781-388197=***781584)

***IO

Enter IN: 1557201254.4

Enter N: 681803 (Radius from Europa to Jupiter)

Enter NP: 1363606 (Diameter for Europa to Jupiter)

(778600627.2, 681803.0, 777918824.2, 7779188.242000001, 0.4995621612825744, 0.9991243225651488, 1.0008764449178886, 1.0, 1557201254.4, 1557201254.4, 1000876.4449178886, 876.4449178886134, 2180954.137815126)

***876,000-671,000 = 205,000

***671,000-205,000 = 466,000

422,000 is current measured distance from from Jupiter (IO) in km

Enter IN: 389300313.5 (divided radius by 2 to account for additional body)

Enter N: 681803 (Radius from Europa to Jupiter)

Enter NP: 1363606 (Diameter for Europa to Jupiter)

(194650156.75, 681803.0, 193968353.75, 1939683.5375, 0.4982486451298478, 0.9964972902596956, 1.003515021841546, 0.9999999999999999, 389300313.5, 389300313.49999994, 1003515.021841546, 3515.021841546055, 545238.5343137255)

***193,968

***422,000 is current measured distance from Jupiter (IO) in km

***This formula calculated 477,032. (671000-193968=***477,032) and (781584-193968=***587,616)

—

Notes:

Enter IN: 483800000

Enter N: 241900000

Enter NP: 241900000

(241900000.0, 181425000.0, 60475000.0, 604750.0, 0.125, 0.25, 4.0, 1.0, 483800000.0, 483800000.0)

***1208500 – unsure why this needs to be doubled for miles, but not km – guessing it has to do with the ratio function

***1168000 current measured distance for farthest moon (Callisto) in miles

19465015.679999996

1879713

1946501

375000

384472.282

Note that this does not include the ratios for planets between the sun and jupiter. I am still working out how to do that to increase accuracy. This is plenty to show that I am on the right path.

Essentially, this is a form of Fourier transform for planetary/large body orbits.