Skip to content

Commit

Permalink
ci: 👷 remove useless failing ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
thkruz committed Jul 20, 2022
1 parent 27d23e0 commit b559e16
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 49 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,35 +78,3 @@ jobs:

- name: Run codecov
run: node ./node_modules/.bin/codecov

test-on-node:
name: test-on-node
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js latest
uses: actions/setup-node@v2-beta
with:
node-version: "17.x"

- name: Get cached modules
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

- name: Compile TypeScript and build UMD files
run: npm run build

- name: Test Ootk
run: node ./dist/ootk.js
- name: Test Ootk
run: node ./dist/ootk-sgp4.js
- name: Test Ootk
run: node ./dist/ootk-transforms.js
- name: Test Ootk
run: node ./dist/ootk-utils.js
30 changes: 13 additions & 17 deletions src/sgp4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
const PI = Math.PI;
const TAU = PI * 2;
const DEG2RAD = PI / 180.0;
const x2o3 = 2.0 / 3.0;
const temp4 = 1.5e-12;

/** @interface SatelliteRecord contains all of the orbital parameters necessary for running SGP4. It is generated by Sgp4.createSatrec.*/
interface SatelliteRecord {
Expand Down Expand Up @@ -1989,16 +1991,10 @@ class Sgp4 {
xnodeo,
} = options;

/* --------------------- local variables ------------------------ */
const PI = Math.PI;
const TAU = PI * 2;
const x2o3 = 2.0 / 3.0;

/* ------------------------ initialization --------------------- */
// sgp4fix divisor for divide by zero check on inclination
// the old check used 1.0 + Math.cos(PI-1.0e-9), but then compared it to
// 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency
const temp4 = 1.5e-12;

// ----------- set all near earth variables to zero ------------
satrec.isimp = 0;
Expand Down Expand Up @@ -2638,9 +2634,6 @@ class Sgp4 {
// the old check used 1.0 + cos(PI-1.0e-9), but then compared it to
// 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency

const x2o3 = 2.0 / 3.0;
const temp4 = 1.5e-12;

// sgp4fix identify constants and allow alternate values
// getgravconst( whichconst, tumin, mu, radiusearthkm, xke, j2, j3, j4, j3oj2 );
const { xke, j2, j3oj2 } = satrec;
Expand Down Expand Up @@ -2676,9 +2669,11 @@ class Sgp4 {
tempe += satrec.bstar * satrec.cc5 * (Math.sin(mm) - satrec.sinmao);
templ = templ + satrec.t3cof * t3 + t4 * (satrec.t4cof + satrec.t * satrec.t5cof);
}

let nm = satrec.no;
let em = satrec.ecco;
let inclm = satrec.inclo;

if (satrec.method === 'd') {
const tc = satrec.t;

Expand Down Expand Up @@ -2752,22 +2747,23 @@ class Sgp4 {
if (em < 1.0e-6) {
em = 1.0e-6;
}

mm += satrec.no * templ;
let xlm = mm + argpm + nodem;

nodem %= TAU;
argpm %= TAU;
xlm %= TAU;
mm = (xlm - argpm - nodem) % TAU;

// sgp4fix recover singly averaged mean elements
satrec.am = am;
satrec.em = em;
satrec.im = inclm;
satrec.Om = nodem;
satrec.om = argpm;
satrec.mm = mm;
satrec.nm = nm;
// TODO: Skip these?
// satrec.am = am;
// satrec.em = em;
// satrec.im = inclm;
// satrec.Om = nodem;
// satrec.om = argpm;
// satrec.mm = mm;
// satrec.nm = nm;

// ----------------- compute extra mean quantities -------------
const sinim = Math.sin(inclm);
Expand Down

0 comments on commit b559e16

Please sign in to comment.