Burst calculator and constants in their own window, with UI elements for activating and using them
rodzic
f328e9a144
commit
16db92d0ed
|
@ -18,6 +18,10 @@
|
|||
padding-right: 3px;
|
||||
}
|
||||
|
||||
.constants_header {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.input_label {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,30 @@ a { text-decoration: underline; color: #333; cursor: pointer; }
|
|||
display: none;
|
||||
}
|
||||
|
||||
#burst-calc-wrapper {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 400px;
|
||||
margin-left: -200px;
|
||||
margin-top: -200px;
|
||||
padding: 1em;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
#burst-calc {
|
||||
display: none;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
*/
|
||||
|
||||
#burst-calc-constants {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#location_save {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
|
@ -78,10 +102,6 @@ a { text-decoration: underline; color: #333; cursor: pointer; }
|
|||
display: none;
|
||||
}
|
||||
|
||||
#burst-calc-constants {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.box {
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
|
@ -145,12 +165,6 @@ 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;
|
||||
|
|
|
@ -142,6 +142,142 @@ google.load("jqueryui", "1.8.1");
|
|||
No guarantee is given for the accuracy, precision or reliability of the data produced by this software, and you use it entirely at your own risk. For more information, see #highaltitude on irc.freenode.net.
|
||||
</div>
|
||||
|
||||
<!-- burst calculator window -->
|
||||
<div id="burst-calc-wrapper" class="box ui-corner-all">
|
||||
<div id="burst-calc">
|
||||
<b>Burst Calculator</b>
|
||||
<br>
|
||||
<table id="input_table">
|
||||
<tr class="input_row">
|
||||
<td class="input_label" colspan="2">Payload Mass (g)</td>
|
||||
<td class="input_instruction" rowspan="3">AND</td>
|
||||
|
||||
<td class="input_label" colspan="2">Balloon Mass (g)</td>
|
||||
</tr>
|
||||
<tr class="input_row">
|
||||
<td colspan="2">
|
||||
<input type="text" id="mp" class="input_field" value="1500"
|
||||
tabindex="1"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<select class="input_field" id="mb" tabindex="2">
|
||||
|
||||
<option value="200">200</option>
|
||||
<option value="300">300</option>
|
||||
<option value="350">350</option>
|
||||
<option value="450">450</option>
|
||||
<option value="500">500</option>
|
||||
<option value="600">600</option>
|
||||
|
||||
<option value="700">700</option>
|
||||
<option value="800">800</option>
|
||||
<option value="1000" selected="selected">1000</option>
|
||||
<option value="1200">1200</option>
|
||||
<option value="1500">1500</option>
|
||||
<option value="2000">2000</option>
|
||||
|
||||
<option value="3000">3000</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="warning_row">
|
||||
<td colspan="2" id="mp_w"> </td>
|
||||
<td colspan="2" id="mb_w"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_instruction" colspan="5">THEN</td>
|
||||
</tr>
|
||||
<tr class="input_row">
|
||||
<td class="input_label" colspan="2">Target Burst Altitude (m)</td>
|
||||
|
||||
<td class="input_instruction" rowspan="3">OR</td>
|
||||
<td class="input_label" colspan="2">Target Ascent Rate (m/s)</td>
|
||||
</tr>
|
||||
<tr class="input_row">
|
||||
<td colspan="2">
|
||||
<input type="text" id="tba" class="input_field" value="33000" tabindex="3"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
|
||||
<input type="text" id="tar" class="input_field" tabindex="4"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="warning_row">
|
||||
<td id="tba_w" colspan="2"> </td>
|
||||
<td id="tar_w" colspan="2"> </td>
|
||||
</tr>
|
||||
<tr class="output_row">
|
||||
<td class="output_label">Burst Altitude:</td>
|
||||
<td class="output_data"><span id="ba">33000</span> m</td>
|
||||
<td></td>
|
||||
<td class="output_label">Ascent Rate:</td>
|
||||
<td class="output_data"><span id="ar">2.33</span> m/s</td>
|
||||
|
||||
</tr>
|
||||
<tr class="output_row">
|
||||
<td class="output_label">Time to Burst:</td>
|
||||
<td class="output_data"><span id="ttb">238</span> min</td>
|
||||
<td></td>
|
||||
<td class="output_label">Neck Lift:</td>
|
||||
<td class="output_data"><span id="nl">1733</span> g</td>
|
||||
|
||||
</tr>
|
||||
<tr class="output_row">
|
||||
<td class="output_label">Launch Volume:</td>
|
||||
<td class="output_data"><span id="lv_m3">2.66</span>
|
||||
m<sup>3</sup></td>
|
||||
<td></td>
|
||||
<td class="output_data"><span id="lv_l">2660</span> L</td>
|
||||
<td class="output_data"><span id="lv_cf">93.9</span>
|
||||
ft<sup>3</sup></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<input type="button" id="burst-calc-advanced-show"
|
||||
name="burst-calc-advanced-show" value="Advanced">
|
||||
<input type="button" id="burst-calc-use" name="burst-calc-submit"
|
||||
value="Use Values"/ >
|
||||
<input type="button" id="burst-calc-close" name="burst-calc-submit"
|
||||
value="Close"/ >
|
||||
</div>
|
||||
|
||||
<!-- these are the burst calc constants -->
|
||||
<div id="burst-calc-constants">
|
||||
<div class="constants_header">Constants</div><br />
|
||||
<div class="constants_warning">
|
||||
For advanced use only! You can probably leave these alone.
|
||||
</div><br />
|
||||
<label class="constant_label" for="gas">Gas</label><br />
|
||||
<select id="gas" class="constant_field">
|
||||
<option value="he">Helium</option>
|
||||
<option value="h">Hydrogen</option>
|
||||
|
||||
<option value="ch4">Methane</option>
|
||||
<option value="custom">Custom</option>
|
||||
</select><br />
|
||||
<label class="constant_label" for="rho_g">Gas Density (kg/m<sup>3</sup>)</label><br />
|
||||
<input type="text" id="rho_g" value="0.1786" class="constant_field" size="9" disabled="disabled"/><br />
|
||||
<label class="constant_label" for="rho_a">Air Density (kg/m<sup>3</sup>)</label><br />
|
||||
|
||||
<input type="text" id="rho_a" value="1.2050" class="constant_field" size="9"/><br />
|
||||
<label class="constant_label" for="adm">Air Density Model</label><br />
|
||||
<input type="text" id="adm" value="7238.3" class="constant_field" size="9"/><br />
|
||||
<label class="constant_label" for="ga">Gravitational<br />Acceleration (m/s<sup>2</sup>)</label><br />
|
||||
<input type="text" id="ga" value="9.80665" class="constant_field" size="9" /><br />
|
||||
<label class="constant_label" for="bd">Burst Diameter (m)</label><br />
|
||||
|
||||
<input type="checkbox" id="bd_c" />
|
||||
<input type="text" id="bd" class="constant_field" size="9" disabled="disabled" value="7.86"/><br />
|
||||
<label class="constant_label" for="cd">Balloon Cd</label><br />
|
||||
<input type="checkbox" id="cd_c" />
|
||||
<input type="text" id="cd" class="constant_field" size="9" disabled="disabled" value="0.3"/><br />
|
||||
<br />
|
||||
<input type="button" id="burst-calc-advanced-hide"
|
||||
name="burst-calc-advanced-hide" value="Back">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- launch card form -->
|
||||
<div id="input_form" class="box ui-corner-all">
|
||||
<img class="handle" src="images/drag_handle.png" />
|
||||
|
@ -264,136 +400,7 @@ google.load("jqueryui", "1.8.1");
|
|||
</table>
|
||||
</form>
|
||||
|
||||
<!-- Burst calculator div, hidden onLoad -->
|
||||
<div id="burst-calc">
|
||||
<b>Burst Calculator</b>
|
||||
<br>
|
||||
<table id="input_table">
|
||||
<tr class="input_row">
|
||||
<td class="input_label" colspan="2">Payload Mass (g)</td>
|
||||
<td class="input_instruction" rowspan="3">AND</td>
|
||||
|
||||
<td class="input_label" colspan="2">Balloon Mass (g)</td>
|
||||
</tr>
|
||||
<tr class="input_row">
|
||||
<td colspan="2">
|
||||
<input type="text" id="mp" class="input_field" value="1500"
|
||||
tabindex="1"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<select class="input_field" id="mb" tabindex="2">
|
||||
|
||||
<option value="200">200</option>
|
||||
<option value="300">300</option>
|
||||
<option value="350">350</option>
|
||||
<option value="450">450</option>
|
||||
<option value="500">500</option>
|
||||
<option value="600">600</option>
|
||||
|
||||
<option value="700">700</option>
|
||||
<option value="800">800</option>
|
||||
<option value="1000" selected="selected">1000</option>
|
||||
<option value="1200">1200</option>
|
||||
<option value="1500">1500</option>
|
||||
<option value="2000">2000</option>
|
||||
|
||||
<option value="3000">3000</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="warning_row">
|
||||
<td colspan="2" id="mp_w"> </td>
|
||||
<td colspan="2" id="mb_w"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_instruction" colspan="5">THEN</td>
|
||||
</tr>
|
||||
<tr class="input_row">
|
||||
<td class="input_label" colspan="2">Target Burst Altitude (m)</td>
|
||||
|
||||
<td class="input_instruction" rowspan="3">OR</td>
|
||||
<td class="input_label" colspan="2">Target Ascent Rate (m/s)</td>
|
||||
</tr>
|
||||
<tr class="input_row">
|
||||
<td colspan="2">
|
||||
<input type="text" id="tba" class="input_field" value="33000" tabindex="3"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
|
||||
<input type="text" id="tar" class="input_field" tabindex="4"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="warning_row">
|
||||
<td id="tba_w" colspan="2"> </td>
|
||||
<td id="tar_w" colspan="2"> </td>
|
||||
</tr>
|
||||
<tr class="output_row">
|
||||
<td class="output_label">Burst Altitude:</td>
|
||||
<td class="output_data"><span id="ba">33000</span> m</td>
|
||||
<td></td>
|
||||
<td class="output_label">Ascent Rate:</td>
|
||||
<td class="output_data"><span id="ar">2.33</span> m/s</td>
|
||||
|
||||
</tr>
|
||||
<tr class="output_row">
|
||||
<td class="output_label">Time to Burst:</td>
|
||||
<td class="output_data"><span id="ttb">238</span> min</td>
|
||||
<td></td>
|
||||
<td class="output_label">Neck Lift:</td>
|
||||
<td class="output_data"><span id="nl">1733</span> g</td>
|
||||
|
||||
</tr>
|
||||
<tr class="output_row">
|
||||
<td class="output_label">Launch Volume:</td>
|
||||
<td class="output_data"><span id="lv_m3">2.66</span>
|
||||
m<sup>3</sup></td>
|
||||
<td></td>
|
||||
<td class="output_data"><span id="lv_l">2660</span> L</td>
|
||||
<td class="output_data"><span id="lv_cf">93.9</span>
|
||||
ft<sup>3</sup></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<input type="button" id="burst-calc-use" name="burst-calc-submit"
|
||||
value="Use Values"/ >
|
||||
<input type="button" id="burst-calc-close" name="burst-calc-submit"
|
||||
value="Close"/ >
|
||||
</div>
|
||||
|
||||
<!-- these are the burst calc constants -->
|
||||
<div id="burst-calc-constants">
|
||||
<div class="constants_header">Constants</div><br />
|
||||
<div class="constants_warning">
|
||||
For advanced<br />use only!<br /><br />
|
||||
|
||||
You can probably<br />leave these alone.<br />
|
||||
</div><br />
|
||||
<label class="constant_label" for="gas">Gas</label><br />
|
||||
<select id="gas" class="constant_field">
|
||||
<option value="he">Helium</option>
|
||||
<option value="h">Hydrogen</option>
|
||||
|
||||
<option value="ch4">Methane</option>
|
||||
<option value="custom">Custom</option>
|
||||
</select><br />
|
||||
<label class="constant_label" for="rho_g">Gas Density (kg/m<sup>3</sup>)</label><br />
|
||||
<input type="text" id="rho_g" value="0.1786" class="constant_field" size="9" disabled="disabled"/><br />
|
||||
<label class="constant_label" for="rho_a">Air Density (kg/m<sup>3</sup>)</label><br />
|
||||
|
||||
<input type="text" id="rho_a" value="1.2050" class="constant_field" size="9"/><br />
|
||||
<label class="constant_label" for="adm">Air Density Model</label><br />
|
||||
<input type="text" id="adm" value="7238.3" class="constant_field" size="9"/><br />
|
||||
<label class="constant_label" for="ga">Gravitational<br />Acceleration (m/s<sup>2</sup>)</label><br />
|
||||
<input type="text" id="ga" value="9.80665" class="constant_field" size="9" /><br />
|
||||
<label class="constant_label" for="bd">Burst Diameter (m)</label><br />
|
||||
|
||||
<input type="checkbox" id="bd_c" />
|
||||
<input type="text" id="bd" class="constant_field" size="9" disabled="disabled" value="7.86"/><br />
|
||||
<label class="constant_label" for="cd">Balloon Cd</label><br />
|
||||
<input type="checkbox" id="cd_c" />
|
||||
<input type="text" id="cd" class="constant_field" size="9" disabled="disabled" value="0.3"/><br />
|
||||
</div>
|
||||
<!-- Burst calculato>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -34,6 +34,8 @@ $(document).ready(function() {
|
|||
$("#req_sub_btn").button();
|
||||
$("#burst-calc-use").button();
|
||||
$("#burst-calc-close").button();
|
||||
$("#burst-calc-advanced-show").button();
|
||||
$("#burst-calc-advanced-hide").button();
|
||||
|
||||
// see if we want an old prediction displayed
|
||||
if ( current_uuid != '0' ) {
|
||||
|
@ -670,21 +672,29 @@ function setupEventHandlers() {
|
|||
});
|
||||
// activate the "use burst calc" links
|
||||
$("#burst-calc-show").click(function() {
|
||||
$("#modelForm").hide();
|
||||
$("#burst-calc").show();
|
||||
$("#burst-calc-wrapper").show();
|
||||
});
|
||||
$("#burst-calc-use").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();
|
||||
$("#burst-calc-wrapper").hide();
|
||||
});
|
||||
$("#burst-calc-close").click(function() {
|
||||
// Close the burst calc without doing anything
|
||||
$("#burst-calc").hide();
|
||||
$("#burst-calc-wrapper").hide();
|
||||
$("#modelForm").show();
|
||||
});
|
||||
$("#burst-calc-advanced-show").click(function() {
|
||||
// Show the burst calculator constants
|
||||
$("#burst-calc").slideUp();
|
||||
$("#burst-calc-constants").slideDown();
|
||||
});
|
||||
$("#burst-calc-advanced-hide").click(function() {
|
||||
// Show the burst calculator constants
|
||||
$("#burst-calc-constants").slideUp();
|
||||
$("#burst-calc").slideDown();
|
||||
});
|
||||
// attach onchange handlers to the lat/long boxes
|
||||
$("#lat").change(function() {
|
||||
plotClick();
|
||||
|
|
Ładowanie…
Reference in New Issue