diff --git a/predict/includes/functions.inc.php b/predict/includes/functions.inc.php index 3fa948a..5e65bb7 100644 --- a/predict/includes/functions.inc.php +++ b/predict/includes/functions.inc.php @@ -9,13 +9,13 @@ function createModel($post_array) { $pred_model = array(); // first, populate the prediction model - $pred_model['hour'] = $post_array['hour']; //adjust for GMT - $pred_model['min'] = $post_array['min']; - $pred_model['sec'] = $post_array['sec']; + $pred_model['hour'] = (int)$post_array['hour']; //adjust for GMT + $pred_model['min'] = (int)$post_array['min']; + $pred_model['sec'] = (int)$post_array['sec']; - $pred_model['month'] = $post_array['month']; - $pred_model['day'] = $post_array['day']; - $pred_model['year'] = $post_array['year']; + $pred_model['month'] = (int)$post_array['month']; + $pred_model['day'] = (int)$post_array['day']; + $pred_model['year'] = (int)$post_array['year']; $pred_model['lat'] = $post_array['lat']; $pred_model['lon'] = $post_array['lon']; diff --git a/predict/index.php b/predict/index.php index 29b5408..95f2992 100644 --- a/predict/index.php +++ b/predict/index.php @@ -136,9 +136,6 @@ function initialize() {

Scenario Information

-Show Debug | -Hide Launch Card -
Current mouse position: Lat: ? Lon: ? @@ -149,6 +146,9 @@ Flight Time:
Cursor range from launch: ?km, land: ?km
+
+Show Debug | +Hide Launch Card
diff --git a/predict/js/pred.js b/predict/js/pred.js index 082833a..ab3ccad 100644 --- a/predict/js/pred.js +++ b/predict/js/pred.js @@ -43,8 +43,8 @@ function showMousePos(GLatLng) { if ( current_uuid != 0 && map_items['launch_marker'] != null ) { var launch_pt = map_items['launch_marker'].position; var land_pt = map_items['land_marker'].position; - var range_launch = distHaversine(launch_pt, GLatLng); - var range_land = distHaversine(land_pt, GLatLng); + var range_launch = distHaversine(launch_pt, GLatLng, 1); + var range_land = distHaversine(land_pt, GLatLng, 1); $("#cursor_pred_launchrange").html(range_launch); $("#cursor_pred_landrange").html(range_land); }