forked from alexmoon/ksp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
midcourse.html
207 lines (202 loc) · 9.76 KB
/
midcourse.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>KSP Midcourse Correction Calculator by alexmoon</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="stylesheets/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="stylesheets/bootstrap-theme.min.css" rel="stylesheet" media="screen">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="javascripts/jquery-2.0.0.min.js" type="text/javascript"></script>
<script src="javascripts/numeric-1.2.6.min.js" type="text/javascript"></script>
<script src="javascripts/quaternion.js" type="text/javascript"></script>
<script src="javascripts/lambert.js" type="text/javascript"></script>
<script src="javascripts/orbit.js" type="text/javascript"></script>
<script src="javascripts/celestialbodies.js" type="text/javascript"></script>
<script src="javascripts/midcourse.js" type="text/javascript"></script>
<script src="javascripts/bootstrap.min.js" type="text/javascript"></script>
<style type="text/css">
dd, dt {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="container">
<header class="page-header">
<h1>Midcourse Correction Calculator <small>for Kerbal Space Program</small></h1>
</header>
<section>
<div id="validationAlert" class="alert alert-danger alert-dismissable" style="display: none">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Error:</strong>
<span id="validationMessage"></span>
</div>
<form class="form-horizontal row" id="midcourseForm">
<fieldset class="col-sm-6">
<legend>Current orbital elements</legend>
<div class="form-group">
<label class="col-sm-4 control-label" for="sma">Semi-major axis</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control" id="sma" style="text-align: right"></input>
<div class="input-group-btn">
<button id="smaScale" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Gm <span class="caret"></span>
</button>
<ul id="smaScaleMenu" class="dropdown-menu">
<li><a href="#">Gm </a></li>
<li><a href="#">Mm </a></li>
<li><a href="#">km </a></li>
<li><a href="#">m </a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="eccentricity">Eccentricity</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="eccentricity" style="text-align: right"></input>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="inclination">Inclination</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control" id="inclination" style="text-align: right"></input>
<span class="input-group-addon">°</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="longitudeOfAscendingNode">Long. of ascending node</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control" id="longitudeOfAscendingNode" style="text-align: right"></input>
<span class="input-group-addon">°</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="argumentOfPeriapsis">Argument of periapsis</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control" id="argumentOfPeriapsis" style="text-align: right"></input>
<span class="input-group-addon">°</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="timeOfPeriapsisPassage">Time of periapsis passage</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control" id="timeOfPeriapsisPassage" style="text-align: right" placeholder="year:day:hour:min:sec"></input>
<span class="input-group-addon">UT</span>
</div>
</div>
</div>
</fieldset>
<fieldset class="col-sm-6">
<legend>Maneuver parameters</legend>
<div class="form-group">
<label class="col-sm-4 control-label" for="referenceBodySelect">Reference body</label>
<div class="col-sm-8">
<select id="referenceBodySelect" class="form-control">
<option>Kerbol</option>
<option>Eve</option>
<option selected>Kerbin</option>
<option>Duna</option>
<option>Jool</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="destinationSelect">Destination</label>
<div class="col-sm-8">
<select id="destinationSelect" class="form-control" disabled></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="burnTime">Time of maneuver</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control" id="burnTime" style="text-align: right" placeholder="year:day:hour:min:sec"></input>
<span class="input-group-addon">UT</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="eta">Estimated time of arrival</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control" id="eta" style="text-align: right" placeholder="year:day:hour:min:sec"></input>
<span class="input-group-addon">UT</span>
</div>
</div>
</div>
</fieldset>
<div class="col-sm-6">
<div class="col-sm-offset-4 col-sm-8">
<button type="submit" id="midcourseSubmit" class="btn btn-primary">Calculate Maneuver</button>
</div>
</div>
</form>
<hr>
<div class="row">
<div class="col-sm-6">
<h2>Basic Instructions</h2>
<p>If you are in a transfer orbit to a celestial body, this calculator can find a correction burn to make sure you arrive at your destination as planned. You will need the complete orbital elements of your current transfer orbit as well your estimated time of arrival and when you want to perform the correction burn. You must be orbiting the same reference body as your destination for these calculations to work.</p>
<ol>
<li>Enter the orbital elements of your transfer orbit</li>
<li>Choose at time to perform your correction maneuver</li>
<li>Enter when you are expecting to arrive at your destination</li>
<li>Click "Calculate Maneuver"</li>
</ol>
<p>If you need to make another correction keep in mind that each burn will change your orbital elements so they will need be re-entered.</p>
</div>
<div class="col-sm-6">
<div id="burnDetails" class="panel panel-primary" style="display: none;">
<div class="panel-heading">
<h4>Burn details</h4>
</div>
<div class="panel-body">
<dl class="dl-horizontal">
<dt>Pitch</dt>
<dd id="burnPitch"></dd>
<dt>Heading</dt>
<dd id="burnHeading"></dd>
<dt>Delta-v</dt>
<dd id="burnDeltaV"></dd>
<dt>Prograde delta-v</dt>
<dd id="progradeDeltaV"></dd>
<dt>Normal delta-v</dt>
<dd id="normalDeltaV"></dd>
<dt>Radial delta-v</dt>
<dd id="radialDeltaV"></dd>
<dt>Time of arrival</dt>
<dd id="arrivalTime"></dd>
</dl>
</div>
</div>
</div>
</div>
</section>
<footer>
<p>This project is maintained by <a href="https://github.com/alexmoon">alexmoon</a></p>
<a href="https://github.com/alexmoon/ksp"><img style="position: absolute; top: 0; right: 0; border: 0;" src="img/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
</footer>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-41470020-1', 'alexmoon.github.io');
ga('send', 'pageview');
</script>
</body>
</html>