ootk 1.0.3 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +20 -26
  2. package/LICENSE.MD +21 -21
  3. package/README.md +128 -128
  4. package/asc/asconfig.json +22 -0
  5. package/asc/assembly/index.ts +1143 -0
  6. package/asc/ex/asconfig.json +22 -0
  7. package/asc/ex/assembly/index.ts +5 -0
  8. package/asc/ex/index.html +10 -0
  9. package/asc/ex/package.json +19 -0
  10. package/asc/ex/tests/index.js +4 -0
  11. package/asc/package.json +19 -0
  12. package/asc/tests/index.js +4 -0
  13. package/codecov.yml +21 -0
  14. package/{lib/ootk.es.d.ts → dist/ootk.d.ts} +3 -4
  15. package/dist/ootk.js +1 -3850
  16. package/{lib/ootk-sgp4.es.d.ts → dist/sgp4.d.ts} +6 -140
  17. package/dist/transforms.d.ts +58 -0
  18. package/dist/utils.d.ts +33 -0
  19. package/lib/{ootk.es.js → ootk.d.ts} +3 -4
  20. package/lib/{ootk-utils.es.d.ts → ootk.js} +6 -11
  21. package/lib/ootk.js.map +1 -0
  22. package/lib/sgp4.d.ts +89 -0
  23. package/lib/{ootk-sgp4.es.js → sgp4.js} +545 -528
  24. package/lib/sgp4.js.map +1 -0
  25. package/lib/transforms.d.ts +58 -0
  26. package/lib/{ootk-transforms.es.js → transforms.js} +3 -3
  27. package/lib/transforms.js.map +1 -0
  28. package/lib/utils/constants.d.ts +30 -0
  29. package/lib/utils/constants.js +31 -0
  30. package/lib/utils/constants.js.map +1 -0
  31. package/lib/utils/types.d.ts +164 -0
  32. package/lib/utils/types.js +2 -0
  33. package/lib/utils/types.js.map +1 -0
  34. package/lib/utils.d.ts +33 -0
  35. package/lib/{ootk-utils.es.js → utils.js} +12 -5
  36. package/lib/utils.js.map +1 -0
  37. package/package.json +17 -17
  38. package/sandbox.html +8 -0
  39. package/dist/ootk-sgp4.js +0 -3471
  40. package/dist/ootk-sgp4.min.js +0 -34
  41. package/dist/ootk-transforms.js +0 -340
  42. package/dist/ootk-transforms.min.js +0 -1
  43. package/dist/ootk-utils.js +0 -149
  44. package/dist/ootk-utils.min.js +0 -1
  45. package/dist/ootk.min.js +0 -60
  46. package/lib/ootk-transforms.es.d.ts +0 -141
package/CHANGELOG.md CHANGED
@@ -4,51 +4,45 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- #### [v1.0.3](https://github.com/thkruz/ootk/compare/v1.0.2...v1.0.3)
7
+ #### [v1.0.5](https://github.com/thkruz/ootk/compare/v1.0.4...v1.0.5)
8
8
 
