wynnhenge.frink

Download or view wynnhenge.frink in plain text format


// Program to calculate sun alignments with the focus of the Wynn hotel
// in Las Vegas.

use sun.frink

North = +1
South = -1
West = +1
East = -1

lat = 36.12815 degrees North
long = 115.16615 degrees West

// Approximate direction of the focus (pretty close to due west)
axis = (177.86 + 90) degrees

// Conversion to coordinate system used by Meeus
axisMeeus = (axis + 180 degrees) mod circle

date = beginningOfYear[now[]]
enddate = beginningOfYearPlus[now[], 2]
dateOut = ### yyyy-MM-dd hh:mm:ss a zzz ###

sep = "\t"

while (date <= enddate)
{
   date = sunSecantAzimuth[date, lat, long, axisMeeus]
   
   [azimuth, altitude] = refractedSunAzimuthAltitude[date, lat, long]
   print[(date -> [dateOut, "Pacific"]) + "$sep"]
   print[formatFix[JD[date],day,5] + "$sep"]
   print[format[altitude,degrees,2] + "$sep"]
   radiusAngle = sunRadiusAngle[date]
   println[]
   
   date = date + 1 day
}


Download or view wynnhenge.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 19935 days, 7 hours, 45 minutes ago.