Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #5

Merged
merged 49 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
137c83c
1.0.0-3
thkruz Jan 13, 2024
188071e
test: :white_check_mark: improve test coverage and import order
thkruz Jan 13, 2024
36d1f43
fix: :rotating_light: fix linter error
thkruz Jan 13, 2024
705d0da
ci: :adhesive_bandage: fix path of ci script
thkruz Jan 13, 2024
5b7cc17
feat: :sparkles: add caching for most common transforms
thkruz Jan 13, 2024
d26b6b7
test: :white_check_mark: fix broken tests
thkruz Jan 14, 2024
fdef8dd
build: :fire: simplify build process
thkruz Jan 14, 2024
713d07e
build: :wrench: use best practices for package.json
thkruz Jan 14, 2024
7f2b8ac
fix: :truck: update import paths
thkruz Jan 14, 2024
4a0ef1e
fix: :bug: fix calculation of doppler factor
thkruz Jan 14, 2024
8120b3f
test: :white_check_mark: add tests for ClassicalElements
thkruz Jan 14, 2024
22ea0a8
test: :white_check_mark: add testing for EquinoctialElements
thkruz Jan 14, 2024
dbed6a1
test: :white_check_mark: add tests and documentation to FormatTle
thkruz Jan 14, 2024
bb94780
test: :white_check_mark: add tests for geodetic class
thkruz Jan 14, 2024
49501a3
test: :white_check_mark: add testing for ITRF class
thkruz Jan 14, 2024
f77390c
test: :white_check_mark: add tests for J2000
thkruz Jan 14, 2024
79c83f4
refactor: :label: add more rigid typing of units
thkruz Jan 14, 2024
c822f4e
test: :white_check_mark: add tests for RIC
thkruz Jan 15, 2024
d2533d7
test: :white_check_mark: add tests for RelativeState
thkruz Jan 15, 2024
d923dae
test: :white_check_mark: add tests for StateVector
thkruz Jan 15, 2024
0c2f59f
test: :white_check_mark: fix time difference in snapshot
thkruz Jan 15, 2024
39673ba
test: :white_check_mark: add tests for Tle
thkruz Jan 15, 2024
416d5fa
test: :white_check_mark: add testing for Matrix
thkruz Jan 15, 2024
44a67d0
test: :white_check_mark: add test for Vector and Vector3D
thkruz Jan 15, 2024
944a6c9
test: :white_check_mark: add tests for transforms
thkruz Jan 15, 2024
eec1281
test: :adhesive_bandage: fix time issue with testing on ci pipeline
thkruz Jan 15, 2024
647eff3
style: :heavy_minus_sign: remove prettier and enforce stricter jsdocs
thkruz Jan 15, 2024
b2eaaab
refactor: :recycle: fix formatting and jsdocs
thkruz Jan 15, 2024
0adde7a
test: :adhesive_bandage: fix mock date object being modified
thkruz Jan 15, 2024
ff1a6ad
test: 🩹 fix mock date object being modified
thkruz Jan 15, 2024
60c39de
test: :bug: lock timezone for jest testing
thkruz Jan 15, 2024
b804ded
test: :white_check_mark: add more tests
thkruz Jan 15, 2024
ab08816
test: :white_check_mark: increase testing to 90%
thkruz Jan 15, 2024
90bdd3e
docs: :page_facing_up: update copyright/license documentation
thkruz Jan 15, 2024
56ce400
feat: :sparkles: improve isStatic logic
thkruz Jan 15, 2024
f174259
feat: :truck: move rf math to ootk
thkruz Jan 15, 2024
e7ddf9f
feat: :fire: move advanced functions to ootk
thkruz Jan 15, 2024
091f551
chore: :technologist: update tasks
thkruz Jan 15, 2024
527d368
fix: :adhesive_bandage: remove old import
thkruz Jan 15, 2024
518defb
1.0.0-4
thkruz Jan 15, 2024
0c9173f
fix: :label: fix typings location in package.json
thkruz Jan 15, 2024
a02a62a
1.0.0-5
thkruz Jan 15, 2024
05d46da
docs: :memo: update readme
thkruz Jan 15, 2024
8abc50c
build: :memo: add auto changelog
thkruz Jan 15, 2024
bf90e5d
fix: :bug: remove debugging code
thkruz Jan 15, 2024
f27b230
docs: :memo: update examples
thkruz Jan 15, 2024
59f7f53
refactor: :recycle: standardize rng az el syntax
thkruz Jan 15, 2024
ff144a2
docs: :memo: update documentation for v1.0.0
thkruz Jan 15, 2024
429c257
1.0.0
thkruz Jan 15, 2024
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
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
/lib
/examples/commonjs/satellite-js-migration.js
/examples/mjs/satellite-js-migration.mjs
10 changes: 5 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"node": true,
"jest": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:jsdoc/recommended-typescript-error"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "jsdoc"],
"rules": {
"accessor-pairs": "error",
"array-bracket-newline": "error",
Expand Down Expand Up @@ -108,7 +108,7 @@
"no-extra-label": "error",
"no-extra-parens": "off",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implicit-coercion": "off",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-inline-comments": "off",
Expand Down Expand Up @@ -163,7 +163,7 @@
"no-template-curly-in-string": "error",
"no-ternary": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-trailing-spaces": ["error", { "ignoreComments": true }],
"no-undef-init": "error",
"no-undefined": "error",
"no-underscore-dangle": "off",
Expand All @@ -182,7 +182,7 @@
"no-useless-return": "error",
"no-var": "error",
"no-void": "error",
"no-warning-comments": "error",
"no-warning-comments": "warn",
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": "error",
"object-curly-newline": "error",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ jobs:
- run: npm ci --ignore-scripts

- name: Test
run: npm run test:nobuild
run: npm run test
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
.idea
.vscode/settings.json
coverage
/commonjs/
/lib/
dist
node_modules
*.log

Expand Down
5 changes: 1 addition & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
# Directories
.github
.vscode
coverage
examples
node_modules
scripts
src/*
test

# Files
.editorconfig
.eslintignore
.eslintrc
.gitattributes
.gitignore
.npmignore
.prettierrc
babel.config.js
codecov.yml
jest.config.js
package-lock.json
sandbox.html
tsconfig.*

17 changes: 0 additions & 17 deletions .prettierrc

This file was deleted.

38 changes: 24 additions & 14 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
}
},
{
"label": "Test with Jest",
"command": "npm test",
"label": "Clean Dist Folder",
"command": "npm run clean",
"type": "shell",
"args": [],
"isBackground": true,
"problemMatcher": [],
"icon": {
"id": "go-to-file",
"color": "terminal.ansiGreen"
"id": "trash",
"color": "terminal.ansiYellow"
}
},
{
"label": "Test without Building",
"command": "npm run test:nobuild",
"label": "Test for Coverage",
"command": "npm run test:coverage",
"type": "shell",
"args": [],
"isBackground": true,
Expand All @@ -38,15 +38,25 @@
}
},
{
"label": "Open Test Coverage",
"command": "npm run lcov",
"type": "shell",
"args": [],
"isBackground": true,
"problemMatcher": [],
"label": "Open Coverage in Brave",
"type": "process",
"command": "",
"windows": {
"command": "C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe",
"args": ["${workspaceFolder}/coverage/lcov-report/index.html"]
},
"icon": {
"id": "file-code",
"color": "terminal.ansiYellow"
"id": "browser",
"color": "terminal.ansiCyan"
},
"presentation": {
"echo": false,
"reveal": "never",
"focus": false,
"panel": "new",
"showReuseMessage": false,
"clear": true,
"close": true
}
}
],
Expand Down
68 changes: 50 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,65 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v1.0.0](https://github.com/thkruz/ootk-core/compare/v1.0.0-5...v1.0.0)



- refactor: :recycle: standardize rng az el syntax [`59f7f53`](https://github.com/thkruz/ootk-core/commit/59f7f53c497d75bda2bf049c20e67d5191d586d7)
- build: :memo: add auto changelog [`8abc50c`](https://github.com/thkruz/ootk-core/commit/8abc50cd4eb4b437cbea0ccaad9df5853257c386)
- docs: :memo: update examples [`f27b230`](https://github.com/thkruz/ootk-core/commit/f27b230dfa0fb7440a81859b4057ab8d21b97ed6)

#### [v1.0.0-5](https://github.com/thkruz/ootk-core/compare/v1.0.0-4...v1.0.0-5)

> 15 January 2024


- fix: :label: fix typings location in package.json [`0c9173f`](https://github.com/thkruz/ootk-core/commit/0c9173f91a5c1b6784298732cfbaa35ac9af2e37)

#### [v1.0.0-4](https://github.com/thkruz/ootk-core/compare/v1.0.0-3...v1.0.0-4)

> 15 January 2024


- feat: :fire: move advanced functions to ootk [`#11`](https://github.com/thkruz/ootk-core/issues/11)
- feat: :truck: move rf math to ootk [`#3`](https://github.com/thkruz/ootk-core/issues/3)
- test: :white_check_mark: improve test coverage and import order [`188071e`](https://github.com/thkruz/ootk-core/commit/188071eb7b598e89a7b911685d565800de10bf6a)
- style: :heavy_minus_sign: remove prettier and enforce stricter jsdocs [`647eff3`](https://github.com/thkruz/ootk-core/commit/647eff351ecfde1f54f9be06af8aa4dc38cc5d18)
- docs: :page_facing_up: update copyright/license documentation [`90bdd3e`](https://github.com/thkruz/ootk-core/commit/90bdd3eff917e58c1813bff597d933891fe5645b)

#### [v1.0.0-3](https://github.com/thkruz/ootk-core/compare/v1.0.0-2...v1.0.0-3)

> 13 January 2024


- ci: :construction_worker: update ci pipeline [`d82cb6c`](https://github.com/thkruz/ootk-core/commit/d82cb6c69c1135a1f77f75183eb16f47acc0110b)
- docs: :memo: update docs [`02f0922`](https://github.com/thkruz/ootk-core/commit/02f09227bead5c8aa8cb44e1ba6b8119b34be9f6)
- ci: :green_heart: fix ci pipeline [`21a2971`](https://github.com/thkruz/ootk-core/commit/21a297182f435aff81b3ff3a7727782a3b012511)

#### [v1.0.0-2](https://github.com/thkruz/ootk-core/compare/v1.0.0-1...v1.0.0-2)

- refactor: :recycle: implement strict checks in tsconfig
[`b1515cb`](https://github.com/thkruz/ootk-core/commit/b1515cb07794b7ac465bf27ebfb48232140f2e25)
- feat: :sparkles: sync all commonjs es6 and typescript examples
[`adb58fa`](https://github.com/thkruz/ootk-core/commit/adb58faf46de6af12568064d5941026a31942ecf)
- refactor: :recycle: standardize eci and rae methods
[`5581a18`](https://github.com/thkruz/ootk-core/commit/5581a18ffcb7ebbc04365e36fe49b51534c99137)
> 12 January 2024


- refactor: :recycle: implement strict checks in tsconfig [`b1515cb`](https://github.com/thkruz/ootk-core/commit/b1515cb07794b7ac465bf27ebfb48232140f2e25)
- feat: :sparkles: sync all commonjs es5 and typescript examples [`adb58fa`](https://github.com/thkruz/ootk-core/commit/adb58faf46de6af12568064d5941026a31942ecf)
- refactor: :recycle: standardize eci and rae methods [`5581a18`](https://github.com/thkruz/ootk-core/commit/5581a18ffcb7ebbc04365e36fe49b51534c99137)

#### [v1.0.0-1](https://github.com/thkruz/ootk-core/compare/v1.0.0-0...v1.0.0-1)

> 12 January 2024

- refactor: :recycle: combine Tle classes and improve documentation
[`b5b506a`](https://github.com/thkruz/ootk-core/commit/b5b506af622d673fbf03fa4edbb11b405f27099f)
- test: :white_check_mark: fix tests
[`4c2d701`](https://github.com/thkruz/ootk-core/commit/4c2d701dfc25d04a3929956e0ff2d5f94466bd05)
- refactor: :recycle: move moon code to moon
[`7f5d7c7`](https://github.com/thkruz/ootk-core/commit/7f5d7c74b41216e75b94fbb32b07c6303cf044ec)

- refactor: :recycle: combine Tle classes and improve documentation [`b5b506a`](https://github.com/thkruz/ootk-core/commit/b5b506af622d673fbf03fa4edbb11b405f27099f)
- test: :white_check_mark: fix tests [`4c2d701`](https://github.com/thkruz/ootk-core/commit/4c2d701dfc25d04a3929956e0ff2d5f94466bd05)
- refactor: :recycle: move moon code to moon [`7f5d7c7`](https://github.com/thkruz/ootk-core/commit/7f5d7c74b41216e75b94fbb32b07c6303cf044ec)

#### v1.0.0-0

> 7 January 2024

- feat: :boom: initial commit
[`9893a6a`](https://github.com/thkruz/ootk-core/commit/9893a6acfb5dd51b12d755518c3af120fecc28be)
- test: :truck: update names and paths
[`c48aece`](https://github.com/thkruz/ootk-core/commit/c48aece9a4c8a328cc7778292c4397312c162982)
- fix: :white_check_mark: fix test paths
[`b784f3e`](https://github.com/thkruz/ootk-core/commit/b784f3eab311661415bfc9aa4001d9d8b8acd19f)

- feat: :boom: initial commit [`9893a6a`](https://github.com/thkruz/ootk-core/commit/9893a6acfb5dd51b12d755518c3af120fecc28be)
- test: :truck: update names and paths [`c48aece`](https://github.com/thkruz/ootk-core/commit/c48aece9a4c8a328cc7778292c4397312c162982)
- fix: :white_check_mark: fix test paths [`b784f3e`](https://github.com/thkruz/ootk-core/commit/b784f3eab311661415bfc9aa4001d9d8b8acd19f)

56 changes: 41 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
> An Orbital Object Toolkit in Your Web Browser

**ootk-core** is the core libraries of [ootk](https://github.com/thkruz/ootk) for doing math related to orbital objects
written in TypeScript and built for both CommonJS and ES6 JavaScript or TypeScript. **ootk-core** was developed to
simplify the math and let you focus on using the results. It is the culmination of years of fixes and improvements to
written in TypeScript and built for JavaScript or TypeScript. **ootk-core** was developed to simplify the math and let
you focus on using the results. It is the culmination of years of fixes and improvements to
other libraries.

If you would like more functionality the expanded **ootk** library is available free under the AGPL license
Expand All @@ -22,16 +22,22 @@ later refactored into this library for others to use.

## :blue_book: Table of Contents

- [Installation](#Installation)
- [Usage](#Usage)
- [Loading the Library](#Loading-the-Library)
- [Propagating a TLE](#Propagating-a-TLE)
- [Creating a Satellite](#Creating-a-Satellite)
- [Creating a Sensor](#Creating-a-Sensor)
- [Contributing](#Contributing)
- [Building](#Building)
- [Contributors](#Contributors)
- [License](#License)
- [ootk-core](#ootk-core)
- [:blue\_book: Table of Contents](#blue_book-table-of-contents)
- [:wrench: Installation](#wrench-installation)
- [Loading the Library](#loading-the-library)
- [:satellite: Usage](#satellite-usage)
- [Common Patterns](#common-patterns)
- [Propagating a TLE](#propagating-a-tle)
- [Creating a Satellite](#creating-a-satellite)
- [Creating a Sensor](#creating-a-sensor)
- [More Examples](#more-examples)
- [Changelog](#changelog)
- [:desktop\_computer: Building](#desktop_computer-building)
- [:gem: NPM Scripts](#gem-npm-scripts)
- [:man\_teacher: Contributing](#man_teacher-contributing)
- [:man\_scientist: Contributors](#man_scientist-contributors)
- [:balance\_scale: License](#balance_scale-license)

## :wrench: Installation

Expand All @@ -54,6 +60,16 @@ const satellite = new Satellite({

## :satellite: Usage

### Common Patterns

- If you don't specify a date, the method will assume you want to use the current date/time.
- Many parameters are in shorthand - Ex: `sensor.rng`.
- Changing a variable requires you to cast its units before using it as a parameters - Ex: `(3.14 * -1) as Radians`
- Methods starting with 'to' change the class - Ex: `satellite.toGeodetic()` or `satellite.toITRF()`
- Methods that are optimized for loops are marked as `@variation optimized`
- Methods that are slower with expanded capabilities are marked as `@variation expanded`
- Class parameters assume degrees and specify radians - Ex: `sensor.az` is in `degrees` and `sensor.azRad` is in `radians`.

### Propagating a TLE

```js
Expand Down Expand Up @@ -109,12 +125,22 @@ sat.rae(sensor, time); // Get position in range, aziimuth, elevation relative to
### Creating a Sensor

```js
const sensor = new Ootk.Sensor({ name: 'Test', lat: lat, lon: lon, alt: alt });
import { GroundPosition } from 'ootk-core';

const sensor = new GroundPosition({ name: 'Test', lat: lat, lon: lon, alt: alt });
sensor.rae(sat); // Get satellite position in range, aziimuth, elevation at the sensor's current time
sensor.rae(sat, time); // Get position in range, aziimuth, elevation relative to a satellite object at the given time
sensor.eci() // Get the sensor's position in ECI coordinates
```

### More Examples

More examples can be found in the `examples` folder of the code.

## Changelog

You can find a [list of changes here](https://github.com/thkruz/ootk-core/blob/main/CHANGELOG.md).

## :desktop_computer: Building

1. Install [Node.js](https://nodejs.org/) and [Node Package Manager](https://www.npmjs.com/);
Expand All @@ -133,9 +159,9 @@ sensor.eci() // Get the sensor's position in ECI coordinates

## :gem: NPM Scripts

- `build` compiles TypeScript into ES6 Modules in `lib` directory and CommonJs in `commonjs` directory
- `build` compiles TypeScript into ES6 Modules in `dist` directory
- `lint` lints source code located in `src` directory with [ESLint](http://eslint.org/)
- `test` builds the software and then runs jest to verify the final library remains functional
- `test` runs jest to verify the final library remains functional

## :man_teacher: Contributing

Expand Down
32 changes: 32 additions & 0 deletions changelog.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

{{#each releases}}
{{#if href}}
###{{#unless major}}#{{/unless}} [{{title}}]({{href}})
{{else}}
#### {{title}}
{{/if}}

{{#if tag}}
{{#each commits}}
{{#if @first}}> {{niceDate}} {{/if}}
{{/each}}
{{/if}}

{{#if summary}}
{{summary}}
{{/if}}

{{#each merges}}
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{message}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}
{{/each}}
{{#each fixes}}
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}{{/each}}
{{/each}}
{{#each commits}}
- {{#if breaking}}**Breaking change:** {{/if}}{{subject}}{{#if href}} [`{{shorthash}}`]({{href}}){{/if}}
{{/each}}

{{/each}}
Loading