diff --git a/predict/css/pred.css b/predict/css/pred.css
index b2fc26b..b66b566 100644
--- a/predict/css/pred.css
+++ b/predict/css/pred.css
@@ -78,6 +78,10 @@ a { text-decoration: underline; color: #333; cursor: pointer; }
display: none;
}
+#burst-calc-constants {
+ display: none;
+}
+
.box {
position: absolute;
background-color: white;
@@ -141,6 +145,12 @@ a { text-decoration: underline; color: #333; cursor: pointer; }
bottom: 0; right: 0;
}
+#burst-calc {
+ display: none;
+ padding: 5px;
+ text-align: center;
+}
+
#scenario_info {
position: absolute;
top: 25px;
diff --git a/predict/index.php b/predict/index.php
index 72a354e..282f62d 100644
--- a/predict/index.php
+++ b/predict/index.php
@@ -26,6 +26,7 @@ $time = time() + 3600;
+
+
@@ -220,7 +222,10 @@ google.load("jqueryui", "1.8.1");
?>" maxlength="4" size="4">
- Ascent Rate (m/s): |
+
+ Ascent Rate (m/s): ?
+ |
|
@@ -258,6 +263,137 @@ google.load("jqueryui", "1.8.1");
+
+
+
+
Burst Calculator
+
+
+
+
+
+
+
+
+
+
diff --git a/predict/js/pred.js b/predict/js/pred.js
index 4f50181..aabde48 100644
--- a/predict/js/pred.js
+++ b/predict/js/pred.js
@@ -24,13 +24,15 @@ $(document).ready(function() {
initMap(52, 0, 8);
populateLaunchSite();
setupEventHandlers();
- // make launch card draggable
+
+ // Make launch card draggable
$("#input_form").draggable({containment: '#map_canvas', handle: 'img.handle', snap: '#map_canvas'});
$("#scenario_info").draggable({containment: '#map_canvas', handle: 'img.handle', snap: '#map_canvas'});
$("#location_save").draggable({containment: '#map_canvas', handle: 'img.handle', snap: '#map_canvas'});
$("#location_save_local").draggable({containment: '#map_canvas', handle: 'img.handle', snap: '#map_canvas'});
$("#run_pred_btn").button();
$("#req_sub_btn").button();
+ $("#burst-calc-hide").button();
// see if we want an old prediction displayed
if ( current_uuid != '0' ) {
@@ -51,6 +53,9 @@ $(document).ready(function() {
// plot the initial launch location
plotClick();
+
+ // Initialise the burst calculator
+ calc_init();
});
function predSub() {
@@ -662,6 +667,18 @@ function setupEventHandlers() {
$("#setWithClick").click(function() {
setLatLonByClick(true);
});
+ // activate the "use burst calc" links
+ $("#burst-calc-show").click(function() {
+ $("#modelForm").hide();
+ $("#burst-calc").show();
+ });
+ $("#burst-calc-hide").click(function() {
+ // Write the ascent rate and burst altitude to the launch card
+ $("#ascent").val($("#ar").html());
+ $("#burst").val($("#ba").html());
+ $("#burst-calc").hide();
+ $("#modelForm").show();
+ });
// attach onchange handlers to the lat/long boxes
$("#lat").change(function() {
plotClick();