See your point!
Here is a basic description. The calculator is an object and the get flight details is an untested function. The function takes a flight code as input via a form and then grabs the details of that flight via an xml webservice. Some of these details are then used by the calculator object which obviously does a calculation and provides the desired output. Below is the description left by my PHP programmer...
Dose calculator:
doseCalculator($startLat, $startLon, $endLat, $endLon, $timeDuration)
so for example, get the flight details, lat long of start etc, and duration, and then pass it to a new object like so:
// get the details from the user, this time in url fragment e.g.
//
http://www.urlwhatever.com/page.php?id=lh447 - xml webservice
// addslashes as example
$strFlight = addslashes($_GET[’id’]);
// from a function
$flightDetails = getFlightDetails($strFlight);
// to a class
$doseCalculator = new doseCalculator($flightDetails [0],$flightDetails[1] ,$flightDetails [2], $flightDetails[3], $flightDetails[4]);
// or
$doseCalculator = new doseCalculator(-80,10,80,50,50);
// for debugging you can target the functions of the class
// e.g. test the output of the thuleGLM
$getThuleCalc = $doseCalculator->getThuleGLM($value);
This will return the output of the calculation back to $doseCalculator as an object.
As you may have guessed the final output is the dose received on a flight.
Let me know if you need more details - I can post the snippets if required.