Skip to content

Commit

Permalink
refactor: ♻️ refactor to match latest ootk-core
Browse files Browse the repository at this point in the history
  • Loading branch information
thkruz committed Jan 13, 2024
1 parent 8549064 commit ae37922
Show file tree
Hide file tree
Showing 19 changed files with 83 additions and 1,242 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.vscode
coverage
lib
commonjs
node_modules
*.log

Expand Down
71 changes: 49 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"version": "4.0.0-0",
"description": "Orbital Object Toolkit including Multiple Propagators, Initial Orbit Determination, and Maneuver Calculations.",
"scripts": {
"build": "node ./scripts/cleanup.mjs && ttsc -p tsconfig.build.json",
"mjs": "ttsc -p tsconfig.build.json -m esnext",
"cjs": "ttsc -p tsconfig.c.json -m commonjs",
"build": "node ./scripts/cleanup.mjs && npm run mjs && npm run cjs",
"lcov": "node ./scripts/openLcov.mjs",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
Expand Down Expand Up @@ -40,30 +42,23 @@
"@babel/preset-env": "^7.22.9",
"@babel/preset-typescript": "^7.22.5",
"@types/jest": "^28.1.8",
"@types/node-fetch": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"auto-changelog": "^2.2.1",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.3.0",
"codecov": "^3.8.1",
"copy-webpack-plugin": "^11.0.0",
"eslint": "^7.32.0",
"jest": "^28.1.3",
"node-fetch": "^2.6.7",
"opener": "^1.5.2",
"prettier": "^2.8.8",
"prettier-plugin-organize-imports": "^3.2.3",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"ttypescript": "^1.5.15",
"typescript": "^4.9.5",
"typescript-transform-paths": "^3.4.6",
"webpack": "^5.11.1",
"webpack-cli": "^4.10.0"
"typescript-transform-paths": "^3.4.6"
},
"homepage": "https://github.com/thkruz/ootk",
"dependencies": {
"ootk-core": "^1.0.0-0"
"ootk-core": "^1.0.0-1"
}
}
}
2 changes: 1 addition & 1 deletion src/force/ThirdBodyGravity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class ThirdBodyGravity implements Force {
}

private static _moonGravity(state: J2000): Vector3D {
const rMoon = Moon.position(state.epoch);
const rMoon = Moon.eci(state.epoch);
const aNum = rMoon.subtract(state.position);
const aDen = aNum.magnitude() ** 3;
const bNum = rMoon;
Expand Down
7 changes: 1 addition & 6 deletions src/objects/DetailedSatellite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

import {
EciVec3,
Kilometers,
LaunchDetails,
OperationsDetails,
Expand Down Expand Up @@ -60,10 +59,6 @@ export class DetailedSatellite extends Satellite {
source: string;
vmag: number;
rcs: number;
totalVelocity: number;
velocity: EciVec3<Kilometers>;
semiMajorAxis: number;
semiMinorAxis: number;
altId: string;
altName: string;

Expand Down Expand Up @@ -136,7 +131,7 @@ export class DetailedSatellite extends Satellite {
* This method changes the position and time properties of the satellite object.
*/
propagateTo(date: Date): this {
const pv = this.getEci(date);
const pv = this.eci(date);

this.position = pv.position;
this.velocity = pv.velocity;
Expand Down
2 changes: 0 additions & 2 deletions src/objects/LandObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { BaseObject, BaseObjectParams, Degrees, Kilometers } from 'ootk-core';
/* eslint-disable class-methods-use-this */

export interface LandObjectParams {
id: number;
lat: Degrees;
lon: Degrees;
alt: Kilometers;
Expand All @@ -29,7 +28,6 @@ export interface LandObjectParams {
}

export class LandObject extends BaseObject {
id: number;
lat: Degrees;
lon: Degrees;
alt: Kilometers;
Expand Down
Loading

0 comments on commit ae37922

Please sign in to comment.