KerbalCalculations/index.html
2026-03-25 21:56:05 +01:00

212 lines
8.8 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/satellite.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Kerbal calculations</title>
</head>
<body>
<h1>Kerbal calculations</h1>
<table>
<tr>
<td colspan="10"><h3>Current time in game:</h3></td>
</tr>
<tr>
<td><label for="dateYear">Year:</label></td>
<td><input id="dateYear" type="number" min="1" size="2" value="1" /></td>
<td><label for="dateDay">Day:</label></td>
<td><input id="dateDay" type="number" min="1" max="424" size="1" value="1" /></td>
<td><label for="dateHours">Hour:</label></td>
<td><input id="dateHours" type="number" min="0" max="5" size="1" value="0" /></td>
<td><label for="dateMinutes">Minute:</label></td>
<td><input id="dateMinutes" type="number" min="0" max="59" size="1" value="0" /></td>
<td><label for="dateSeconds">Second:</label></td>
<td><input id="dateSeconds" type="number" min="0" max="59" size="1" value="0" /></td>
</tr>
<tr>
<td colspan="10">
<h3>Time to periapsis:</h3>
</td>
</tr>
<tr>
<td><label for="periapsisYears">Years:</label></td>
<td><input id="periapsisYears" type="number" min="0" size="2" value="0" /></td>
<td><label for="periapsisDays">Days:</label></td>
<td><input id="periapsisDays" type="number" min="0" max="424" size="1" value="0" /></td>
<td><label for="periapsisHours">Hours:</label></td>
<td><input id="periapsisHours" type="number" min="0" max="5" size="1" value="0" /></td>
<td><label for="periapsisMinutes">Minutes:</label></td>
<td><input id="periapsisMinutes" type="number" min="0" max="59" size="1" value="0" /></td>
<td><label for="periapsisSeconds">Seconds:</label></td>
<td><input id="periapsisSeconds" type="number" min="0" max="59" size="1" value="0" /></td>
</tr>
</table>
<h3>Planet:</h3>
<input type="radio" id="kerbol" name="planet" value="kerbol">
<label for="kerbol">Kerbol</label>
<br />
<input type="radio" id="moho" name="planet" value="moho">
<label for="moho">Moho</label>
<br />
<input type="radio" id="eve" name="planet" value="eve">
<label for="eve">Eve</label>
<br />
<input type="radio" id="gilly" name="planet" value="gilly">
<label for="gilly">Gilly</label>
<br />
<input type="radio" id="kerbin" name="planet" value="kerbin" checked>
<label for="kerbin">Kerbin</label>
<br />
<input type="radio" id="mun" name="planet" value="mun">
<label for="mun">Mun</label>
<br />
<input type="radio" id="minmus" name="planet" value="minmus">
<label for="minmus">Minmus</label>
<br />
<input type="radio" id="duna" name="planet" value="duna">
<label for="duna">Duna</label>
<br />
<input type="radio" id="ike" name="planet" value="ike">
<label for="ike">Ike</label>
<br />
<input type="radio" id="dres" name="planet" value="dres">
<label for="dres">Dres</label>
<br />
<input type="radio" id="jool" name="planet" value="jool">
<label for="jool">Jool</label>
<br />
<h3>Orbital parameters:</h3>
<table>
<tr>
<td><label for="currentPeriapsis">Periapsis (m):</label></td>
<td><input id="currentPeriapsis" type="number" size="10" value="0.0" /></td>
</tr>
<tr>
<td><label for="currentApoapsis">Apoapsis (m):</label></td>
<td><input id="currentApoapsis" type="number" size="10" value="0.0" /></td>
</tr>
<tr>
<td><label for="currentInclination">Inclination (degrees):</label></td>
<td><input id="currentInclination" type="number" size="10" value="0.0" /></td>
</tr>
<tr>
<td><label for="currentLAN">Longitude of ascending node (degrees):</label></td>
<td><input id="currentLAN" type="number" size="10" value="0.0" /></td>
</tr>
<tr>
<td><label for="currentAOP">Argument of peripasis (degrees):</label></td>
<td><input id="currentAOP" type="number" size="10" value="0.0" /></td>
</tr>
</table>
<h3>What to calculate:</h3>
<input type="radio" id="coordinates" name="typeOfcalculation" value="coordinates" />
<label for="coordinates">Calculate coordinates</label>
<input type="radio" id="simplePlaneChange" name="typeOfcalculation" value="simplePlaneChange" />
<label for="simplePlaneChange">Simple plane change</label>
<input type="radio" id="orbitChange" name="typeOfcalculation" value="orbitChange" />
<label for="orbitChange">Orbit change</label>
<br />
<br />
<div id="coordinatesDiv">
<button id="calculateCoordinatesButton">Perform calculation</button>
<table>
<tr>
<td><label for="calculatedMeanAnomaly">Mean anomaly:</label></td><td><input id="calculatedMeanAnomaly" type="number" disabled /></td>
</tr>
<tr>
<td><label for="calculatedEccentricAnomaly">Eccentric anomaly:</label></td><td><input id="calculatedEccentricAnomaly" type="number" disabled /></td>
</tr>
<tr>
<td><label for="calculatedX">Position X:</label></td><td><input id="calculatedX" type="number" disabled /></td>
<td><label for="calculatedY">Position Y:</label></td><td><input id="calculatedY" type="number" disabled /></td>
<td><label for="calculatedZ">Position Z:</label></td><td><input id="calculatedZ" type="number" disabled /></td>
</tr>
<tr>
<td><label for="calculatedLatitude">Latitude:</label></td><td><input id="calculatedLatitude" type="number" disabled /></td>
<td><label for="calculatedLongitude">Longitude:</label></td><td><input id="calculatedLongitude" type="number" disabled /></td>
<td><label for="calculatedPlanetLongitude">Longitude over planet:</label></td><td><input id="calculatedPlanetLongitude" type="number" disabled /></td>
</tr>
</table>
</div>
<div id="simplePlaneChangeDiv">
<h3>Target plane:</h3>
<table>
<tr>
<td><label for="targetInclination">Target inclination:</label></td>
<td><input id="targetInclination" type="number" value="0.0" /></td>
</tr>
<tr>
<td><label for="targetLAN">Target longitude of ascending node:</label></td>
<td><input id="targetLAN" type="number" value="0.0" /></td>
</tr>
</table>
<input type="checkbox" id="circularizeOrbit" /><label for="circularizeOrbit">Circularize orbit</label>
<br />
<button id="simplePlaneChangeButton">Perform calculation</button>
<h3>Choose one of the following manoeuvres:</h3>
<table>
<tr>
<th colspan="2">Manoeuvre 1</th><th colspan="2">Manoeuvre 2</th>
</tr>
<tr>
<td><label for="simpleManoeuvreTime1">Time: </label></td><td><input id="simpleManoeuvreTime1" type="number" disabled /></td>
<td><label for="simpleManoeuvreTime2">Time: </label></td><td><input id="simpleManoeuvreTime2" type="number" disabled /></td>
</tr>
<tr>
<td><label for="simpleManoeuvrePrograde1">Prograde acceleration:</label></td><td><input id="simpleManoeuvrePrograde1" type="number" disabled /></td>
<td><label for="simpleManoeuvrePrograde2">Prograde acceleration:</label></td><td><input id="simpleManoeuvrePrograde2" type="number" disabled /></td>
</tr>
<tr>
<td><label for="simpleManoeuvreNormal1">Normal acceleration:</label></td><td><input id="simpleManoeuvreNormal1" type="number" disabled /></td>
<td><label for="simpleManoeuvreNormal2">Normal acceleration:</label></td><td><input id="simpleManoeuvreNormal2" type="number" disabled /></td>
</tr>
<tr>
<td><label for="simpleManoeuvreRadial1">Radial acceleration:</label></td><td><input id="simpleManoeuvreRadial1" type="number" disabled /></td>
<td><label for="simpleManoeuvreRadial2">Radial acceleration:</label></td><td><input id="simpleManoeuvreRadial2" type="number" disabled /></td>
</tr>
<tr>
<td><label for="simpleManoeuvreTotal1">Total acceleration:</label></td><td><input id="simpleManoeuvreTotal1" type="number" disabled /></td>
<td><label for="simpleManoeuvreTotal2">Total acceleration:</label></td><td><input id="simpleManoeuvreTotal2" type="number" disabled /></td>
</tr>
</table>
</div>
<div id="orbitChangeDiv">
<h3>Target orbit:</h3>
<table>
<tr>
<td><label for="orbitChangeTargetInclination">Target inclination:</label></td>
<td><input id="orbitChangeTargetInclination" type="number" value="0.0" /></td>
</tr>
<tr>
<td><label for="orbitChangeTargetLAN">Target longitude of ascending node:</label></td>
<td><input id="orbitChangeTargetLAN" type="number" value="0.0" /></td>
</tr>
<tr>
<td><label for="orbitChangeTargetAOP">Target argument of periapsis:</label></td>
<td><input id="orbitChangeTargetAOP" type="number" value="0.0" /></td>
</tr>
<tr>
<td><label for="orbitChangeTargetPeriapsis">Target periapsis:</label></td>
<td><input id="orbitChangeTargetPeriapsis" type="number" value="0.0" /></td>
</tr>
<tr>
<td><label for="orbitChangeTargetApoapsis">Target apoapsis:</label></td>
<td><input id="orbitChangeTargetApoapsis" type="number" value="0.0" /></td>
</tr>
</table>
<button id="orbitChangeButton">Find best transfer</button>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>