Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Description


## Reviewer(s)
@nsat/sos


## Transcript(s)
```
[please run "make test" and copy output, or include hastebin link to output]
```


## Checklist (if applicable)
- [ ] Documentation updated
37 changes: 37 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm test

publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
154 changes: 147 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,149 @@
bower_components/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
.npm/
build/
test
*~
.versions
*#
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.*
!.env.example

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist
.output

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp directory
.temp

# Sveltekit cache directory
.svelte-kit/

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Firebase cache directory
.firebase/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# pnpm
.pnpm-store

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Vite files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vite/

# Mac Stuff
.DS_Store
pypredict/
_pypredict/
compare/
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0]

### Added
- Support for Orbit Mean-Elements Message (OMM) orbital element sets in addition to TLE strings
- `satelliteObservation()` now accepts either a single epoch or an array of epochs, returning a single observation or an array of observations respectively (replacing the separate `observes()` method)
- Configurable angular units (`DEGREES` or `RADIANS`) via the `AngularUnits` enum, applied independently to azimuth, elevation, geodetic coordinates, beta angle, and orbit phase outputs
- Configurable timestamp output formats (`UNIX`, `ISO8601`, `DATE`, `DATETIME`) via the `TimestampFormat` enum
- Flexible timestamp inputs accepting Unix timestamps, ISO8601 strings, JavaScript `Date` objects, and Luxon `DateTime` objects
- Expanded observation output including ECI/ECEF/geodetic position and velocity vectors, GMST, footprint, orbit revolution count and phase (with legacy 0–256 `phase256`), orbital model, decayed/geostationary flags, sunlit state, sun position, beta angle, eclipse factor, doppler factor, slant range, visibility, and AOS state
- Rewritten `satelliteTransits()` transit prediction using a coarse mean-motion-derived search (Skyfield-style) with secant-method refinement of AOS, LOS, peak (culmination), and TCA (time of closest approach) events
- Rich transit events: each transit now reports `aos`, `los`, `tca`, and `peak` events with full azimuth, elevation, slant range, and doppler data, plus `start`/`stop`/`duration`
- Tunable transit search precision and convergence via `SatelliteTransitOptions` (elevation/rate tolerances, max iterations, and optional coarse-step override)
- Published TypeScript type definitions and exported public interfaces, types, and enums from the module root
- Benchmark script (`npm run benchmark`) and Vitest-based test suite (`npm test`)
- GitHub Actions publishing workflow for GitHub Packages

### Changed
- Migrated library source code from JavaScript to TypeScript
- Migrated from Webpack to Vite for testing and packaging
- Migrated library build to standard ES modules for frontend and backend use
- Replaced the `moment` dependency with `luxon`
- Upgraded `satellite.js` from 3.x to 7.x
- Renamed and restructured the public API:
- `observe()` → `satelliteObservation()`
- `transits()` → `satelliteTransits()`
- Renamed geodetic position properties to `geo` to align with the abbreviations used by other coordinate systems (`eci`, `ecef`)
- Transit start/stop times now conform to the true horizon (0°) while AOS/LOS conform to the configurable minimum elevation threshold

### Deprecated
- Removed support for Bower and Meteor package repositories, builds are now hosted on GitHub Packages
- Removed support for CommonJS and UMD style JavaScript modules
- Removed the `observes()` method (functionality merged into `satelliteObservation()`)
- Removed the `transitSegment()` method
- Removed the legacy `bower.json`, `package.js` (Meteor), and `export.js` files


## [1.2.0] - 2026-08-06
- Deprecated legacy version (no longer supported)
Loading