Download or view deltat.frink in plain text format
// Program to plot Delta-T values
g = new graphics
p = new polyline
for y=1000 to 2500
{
d = eval["#" + padLeft["$y", 4, "0"] + "#"]
println["$d\t" + (deltaT[d]->s)]
p.addPoint[JD[d], -deltaT[d]/s]
}
g.add[p]
p2 = new polyline
// Now read data from US Naval Observatory and overlay it.
for line = lines["http://maia.usno.navy.mil/ser7/deltat.data"]
{
if [year, month, day, deltaT] = line =~ %r/\s*(\d{4})\s+(\d{1,2})\s+(\d{1,2})\s+(\d+\.\d+)/
{
month = padLeft[month, 2, "0"]
day = padLeft[day, 2, "0"]
date = parseDate["$year-$month-$day UTC"]
println["$date\t$dt"]
dt = eval[deltaT] s
p2.addPoint[JD[date], -dt/s]
}
}
g.color[0,0,1]
g.add[p2]
g.show[]
Download or view deltat.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 20145 days, 22 hours, 39 minutes ago.