| +/* Copyright 2024 White Magic Software, Ltd. -- All rights reserved. | ||
| + * | ||
| + * SPDX-License-Identifier: MIT | ||
| + */ | ||
| class Layer { | ||
| static TEMPERATURES = { | ||
| /** | ||
| - * See http://www.braeunig.us/space/atmmodel.htm | ||
| + * Responsible for computing temperature, air pressure, and air density at a | ||
| + * given altitude. Based on Robert A. Braeunig's tables and description: | ||
| + * | ||
| + * http://www.braeunig.us/space/atmmodel.htm | ||
| */ | ||
| class Atmosphere { | ||
| +/* Copyright 2024 White Magic Software, Ltd. -- All rights reserved. | ||
| + * | ||
| + * SPDX-License-Identifier: MIT | ||
| + */ | ||
| import Atmosphere from './Atmosphere.js'; | ||
| +/** | ||
| + * Responsible for computing various planetary attributes of Earth. | ||
| + */ | ||
| class Earth { | ||
| static KELVIN = 273.15; | ||
| return Earth.SPEED_SOUND_0C * Math.sqrt((1 + temperature) / Earth.KELVIN); | ||
| - } | ||
| - | ||
| - airPressure(altitude) { | ||
| - return this.atmosphere.airPressure(altitude); | ||
| } | ||
| +/* Copyright 2024 White Magic Software, Ltd. -- All rights reserved. | ||
| + * | ||
| + * SPDX-License-Identifier: MIT | ||
| + */ | ||
| import Telemetry from './Telemetry.js'; | ||
| +/** | ||
| + * Responsible for recording flight information at time intervals. | ||
| + */ | ||
| class FlightRecorder { | ||
| constructor() { |
| +/* Copyright 2024 White Magic Software, Ltd. -- All rights reserved. | ||
| + * | ||
| + * SPDX-License-Identifier: MIT | ||
| + */ | ||
| + | ||
| +/** | ||
| + * Responsible for simulating a rocket flying through a planet's atmosphere | ||
| + * into a stable orbit. | ||
| + */ | ||
| class Rocket { | ||
| /** | ||
| /** | ||
| - * Simulates the flight of the rocket for a given time step. | ||
| + * Simulates the flight of the rocket for a given time step. Based on | ||
| + * Professor Aaron Ridley's implementation: | ||
| * | ||
| - * @param {number} step - Time step for the simulation (seconds). | ||
| + * https://github.com/aaronjridley/Kepler/blob/main/OrbitalInsertion/launch.py | ||
| + * | ||
| + * @param {number} step - Time step for the simulation (partial seconds). | ||
| */ | ||
| fly(step) { | ||
| +/* Copyright 2024 White Magic Software, Ltd. -- All rights reserved. | ||
| + * | ||
| + * SPDX-License-Identifier: MIT | ||
| + */ | ||
| + | ||
| /** | ||
| - * Provides a syntactic sugar for accessing client-side form fields. | ||
| + * Responsible for simplifying client-side form fields operations. | ||
| */ | ||
| export function $(selector) { |
| +/* Copyright 2024 White Magic Software, Ltd. -- All rights reserved. | ||
| + * | ||
| + * SPDX-License-Identifier: MIT | ||
| + */ | ||
| + | ||
| +/** | ||
| + * Determines the maximum value within an array. | ||
| + */ | ||
| Array.prototype.max = function () { | ||
| let maxVal = this[0]; | ||
| }; | ||
| +/** | ||
| + * Determines the minimum value within an array. | ||
| + */ | ||
| Array.prototype.min = function () { | ||
| let minVal = this[0]; | ||
| }; | ||
| +/** | ||
| + * Responsible for graphing flight information. | ||
| + */ | ||
| class Telemetry { | ||
| constructor(measureName) { | ||
| +/* Copyright 2024 White Magic Software, Ltd. -- All rights reserved. | ||
| + * | ||
| + * SPDX-License-Identifier: MIT | ||
| + */ | ||
| import Earth from './Earth.js'; | ||
| import FlightRecorder from './FlightRecorder.js'; |
| Author | djarvis <email> |
|---|---|
| Date | 2024-12-18 21:01:23 GMT-0800 |
| Commit | d9ffc2c0c65157c4229b5471969b16b614647311 |
| Parent | 28f83ee |
| Delta | 60 lines added, 8 lines removed, 52-line increase |