Download or view GalileoJupiterMoons.frink in plain text format
/** This program tries to date Galileo's notebooks about the moons of Jupiter.
See :
https://mobile.twitter.com/brettmor/status/1634214929933783043/photo/1
Which happened around 1610.
The first test is to find when all the moons of Jupiter are on the same side
of the planet. This means the signums of their x-values are the same.
*/
use planets.frink
signumsOfX = {|m| signum[m@0]}
lat = 45 degrees North
long = 11 degrees East
for d = #1610-01-01# to #1620-01-01# step 1 hours
{
// Now make sure the sun is below the horizon
[azsun, altsun] = refractedSunAzimuthAltitude[d, lat, long]
if altsun < 0 degrees
{
// Test when all the moons of Jupiter are on the same side of the planet
// (x-values all have the same signum.)
m = Planet.JupiterMoonsPosition[d]
signums = map[signumsOfX, m]
if (allSame[signums])
{
// Next make sure that Jupiter is above the horizon
[az, alt] = Planet.Jupiter.refractedAzimuthAltitude[d, lat, long]
if alt > 0 degrees
println[d -> Italy]
}
}
}
Download or view GalileoJupiterMoons.frink in plain text format
This is a program written in the programming language Frink.
For more information, view the Frink
Documentation or see More Sample Frink Programs.
Alan Eliasen was born 20218 days, 0 hours, 24 minutes ago.