ootk
Version:
Orbital Object Toolkit including Multiple Propagators, Initial Orbit Determination, and Maneuver Calculations.
58 lines • 2.06 kB
JavaScript
/**
* @author @thkruz Theodore Kruczek
* @license AGPL-3.0-or-later
* @copyright (c) 2025 Kruczek Labs LLC
*
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
* terms of the GNU Affero General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later version.
*
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License along with
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
*/
import { RIC, Vector3D, } from '../main.js';
// / Thrust force model.
export class Thrust {
center;
radial;
intrack;
crosstrack;
durationRate;
constructor(center, radial, intrack, crosstrack, durationRate = 0.0) {
this.center = center;
this.radial = radial;
this.intrack = intrack;
this.crosstrack = crosstrack;
this.durationRate = durationRate;
this.deltaV = new Vector3D(radial * 1e-3, intrack * 1e-3, crosstrack * 1e-3);
}
deltaV;
get magnitude() {
return this.deltaV.magnitude() * 1000.0;
}
get duration() {
return this.magnitude * this.durationRate;
}
get start() {
return this.center.roll(-0.5 * this.duration);
}
get stop() {
return this.center.roll(0.5 * this.duration);
}
acceleration(state) {
const relative = new RIC(Vector3D.origin, this.deltaV.scale(1.0 / this.duration));
return relative.toJ2000(state).velocity.subtract(state.velocity);
}
apply(state) {
const relative = new RIC(Vector3D.origin, this.deltaV);
return relative.toJ2000(state);
}
get isImpulsive() {
return this.duration <= 0;
}
}
//# sourceMappingURL=Thrust.js.map