'; echo '

Your home coordinates are: ' . $c->map->home->lat . ', ' . $c->map->home->lon . '

'; echo '

Calculate course and distance to this point:

'; if ($_POST) { $home = new TLatLon($c->map->home->lat, $c->map->home->lon); $destination = new TLatLon((float) $_POST['lat'], (float) $_POST['lon']); echo '
Results

Course: ' . $home->course($destination) . '° (' . $home->courseLetters($destination) . ')

Distance: ' . $home->distance($destination) . 'km

'; } echo ''; ?>