meeus33a.frink

Download or view meeus33a.frink in plain text format


// Example 33.a from Meeus, to test planetary positions.

use planets.frink

d = #1992 December 20 00:00 TD#
println["Date is " + (d->JDE)]

[L,B,R] = Planet.Venus.getCoordinates[d]
[L0,B0,R0] = Planet.Earth.getCoordinates[d]

println["L:\t" + (L->"degrees")]
println["B:\t" + (B->"degrees")]
println["R:\t" + (R->"au")]

println[]
println["L0:\t" + (L0->"degrees")]
println["B0:\t" + (B0->"degrees")]
println["R0:\t" + (R0->"au")]

[x,y,z,d] = distanceBetweenSphericalCoordinates[L,B,R,L0,B0,R0]
println["x:\t" + (x->"au")]
println["y:\t" + (y->"au")]
println["z:\t" + (z->"au")]
println["d:\t" + (d->"au")]

delta = d / c
println["Light time is " + (delta->"days")]





Download or view meeus33a.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 19355 days, 22 hours, 25 minutes ago.