9
- - build(umd.js): changed globalObject to this instead of self for Node [`6f79359`](https://github.com/thkruz/ootk/commit/6f793590de90b7e9b32ff2bb0b2aa52a244623c1)
10
- - docs(readme): fixed grammar in readme file [`cd819e8`](https://github.com/thkruz/ootk/commit/cd819e853698af689a11896b9413835847ac41fe)
11
-
12
- #### [v1.0.2](https://github.com/thkruz/ootk/compare/v1.0.1...v1.0.2)
13
-
14
- > 13 January 2021
15
-
16
- - build(package.json): fixed main entry to point to correct file [`62d83a4`](https://github.com/thkruz/ootk/commit/62d83a408df117589cf45b33e9d5db0a41b0cd65)
17
- - docs(readme): fixed link to old library name [`5ba9f84`](https://github.com/thkruz/ootk/commit/5ba9f846a9c4128d235ab223cddf8f3abc442a9b)
18
-
19
- #### [v1.0.1](https://github.com/thkruz/ootk/compare/v1.0.0...v1.0.1)
20
-
21
- > 13 January 2021
9
+ - build(umd.js): renamed es modules to be .es.js files [`#17`](https://github.com/thkruz/ootk/pull/17)
10
+ - Rebase [`#16`](https://github.com/thkruz/ootk/pull/16)
11
+ - Multithread [`#15`](https://github.com/thkruz/ootk/pull/15)
12
+ - 1.0.4 [`#14`](https://github.com/thkruz/ootk/pull/14)
13
+ - refactor: :recycle: consolidate constants and types [`69032ad`](https://github.com/thkruz/ootk/commit/69032adcde7c013b069dc4d58bdb2c88af45d4b5)
14
+ - fix(ootk-sgp4): moved variables to local scope for speed vs reduced garbage collection [`5f41d12`](https://github.com/thkruz/ootk/commit/5f41d125c19d217e28a4278041549e5a6d51368b)
15
+ - refactor: :recycle: code cleanup [`6d9cc64`](https://github.com/thkruz/ootk/commit/6d9cc649d5c3e4787fdf8e61ccc7192a79ca5d9e)
22
16
 
23
- - build(.npmignore): added npmignore to provide a cleaner package on npm [`8d3ebf2`](https://github.com/thkruz/ootk/commit/8d3ebf2b3d0955edf547e87eeca6b895988d1495)
24
-
25
- #### [v1.0.0](https://github.com/thkruz/ootk/compare/v1.0.0-alpha3...v1.0.0)
17
+ #### [v1.0.4](https://github.com/thkruz/ootk/compare/v1.0.0...v1.0.4)
26
18
 
27
19
  > 13 January 2021
28
20
 
29
- - docs(readme): added build size to the readme [`6b5a182`](https://github.com/thkruz/ootk/commit/6b5a1826be37c433444819ee465e11fd0ac0dc52)
21
+ - build(tsconfig.json): enabled sourceMap [`#13`](https://github.com/thkruz/ootk/pull/13)
22
+ - Develop [`#12`](https://github.com/thkruz/ootk/pull/12)
23
+ - Develop [`#11`](https://github.com/thkruz/ootk/pull/11)
24
+ - Develop [`#10`](https://github.com/thkruz/ootk/pull/10)
25
+ - Update issue templates [`039baa7`](https://github.com/thkruz/ootk/commit/039baa7f361869691343dd9522102e596c2ef2b4)
26
+ - ci(ootk): renamed all .es.js files to .js [`d20e7a9`](https://github.com/thkruz/ootk/commit/d20e7a96bd962df2c14dbba499b8c32ee703a036)
27
+ - build(umd.js): changed globalObject to this instead of self for Node [`6f79359`](https://github.com/thkruz/ootk/commit/6f793590de90b7e9b32ff2bb0b2aa52a244623c1)
30
28
 
31
- #### [v1.0.0-alpha3](https://github.com/thkruz/ootk/compare/v1.0.0-alpha2...v1.0.0-alpha3)
29
+ #### [v1.0.0](https://github.com/thkruz/ootk/compare/v1.0.0-alpha1...v1.0.0)
32
30
 
33
31
  > 13 January 2021
34
32
 
33
+ - docs(readme): added build size to the readme [`#5`](https://github.com/thkruz/ootk/pull/5)
34
+ - Develop [`#4`](https://github.com/thkruz/ootk/pull/4)
35
35
  - Develop [`#3`](https://github.com/thkruz/ootk/pull/3)
36
36
  - feat(ootk-transforms): add transforms from satellite.js [`#2`](https://github.com/thkruz/ootk/pull/2)
37
- - Documentation [`#1`](https://github.com/thkruz/ootk/pull/1)
38
37
  - feat(ootk-transforms): added Transforms and Utils modules [`122ed43`](https://github.com/thkruz/ootk/commit/122ed43146acdda835c345529c0b5ce7c315bf10)
39
38
  - refactor(ootk-transforms): sorted functions by name [`98a8059`](https://github.com/thkruz/ootk/commit/98a8059a2fffe8e8d984b94ed6ae064753956060)
40
39
  - docs(readme): updated readme notes [`31913d0`](https://github.com/thkruz/ootk/commit/31913d0be0c2a63f6ed5aa6f1aa7ddfc249add8c)
41
40
 
42
- #### [v1.0.0-alpha2](https://github.com/thkruz/ootk/compare/v1.0.0-alpha1...v1.0.0-alpha2)
43
-
44
- > 13 January 2021
45
-
46
- - feat(ootk-transforms): add transforms from satellite.js [`7643f75`](https://github.com/thkruz/ootk/commit/7643f752d8bbc588bed47eadc02c7f46f25b9702)
47
-
48
41
  #### v1.0.0-alpha1
49
42
 
50
43
  > 13 January 2021
51
44
 
45
+ - Documentation [`#1`](https://github.com/thkruz/ootk/pull/1)
52
46
  - ootk rename [`f194490`](https://github.com/thkruz/ootk/commit/f194490621dcbefba99554a84d654f8003e459d0)
53
47
  - Initial Commit [`24f4627`](https://github.com/thkruz/ootk/commit/24f46276b9f5e92f0ddb9b9ce3af9c41ee3022db)
54
48
  - Functional TypeScript [`02a4b84`](https://github.com/thkruz/ootk/commit/02a4b843726f4eaa0023927dfd0e3b26aada96cd)
package/LICENSE.MD CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Theodore Kruczek
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Theodore Kruczek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,128 +1,128 @@
1
- # ootk
2
- ![build](https://img.shields.io/github/workflow/status/thkruz/ootk/CI?style=flat-square) ![Size](https://img.shields.io/github/languages/code-size/thkruz/ootk?style=flat-square) ![Release](https://img.shields.io/github/v/release/thkruz/ootk?style=flat-square) ![Issues](https://img.shields.io/github/issues/thkruz/ootk?style=flat-square) ![Coverage](https://img.shields.io/codecov/c/github/thkruz/ootk?style=flat-square) [![License](https://img.shields.io/github/license/thkruz/ootk?style=flat-square)](LICENSE.md)
3
-
4
- > An Orbital Object Tookit in Your Web Browser
5
-
6
- **ootk** is a modular collection of small 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.
7
-
8
- ## Table of Contents
9
- - [Installation](#Installation)
10
- - [Usage](#Usage)
11
- - [Contributing](#Contributing)
12
- - [Building](#Building)
13
- - [Contributors](#Contributors)
14
- - [License](#License)
15
-
16
- ## Installation
17
-
18
- Install the library with [NPM](https://www.npmjs.com/):
19
-
20
- ```bash
21
- npm i ootk
22
- ```
23
-
24
- ## Usage
25
-
26
- ### Common.js ([Node.js](https://nodejs.org))
27
-
28
- ```js
29
- let Ootk = require('ootk.js');
30
- ...
31
- const satrec = Ootk.Sgp4.createSatrec(line1, line2, 'wgs72', 'i');
32
- ```
33
-
34
- ### ES ([Babel.js](https://babeljs.io/))
35
-
36
- ```js
37
- import { ootk } from 'ootk.es.js';
38
- ...
39
- const satrec = Ootk.Sgp4.createSatrec(line1, line2, 'wgs72', 'i');
40
- ```
41
-
42
- ### Script tag
43
-
44
- Include `dist/ootk.min.js` as a script in your html:
45
-
46
- ```html
47
- <script src="path/to/dist/ootk.min.js"></script>
48
- ```
49
-
50
- `Ootk` object will be available in global scope:
51
-
52
- ```js
53
- var satrec = Ootk.Sgp4.createSatrec(line1, line2, 'wgs72', 'i');
54
- ```
55
-
56
- ## Building
57
-
58
- The source code is organized as Common.js modules and uses [ES6 syntax](http://es6-features.org/). To build the library:
59
-
60
- 1. Install [Node.js](https://nodejs.org/) and [Node Package Manager](https://www.npmjs.com/);
61
-
62
- 2. Install all required packages with NPM by running the following command from repository's root directory:
63
-
64
- ```bash
65
- npm install
66
- ```
67
-
68
- 3. Run the following NPM script to build everything:
69
-
70
- ```bash
71
- npm run build:umd
72
- ```
73
-
74
- ## NPM Scripts
75
-
76
- - `build` compiles TypeScript into ES6 Modules
77
- - `build:umd` compiles TypeScript into ES6 Modules and generates UMD files
78
- - `lint` lints source code located in `src` directory with [ESLint](http://eslint.org/)
79
- - `lint:fix` lints tests located in `src` directory with ESLint and attempts to auto-fix errors
80
- - `lint:test` lints tests located in `test` directory with ESLint
81
- - `test` runs jest to verify code remains functional
82
- - `test:coverage` generates lcov report to view code coverage
83
-
84
- ## Contributing
85
-
86
- This repo follows [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
87
-
88
- Before starting a work on new [pull request](https://github.com/thkruz/ootk/compare), please, checkout your feature or bugfix branch from `develop` branch:
89
-
90
- ```bash
91
- git checkout develop
92
- git fetch origin
93
- git merge origin/develop
94
- git checkout -b my-feature
95
- ```
96
-
97
- Make sure that your changes don't break the existing code by running:
98
-
99
- ```bash
100
- npm test
101
- ```
102
-
103
- Check that your code follows the rules established in eslint.rc:
104
-
105
- ```bash
106
- npm run lint
107
- ```
108
-
109
- Use [commitzen](https://github.com/commitizen/cz-cli) to format your commit messages:
110
-
111
- ```bash
112
- git add .
113
- git cz
114
- ```
115
-
116
- ## Contributors
117
-
118
- 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:
119
-
120
- - [ezze (Dmitriy Pushkov)](https://github.com/ezze)
121
- - [davidcalhoun (David Calhoun)](https://github.com/davidcalhoun)
122
- - [shashwatak (Shashwat Kandadai)](https://github.com/shashwatak)
123
- - [brandon-rhodes (Brandon Rhodes)](https://github.com/brandon-rhodes)
124
-
125
-
126
- ## License
127
-
128
- In keeping with the tradition of [Shashwat Kandadai's satellite.js](https://github.com/shashwatak/satellite-js/) and [Brandon Rhodes' sgp4](https://pypi.python.org/pypi/sgp4/), I kept this licensed under the [MIT License](LICENSE.md).
1
+ # ootk
2
+ [![build](https://img.shields.io/github/workflow/status/thkruz/ootk/CI?style=flat-square)](https://github.com/thkruz/ootk/actions?query=workflow%3ACI) ![Size](https://img.shields.io/github/languages/code-size/thkruz/ootk?style=flat-square) [![Release](https://img.shields.io/github/v/release/thkruz/ootk?style=flat-square)](https://www.npmjs.com/package/ootk) [![Issues](https://img.shields.io/github/issues/thkruz/ootk?style=flat-square)](https://github.com/thkruz/ootk/issues) [![Coverage](https://img.shields.io/codecov/c/github/thkruz/ootk?style=flat-square)](https://codecov.io/gh/thkruz/ootk) [![License](https://img.shields.io/github/license/thkruz/ootk?style=flat-square)](LICENSE.MD)
3
+
4
+ > An Orbital Object Tookit in Your Web Browser
5
+
6
+ **ootk** is a modular collection of small 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.
7
+
8
+ ## :blue_book: Table of Contents
9
+ - [Installation](#Installation)
10
+ - [Usage](#Usage)
11
+ - [Contributing](#Contributing)
12
+ - [Building](#Building)
13
+ - [Contributors](#Contributors)
14
+ - [License](#License)
15
+
16
+ ## :wrench: Installation
17
+
18
+ Install the library with [NPM](https://www.npmjs.com/):
19
+
20
+ ```bash
21
+ npm i ootk
22
+ ```
23
+
24
+ ## :satellite: Usage
25
+
26
+ ### Common.js ([Node.js](https://nodejs.org))
27
+
28
+ ```js
29
+ let Ootk = require('dist/ootk.js');
30
+ ...
31
+ const satrec = Ootk.Sgp4.createSatrec(line1, line2, 'wgs72', 'i');
32
+ ```
33
+
34
+ ### ES ([Babel.js](https://babeljs.io/))
35
+
36
+ ```js
37
+ import * as Ootk from 'lib/ootk.es.js';
38
+ ...
39
+ const satrec = Ootk.Sgp4.createSatrec(line1, line2, 'wgs72', 'i');
40
+ ```
41
+
42
+ ### Script tag
43
+
44
+ Include `dist/ootk.min.js` as a script in your html:
45
+
46
+ ```html
47
+ <script src="path/to/dist/ootk.min.js"></script>
48
+ ```
49
+
50
+ `Ootk` object will be available in global scope:
51
+
52
+ ```js
53
+ var satrec = Ootk.Sgp4.createSatrec(line1, line2, 'wgs72', 'i');
54
+ ```
55
+
56
+ ## :desktop_computer: Building
57
+
58
+ The source code is organized as Common.js modules and uses [ES6 syntax](http://es6-features.org/). To build the library:
59
+
60
+ 1. Install [Node.js](https://nodejs.org/) and [Node Package Manager](https://www.npmjs.com/);
61
+
62
+ 2. Install all required packages with NPM by running the following command from repository's root directory:
63
+
64
+ ```bash
65
+ npm install
66
+ ```
67
+
68
+ 3. Run the following NPM script to build everything:
69
+
70
+ ```bash
71
+ npm run build:umd
72
+ ```
73
+
74
+ ## :gem: NPM Scripts
75
+
76
+ - `build` compiles TypeScript into ES6 Modules
77
+ - `build:umd` compiles TypeScript into ES6 Modules and generates UMD files
78
+ - `lint` lints source code located in `src` directory with [ESLint](http://eslint.org/)
79
+ - `lint:fix` lints tests located in `src` directory with ESLint and attempts to auto-fix errors
80
+ - `lint:test` lints tests located in `test` directory with ESLint
81
+ - `test` runs jest to verify code remains functional
82
+ - `test:coverage` generates lcov report to view code coverage
83
+
84
+ ## :man_teacher: Contributing
85
+
86
+ This repo follows [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
87
+
88
+ Before starting a work on new [pull request](https://github.com/thkruz/ootk/compare), please, checkout your feature or bugfix branch from `develop` branch:
89
+
90
+ ```bash
91
+ git checkout develop
92
+ git fetch origin
93
+ git merge origin/develop
94
+ git checkout -b my-feature
95
+ ```
96
+
97
+ Make sure that your changes don't break the existing code by running:
98
+
99
+ ```bash
100
+ npm test
101
+ ```
102
+
103
+ Check that your code follows the rules established in eslint.rc:
104
+
105
+ ```bash
106
+ npm run lint
107
+ ```
108
+
109
+ Use [commitzen](https://github.com/commitizen/cz-cli) to format your commit messages:
110
+
111
+ ```bash
112
+ git add .
113
+ git cz
114
+ ```
115
+
116
+ ## :man_scientist: Contributors
117
+
118
+ 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:
119
+
120
+ - [ezze (Dmitriy Pushkov)](https://github.com/ezze)
121
+ - [davidcalhoun (David Calhoun)](https://github.com/davidcalhoun)
122
+ - [shashwatak (Shashwat Kandadai)](https://github.com/shashwatak)
123
+ - [brandon-rhodes (Brandon Rhodes)](https://github.com/brandon-rhodes)
124
+
125
+
126
+ ## :balance_scale: License
127
+
128
+ In keeping with the tradition of [Shashwat Kandadai's satellite.js](https://github.com/shashwatak/satellite-js/) and [Brandon Rhodes' sgp4](https://pypi.python.org/pypi/sgp4/), I kept this licensed under the [MIT License](LICENSE.md).
@@ -0,0 +1,22 @@
1
+ {
2
+ "targets": {
3
+ "debug": {
4
+ "outFile": "build/propagate-debug.wasm",
5
+ "textFile": "build/propagate-debug.wat",
6
+ "sourceMap": true,
7
+ "debug": true
8
+ },
9
+ "release": {
10
+ "outFile": "build/propagate.wasm",
11
+ "textFile": "build/propagate.wat",
12
+ "sourceMap": true,
13
+ "optimizeLevel": 3,
14
+ "shrinkLevel": 0,
15
+ "converge": false,
16
+ "noAssert": false
17
+ }
18
+ },
19
+ "options": {
20
+ "bindings": "esm"
21
+ }
22
+ }