CornbreadCache.frink

Download or view CornbreadCache.frink in plain text format

use Solver.frink
use navigation.frink
use GoogleEarth.frink

// Solve Geocache GC3DDV2 "Pie are round, Cornbread are square!"
// http://www.geocaching.com/seek/cache_details.aspx?guid=e6f344fb-3914-4dbd-afb4-f96025175de0

symbolicMode[true]
showApproximations[false]

cornbread = new Solver[[lesserRadius === 5.25 inches,
                        greaterRadius === sqrt[2 lesserRadius^2],
                        cornbread === 2 lesserRadius,
                        squareCornbread === cornbread^2,
                        circleArea === 31658390 squareCornbread,
                        circleArea === pi circleRadius^2],
                   ["pi", "inches"]]

//println[cornbread.solveFor["greaterRadius"]]
dist = cornbread.solveFor["circleRadius",[]]@0
println["Distance is " + format[dist, "feet", 2]]

centerLat =  DMS[ 39,36] North
centerLong = DMS[104,57] West
bearing = 60.06 degrees

// Do a high-precision ellipsoidal calculation of the final location
[lat, long] = resultantLatLong[centerLat, centerLong, dist, bearing]

println["Latitude:    " + format[lat,  degrees, 5]]
println["Longitude: " +   format[long, degrees ,5]]

// Launch the results on Google Maps in a browser.
browseGoogleMaps[lat, long, "GC3DDV2"]


Download or view CornbreadCache.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, 19 minutes ago.