-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ add examples and reduce dependencies
- Loading branch information
Showing
19 changed files
with
174 additions
and
765 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Run the examples using node. | ||
|
||
Example: node ./examples/commonjs/satellite.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { Satellite } = require('../../lib/ootk-core'); | ||
|
||
const tle1 = '1 25544U 98067A 19156.50900463 .00003075 00000-0 59442-4 0 9992'; | ||
const tle2 = '2 25544 51.6433 59.2583 0008217 16.4489 347.6017 15.51174618173442'; | ||
|
||
const satellite = new Satellite({ | ||
tle1, | ||
tle2, | ||
}); | ||
|
||
// eslint-disable-next-line no-console | ||
console.log(satellite.eci()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Run the examples using tsx. | ||
|
||
Example: npx tsx ./examples/satellite.mjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Satellite } from '../../lib/ootk-core.mjs'; | ||
|
||
const tle1 = '1 25544U 98067A 19156.50900463 .00003075 00000-0 59442-4 0 9992'; | ||
const tle2 = '2 25544 51.6433 59.2583 0008217 16.4489 347.6017 15.51174618173442'; | ||
|
||
const satellite = new Satellite({ | ||
tle1, | ||
tle2, | ||
}); | ||
|
||
// eslint-disable-next-line no-console | ||
console.log(satellite.eci()); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Run the examples using ts-node. | ||
|
||
Example: npx ts-node ./examples/julian.ts -p ./examples/tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Degrees, Meters, Sun } from '../lib/ootk-core'; | ||
import { Degrees, Meters, Sun } from '../../lib/ootk-core'; | ||
/* eslint-disable no-console */ | ||
|
||
console.log(Sun.getTimes(new Date(), 41 as Degrees, -71 as Degrees, 0 as Meters)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "ES2015", | ||
"baseUrl": "../" | ||
} | ||
} |
Oops, something went wrong.