🛰️Orbital Object Toolkit including Multiple Propagators, Initial Orbit Determination, and Maneuver Calculations.
See the codeAn Orbital Object Toolkit in Your Web Browser
ootk is a collection libraries for doing math related to orbital objects written in TypeScript. ootk was developed to simplify the math and let you focus on using the results.
Most of the functionality was originally written for KeepTrack and then later refactored into this library for others to use.
Install the library with NPM:
npm i ootk
import { DetailedSatellite, DetailedSensor, Degrees, Kilometers, SpaceObjectType, TleLine1, TleLine2 } from "ootk";
// Using api.keeptrack.space API
fetch('https://api.keeptrack.space/v1/sat/25544')
.then((res) => res.json())
.then((satData) => {
const satellite = new DetailedSatellite({
id: satData.id,
tle1: satData.tle1 as TleLine1,
tle2: satData.tle2 as TleLine2,
});
// Get the satellite's position at the current time
const eci = satellite.eci();
// Log the satellite's position - y component only
console.log(eci.position.y);
// Access other satellite properties
console.log(satellite.inclination); // inclination in degrees
console.log(satellite.eccentricity); // eccentricity
console.log(satellite.period); // period in minutes
// Get LLA (Latitude, Longitude, Altitude)
const lla = satellite.lla();
console.log(lla); // { lat: degrees, lon: degrees, alt: kilometers }
const sensor = new DetailedSensor({
lat: 41.754785 as Degrees,
lon: -70.539151 as Degrees,
alt: 0.060966 as Kilometers,
minAz: 347 as Degrees,
maxAz: 227 as Degrees,
minEl: 3 as Degrees,
maxEl: 85 as Degrees,
minRng: 0 as Kilometers,
maxRng: 5556 as Kilometers,
name: 'Cape Cod',
type: SpaceObjectType.PHASED_ARRAY_RADAR,
});
// Assuming we have a satellite object from the previous example
const rae = sensor.rae(satellite);
// Log the azimuth from sensor to satellite
console.log(rae.az);
// Check if a satellite is in the sensor's field of view right now
const isSatInFov = sensor.isSatInFov(satellite);
console.log(isSatInFov); // true or false
// Calculate passes for a satellite (in 30 second intervals)
const passes = sensor.calculatePasses(30, satellite);
console.log(passes); // Array of pass information
// Convert sensor position to J2000 coordinates
const j2000 = sensor.toJ2000();
console.log(j2000); // J2000 object with position and velocity
});
New to OOTK? Check out our comprehensive documentation:
The documentation covers:
Install Node.js and pnpm (corepack enable pnpm is enough — the
required version is pinned by the packageManager field in package.json);
Install all required packages by running the following command from repository's root directory:
pnpm install
Run the following script to build everything:
pnpm run build
build compiles TypeScript into ES6 Modules and combines them into a single file in the dist directory.lint lints source code located in src directory with ESLintlint:fix lints tests located in src directory with ESLint and attempts to auto-fix errorslint:test lints tests located in test directory with ESLinttest runs jest to verify code remains functionaltest:coverage generates lcov report to view code coverageThis repo follows Gitflow Workflow.
Before starting a work on new pull request, please, checkout your feature or
bugfix branch from develop branch:
git checkout develop
git fetch origin
git merge origin/develop
git checkout -b my-feature
Make sure that your changes don't break the existing code by running:
pnpm test
Check that your code follows the rules established in eslint.rc:
pnpm run lint
This whole project is an example of standing on the shoulder's of giants. None of it would have been possible without the previous work of the following:
I have placed the code under the AGPL License in order to ensure that good ideas can be shared and that the code is open for everyone to use. Learn more here.
Overall
Maintained
Code review
npm
Latest release
Releases this year
🛰️Orbital Object Toolkit including Multiple Propagators, Initial Orbit Determination, and Maneuver Calculations.
See the codeAn Orbital Object Toolkit in Your Web Browser
ootk is a collection libraries for doing math related to orbital objects written in TypeScript. ootk was developed to simplify the math and let you focus on using the results.
Most of the functionality was originally written for KeepTrack and then later refactored into this library for others to use.
Install the library with NPM:
npm i ootk
import { DetailedSatellite, DetailedSensor, Degrees, Kilometers, SpaceObjectType, TleLine1, TleLine2 } from "ootk";
// Using api.keeptrack.space API
fetch('https://api.keeptrack.space/v1/sat/25544')
.then((res) => res.json())
.then((satData) => {
const satellite = new DetailedSatellite({
id: satData.id,
tle1: satData.tle1 as TleLine1,
tle2: satData.tle2 as TleLine2,
});
// Get the satellite's position at the current time
const eci = satellite.eci();
// Log the satellite's position - y component only
console.log(eci.position.y);
// Access other satellite properties
console.log(satellite.inclination); // inclination in degrees
console.log(satellite.eccentricity); // eccentricity
console.log(satellite.period); // period in minutes
// Get LLA (Latitude, Longitude, Altitude)
const lla = satellite.lla();
console.log(lla); // { lat: degrees, lon: degrees, alt: kilometers }
const sensor = new DetailedSensor({
lat: 41.754785 as Degrees,
lon: -70.539151 as Degrees,
alt: 0.060966 as Kilometers,
minAz: 347 as Degrees,
maxAz: 227 as Degrees,
minEl: 3 as Degrees,
maxEl: 85 as Degrees,
minRng: 0 as Kilometers,
maxRng: 5556 as Kilometers,
name: 'Cape Cod',
type: SpaceObjectType.PHASED_ARRAY_RADAR,
});
// Assuming we have a satellite object from the previous example
const rae = sensor.rae(satellite);
// Log the azimuth from sensor to satellite
console.log(rae.az);
// Check if a satellite is in the sensor's field of view right now
const isSatInFov = sensor.isSatInFov(satellite);
console.log(isSatInFov); // true or false
// Calculate passes for a satellite (in 30 second intervals)
const passes = sensor.calculatePasses(30, satellite);
console.log(passes); // Array of pass information
// Convert sensor position to J2000 coordinates
const j2000 = sensor.toJ2000();
console.log(j2000); // J2000 object with position and velocity
});
New to OOTK? Check out our comprehensive documentation:
The documentation covers:
Install Node.js and pnpm (corepack enable pnpm is enough — the
required version is pinned by the packageManager field in package.json);
Install all required packages by running the following command from repository's root directory:
pnpm install
Run the following script to build everything:
pnpm run build
build compiles TypeScript into ES6 Modules and combines them into a single file in the dist directory.lint lints source code located in src directory with ESLintlint:fix lints tests located in src directory with ESLint and attempts to auto-fix errorslint:test lints tests located in test directory with ESLinttest runs jest to verify code remains functionaltest:coverage generates lcov report to view code coverageThis repo follows Gitflow Workflow.
Before starting a work on new pull request, please, checkout your feature or
bugfix branch from develop branch:
git checkout develop
git fetch origin
git merge origin/develop
git checkout -b my-feature
Make sure that your changes don't break the existing code by running:
pnpm test
Check that your code follows the rules established in eslint.rc:
pnpm run lint
This whole project is an example of standing on the shoulder's of giants. None of it would have been possible without the previous work of the following:
I have placed the code under the AGPL License in order to ensure that good ideas can be shared and that the code is open for everyone to use. Learn more here.
Overall
Maintained
Code review
npm
Latest release
Releases this year