I want to write a small script that calculates the changes in acceleration due to gravity, taking into account tidal force, to look at errors in a pendulum
So for a given location on the earth, you have a force due to the earth, a force for the moon, a force for the sun, …
You also have a force dependent on position because the earth is rotating.
The net effect of those vector forces is countered by the normal force from your feet, which means you can get the local acceleration due to gravity, small g. [There are other effects such if you are near a mountain, but I’m discounting those]
EarthLocation.from_geodetic gets me a x,y, z position
get_body_barycentric gets me x,y,z positions of the bodies.
For example, this code
el = EarthLocation.from_geodetic(lon=-0.0, lat=51, height=5.0, ellipsoid="WGS84")
earth = get_body_barycentric("earth", Time.now())
bodies = ["sun", "moon","earth"]
for body in bodies:
position = get_body_barycentric(body, Time.now())
print(f" {body:10} {position.x.to(u.km).value:20.4f}, {position.y.to(u.km).value:20.4f}, {position.z.to(u.km).value:20.4f}")
print(f" {'me':10} {el.x.to(u.km).value:20.4f}, {el.y.to(u.km).value:20.4f}, {el.z.to(u.km).value:20.4f}")
produces this
sun -1051379.4357, -560171.8838, -210413.0554
moon -4953901.8935, -140288500.1213, -60808213.6070
earth -4762270.4365, -139987973.2477, -60650099.2045
me 4022.0338, -0.0000, 4933.5485
If I re-run the script, the barycentric results change as expected. The Earthlocation doesn’t. It’s static.
What’s the relationship between the “me” data and the barycentric position of the earth?
I would like the position of me, relative to the center of the earth, taking account the earth’s rotation in the same coordinate system as the numbers for the sun moon and earth.
I’m after the barycentric position of me, my belly button if you wish!