EmilysFourthHour.frink

View or download EmilysFourthHour.frink in plain text format

use Solver.frink

// Solver for "Emily's Fourth Hour" geocache, GC1K3YW
// http://www.geocaching.com/seek/cache_details.aspx?guid=a90aef91-3fb2-495a-99d3-0414f1678a13

symbolicMode[true]
showApproximations[false]

ballistics = new Solver[[p0 === 17 g vwx,
                         p1 === 17 g 41.9412 m/s + 1.9 kg * 3.68684 m/s,
                         p2 === 1.9 kg * 3.68684 m/s + 2.3 kg * yz,
                         p0 === p1,
                         p1 === p2],
                   ["g", "m", "s", "kg"]]

println["Ballistics:"]
println[join["\n", ballistics.solveAll[]]]
println[]

args = []
vwx = format[ballistics.solveFor["vwx",args]@0, "m/s", 0]
println["vwx = $vwx"]
v = substrLen[vwx, 0, 1]
w = substrLen[vwx, 1, 1]
x = substrLen[vwx, 2, 1]

yz = format[ballistics.solveFor["yz",args]@0, "m/s", 3]
println["yz = $yz"]
y = substrLen[yz, 2, 1]
z = substrLen[yz, 3, 1]

println["vw.xyz = 111 degrees $v$w.$x$y$z minutes W"]

// First part can be solved at http://futureboy.us/fsp/solve.fsp?equation=D[D[D[3.81t^3+%2B+9.882t^2+%2B+18.6497t+%2B+53.8946%2Ct]%2Ct]%2Ct]&solveFor=t&f=on

println["33 degrees 22.860 minutes N"]
//println[]


View or download EmilysFourthHour.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 17592 days, 6 hours, 32 minutes ago.