Skip to content

Improve documentation deployment and optimize performance - #48

Merged
thkruz merged 5 commits into
mainfrom
develop
Jul 6, 2026
Merged

Improve documentation deployment and optimize performance#48
thkruz merged 5 commits into
mainfrom
develop

Conversation

@thkruz

@thkruz thkruz commented Jul 6, 2026

Copy link
Copy Markdown
Owner

This pull request introduces a comprehensive SGP4 benchmark suite comparing ootk with satellite.js, along with several performance optimizations and bug fixes in the core library. The benchmark is robust, running both libraries in isolated processes to ensure fair results, and includes detailed documentation and scripts for repeatable, trustworthy performance measurement. Additionally, the core library receives improvements to hot-path functions and a bug fix for observer altitude handling.

Benchmarking infrastructure and documentation:

  • Added a full-featured benchmark harness comparing ootk and satellite.js SGP4 implementations, including scripts (benchmark/run.mjs, benchmark/load-tles.mjs), documentation (benchmark/README.md), and npm scripts for running and rebuilding the benchmark. The harness alternates run order, uses fresh Node processes, and validates output parity for trustworthy results. ([[1]](https://github.com/thkruz/ootk/pull/48/files#diff-ef8dcf8f629ca0d7b2c66f5573ff19427d6275a49a1c2ff16fe3584d85df8d2aR1-R155), [[2]](https://github.com/thkruz/ootk/pull/48/files#diff-eea3acd4c8118805bd2df482e115f19fa9a1b360a403be0848c5e0a7a0e54948R1-R26), [[3]](https://github.com/thkruz/ootk/pull/48/files#diff-7fe6b01752be42136da1c4bfcc273aa482497b35192a5af3fc46027766c59ae1R1-R75), [[4]](https://github.com/thkruz/ootk/pull/48/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R22-R23))
  • Added satellite.js as a dev dependency to support benchmarking. ([package.jsonR76](https://github.com/thkruz/ootk/pull/48/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R76))

Continuous integration:

  • Introduced a GitHub Actions workflow (.github/workflows/docs.yml) to build and deploy documentation to GitHub Pages, ensuring up-to-date docs on every push to main or relevant files. ([.github/workflows/docs.ymlR1-R70](https://github.com/thkruz/ootk/pull/48/files#diff-9cf2000c53760d837a449f874e53f792819108d3a4bf346336d0f7d082deae2cR1-R70))

Performance optimizations and bug fixes:

Performance improvements:

  • Optimized dopplerFactor in src/utils/functions.ts by replacing object allocation and Math.hypot with direct arithmetic, reducing overhead in a hot path. ([src/utils/functions.tsL635-R644](https://github.com/thkruz/ootk/pull/48/files#diff-aa5606d33d663eb6255e5a31ea681fe2696569c677078165e03e3238bb8b7abeL635-R644))
  • Improved memoization in Satellite.calculateTimeVariables_ to cache date-based time variables, speeding up catalog-wide sweeps at a single instant. ([[1]](https://github.com/thkruz/ootk/pull/48/files#diff-f574b33c2c174eee9f4e7d2be1ae5e299ea406fdbe6b2fcb86ce896002f29e39L1660-R1671), [[2]](https://github.com/thkruz/ootk/pull/48/files#diff-f574b33c2c174eee9f4e7d2be1ae5e299ea406fdbe6b2fcb86ce896002f29e39R1681-R1699))

Bug fixes:

  • Fixed lla2sez in src/transforms/transforms.ts to correctly handle observer altitude, ensuring accurate look-angle calculations for nonzero observer altitudes. ([src/transforms/transforms.tsR208-R228](https://github.com/thkruz/ootk/pull/48/files#diff-52e55a2ebf2d12d8adfee4ea371aac765cd29577fef77489abeeafefb39c1553R208-R228))
  • Updated Satellite.rae to properly handle optional arguments and use the improved time variable calculation. ([src/objects/Satellite.tsL893-R898](https://github.com/thkruz/ootk/pull/48/files#diff-f574b33c2c174eee9f4e7d2be1ae5e299ea406fdbe6b2fcb86ce896002f29e39L893-R898))

@thkruz thkruz self-assigned this Jul 6, 2026
@thkruz
thkruz merged commit 5584332 into main Jul 6, 2026
7 checks passed
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 7.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant