fix js error in calc; update about box with calc info

pull/90/merge
Adam Greig 2012-04-01 00:58:17 +01:00
rodzic 1eede59ca4
commit ee5c5fddad
2 zmienionych plików z 40 dodań i 37 usunięć

Wyświetl plik

@ -137,16 +137,46 @@ google.load("jqueryui", "1.8.1");
<!-- About window -->
<div id="about_window">
<b>Cambridge University Spaceflight Landing Predictor (<a href="http://github.com/jonsowman/cusf-standalone-predictor" target="_blank">github</a>)</b>
<br /><br />
A tool to predict the flight path and landing location of latex sounding balloons.
<br /><br />
Written by <a href="http://github.com/jonsowman" target="_blank">Jon Sowman</a> and <a href="http://github.com/adamgreig" target="_blank">Adam Greig</a> for <a href="http://www.cuspaceflight.co.uk" target="_blank">CUSF</a>.
Credit also to <a href="http://github.com/rjw57" target="_blank">Rich Wareham</a> for work on the predictor. Some parts of code taken from old landing prediction software, credit to Rob Anderson, Fergus Noble and Ed Moore.
<br /><br />
Minor credit to Robert Harrison for integrating the NOTAM and airspace KML from <a href="http://www.notaminfo.com/" >www.notaminfo.com</a> with kind permission from author David Massie.
<br /><br />
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.
<h3>Cambridge University Spaceflight Landing Predictor (<a href="http://github.com/jonsowman/cusf-standalone-predictor" target="_blank">github</a>)</h3>
<p>A tool to predict the flight path and landing location of latex sounding balloons.</p>
<p>Written by <a href="http://github.com/jonsowman" target="_blank">Jon Sowman</a> and <a href="http://github.com/adamgreig" target="_blank">Adam Greig</a> for <a href="http://www.cuspaceflight.co.uk" target="_blank">CUSF</a>.
Credit also to <a href="http://github.com/rjw57" target="_blank">Rich Wareham</a> for work on the predictor. Some parts of code taken from old landing prediction software, credit to Rob Anderson, Fergus Noble and Ed Moore.</p>
<p>Minor credit to Robert Harrison for integrating the NOTAM and airspace KML from <a href="http://www.notaminfo.com/" >www.notaminfo.com</a> with kind permission from author David Massie.</p>
<p>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.</p>
<h3>Burst Calculator</h3>
<p><a href="http://cusf.co.uk/calc">Burst Calculator Web Page</a></p>
<h4>Usage</h4>
<p>
This calculator is designed to help you find how much gas to put into a high altitude balloon
to achieve a desired burst altitude or ascent rate. You have to know the payload mass (including
parachute) and balloon mass.
</p>
<p>
Usage is very straightforward: enter the payload mass into the first box, select the balloon
mass from the second box, and type in either a desired burst altitude in meters or ascent rate
in meters per second in the relevent box. Pressing enter or clicking away from the box you are
typing into will run the calculations, displaying the results in the box at the bottom.
</p>
<p>
The 'Constants' box can be used to adjust constants used by the calculator. These include
selecting a type of gas (or entering a custom gas density), adjusting modelling parameters
or entering a custom burst diameter or drag coefficient for your balloon. Click the tick box
next to the burst diameter or drag coefficient boxes to use a custom value, otherwise the
appropriate value for your selected balloon will be used.
</p>
<h4>About</h4>
<p>
Written by Adam Greig for CUSF in March 2010. Maths derived from `burst1a` spreadsheet by
Steve Randall. Balloon information from Kaymont Totex sounding balloon data.
</p>
<p>
No guarantee is given for the accuracy of any data included or produced by this program, use
at your own risk.
</p>
<p>
Copyright 2010 Cambridge University Space Flight
</p>
</div>
<!-- Burst calculator window -->

Wyświetl plik

@ -360,35 +360,8 @@ function calc_update() {
document.getElementById('lv_cf').innerHTML = launch_cf + " ft<sup>3</sup>";
}
function show_help() {
hide_about();
document.getElementById('helpbox').style.visibility = 'visible';
return false;
}
function show_about() {
hide_help();
document.getElementById('aboutbox').style.visibility = 'visible';
return false;
}
function hide_help() {
document.getElementById('helpbox').style.visibility = 'hidden';
return false;
}
function hide_about() {
document.getElementById('aboutbox').style.visibility = 'hidden';
return false;
}
function calc_init() {
document.getElementById('showhelp').onclick = show_help;
document.getElementById('showabout').onclick = show_about;
document.getElementById('hidehelp').onclick = hide_help;
document.getElementById('hideabout').onclick = hide_about;
var ids = ['mb', 'mp', 'tar', 'tba', 'gas', 'rho_g', 'rho_a', 'adm', 'bd', 'cd', 'bd_c', 'cd_c'];
for(var i in ids) {
document.getElementById(ids[i]).onchange = calc_update;