@interstellar-tools/types 0.62.0 → 0.63.0
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.
- package/dist/celestial-bodies/asteroids.d.ts +4 -5
- package/dist/celestial-bodies/asteroids.d.ts.map +1 -1
- package/dist/celestial-bodies/comets.d.ts +9 -7
- package/dist/celestial-bodies/comets.d.ts.map +1 -1
- package/dist/celestial-bodies/moons.d.ts +1 -1
- package/dist/celestial-bodies/planets.d.ts +5 -5
- package/dist/celestial-bodies/planets.d.ts.map +1 -1
- package/dist/celestial-bodies/stars.d.ts +1 -1
- package/dist/celestial-bodies/systems.d.ts +1 -1
- package/dist/distance.d.ts +11 -7
- package/dist/distance.d.ts.map +1 -1
- package/dist/orbits.d.ts +32 -12
- package/dist/orbits.d.ts.map +1 -1
- package/dist/temporal.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DistanceInterface } from '../distance.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FullOrbitInterface } from '../orbits.js';
|
|
3
3
|
import type { DisplayInterface } from './display.js';
|
|
4
4
|
/**
|
|
5
5
|
* High-level **orbital class** of an asteroid (by dynamical region).
|
|
@@ -70,9 +70,8 @@ export type AsteroidSpectralType = 'c-type' | 's-type' | 'v-type' | 'm-type' | '
|
|
|
70
70
|
* q \;=\; a\,(1 - e)
|
|
71
71
|
* $$
|
|
72
72
|
*
|
|
73
|
-
* **Period convention:** `period` is a duration (e.g., in **days**).
|
|
74
|
-
*
|
|
75
|
-
* convention (visualization-specific; not a physical requirement).
|
|
73
|
+
* **Period convention:** `period` is a positive duration (e.g., in **days**).
|
|
74
|
+
* A retrograde orbit (`i > 90°`) has `retrograde: true`.
|
|
76
75
|
*
|
|
77
76
|
* **Coordinates:** Optional `x,y,z` are distances in a chosen reference frame (e.g., ecliptic
|
|
78
77
|
* J2000). Always document the frame you use in calling code.
|
|
@@ -95,7 +94,7 @@ export interface AsteroidInterface {
|
|
|
95
94
|
/** Id of the star the asteroid orbits (e.g., `'sun'`). */
|
|
96
95
|
parent: string;
|
|
97
96
|
/** Orbit around the parent, with all elements including `i`, `w`, `om` and `q`. */
|
|
98
|
-
orbit:
|
|
97
|
+
orbit: FullOrbitInterface;
|
|
99
98
|
/**
|
|
100
99
|
* Optional **Cartesian coordinates** (distance values) in a specified frame.
|
|
101
100
|
* ::: info
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asteroids.d.ts","sourceRoot":"","sources":["../../src/celestial-bodies/asteroids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"asteroids.d.ts","sourceRoot":"","sources":["../../src/celestial-bodies/asteroids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,YAAY,GACpB,oBAAoB,GACpB,qBAAqB,GACrB,iBAAiB,GACjB,SAAS,GACT,wBAAwB,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,aAAa,GACb,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,SAAS,GACT,UAAU,GACV,uBAAuB,CAAC;AAE5B;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,OAAO,CAAC;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IAEX,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IAEb,+DAA+D;IAC/D,IAAI,EAAE,YAAY,CAAC;IAEnB,0EAA0E;IAC1E,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,6DAA6D;IAC7D,YAAY,EAAE,oBAAoB,CAAC;IAEnC,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IAEf,mFAAmF;IACnF,KAAK,EAAE,kBAAkB,CAAC;IAE1B;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,qBAAqB;IACrB,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,qBAAqB;IACrB,CAAC,CAAC,EAAE,iBAAiB,CAAC;IAEtB,4EAA4E;IAC5E,MAAM,EAAE,iBAAiB,CAAC;IAE1B,0FAA0F;IAC1F,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DistanceInterface } from '../distance.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FullOrbitInterface } from '../orbits.js';
|
|
3
3
|
import type { DisplayInterface } from './display.js';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a **comet** in the solar system simulation.
|
|
@@ -10,7 +10,8 @@ import type { DisplayInterface } from './display.js';
|
|
|
10
10
|
* - **Inclination (`i`)**: The tilt of the orbit relative to the **ecliptic plane**, measured in **degrees**.
|
|
11
11
|
* - **Argument of perihelion (`w`)**: The angle from the **ascending node** to the **perihelion**.
|
|
12
12
|
* - **Longitude of the ascending node (`om`)**: Defines where the orbit crosses the ecliptic.
|
|
13
|
-
* - **Perihelion distance (`q`)**: The closest approach to the Sun
|
|
13
|
+
* - **Perihelion distance (`q`)**: The closest approach to the Sun, as a distance.
|
|
14
|
+
* - **Direction (`retrograde`)**: `true` when `i > 90°`, like Halley's comet.
|
|
14
15
|
* - **Angle (`angle`)**: The **true anomaly** at J2000, as for every other body.
|
|
15
16
|
*
|
|
16
17
|
* **Drawing (`display`)**: colour and a scaled drawing size (not the physical
|
|
@@ -30,7 +31,7 @@ export interface CometInterface {
|
|
|
30
31
|
/** Id of the star the comet orbits (e.g., `'sun'`). */
|
|
31
32
|
parent: string;
|
|
32
33
|
/** Orbit around the parent, with all elements including `i`, `w`, `om` and `q`. */
|
|
33
|
-
orbit:
|
|
34
|
+
orbit: FullOrbitInterface;
|
|
34
35
|
/** X-coordinate in a distance-based system (optional). */
|
|
35
36
|
x?: DistanceInterface;
|
|
36
37
|
/** Y-coordinate in a distance-based system (optional). */
|
|
@@ -57,12 +58,13 @@ export interface CometInterface {
|
|
|
57
58
|
* orbit: {
|
|
58
59
|
* a: { value: 17.834, unit: 'au' },
|
|
59
60
|
* e: 0.96714,
|
|
60
|
-
* i: 162.26,
|
|
61
|
-
* w: 111.33,
|
|
62
|
-
* om: 58.42,
|
|
61
|
+
* i: 162.26 as DegreesType,
|
|
62
|
+
* w: 111.33 as DegreesType,
|
|
63
|
+
* om: 58.42 as DegreesType,
|
|
63
64
|
* angle: 2.97966 as Radians,
|
|
64
65
|
* period: { value: 27576, unit: 'd' },
|
|
65
|
-
*
|
|
66
|
+
* retrograde: true,
|
|
67
|
+
* q: { value: 0.586, unit: 'au' }
|
|
66
68
|
* },
|
|
67
69
|
* radius: { value: 11, unit: 'km' },
|
|
68
70
|
* display: { color: '#ffffff', size: 1.2 }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comets.d.ts","sourceRoot":"","sources":["../../src/celestial-bodies/comets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"comets.d.ts","sourceRoot":"","sources":["../../src/celestial-bodies/comets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,IAAI,EAAE,gBAAgB,GAAG,kBAAkB,GAAG,oBAAoB,CAAC;IACnE,4CAA4C;IAC5C,QAAQ,EAAE,mBAAmB,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;IAC7E,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,KAAK,EAAE,kBAAkB,CAAC;IAC1B,0DAA0D;IAC1D,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,0DAA0D;IAC1D,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,0DAA0D;IAC1D,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,wDAAwD;IACxD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,uFAAuF;IACvF,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,EAAE,CAAC"}
|
|
@@ -21,7 +21,7 @@ import type { DisplayInterface } from './display.js';
|
|
|
21
21
|
* orbit: {
|
|
22
22
|
* a: { value: 0.00448, unit: 'au' },
|
|
23
23
|
* e: 0.009,
|
|
24
|
-
* period: { value:
|
|
24
|
+
* period: { value: 3.551, unit: 'd' },
|
|
25
25
|
* angle: 0 as Radians
|
|
26
26
|
* },
|
|
27
27
|
* radius: { value: 1560.8, unit: 'km' },
|
|
@@ -25,7 +25,7 @@ import type { DisplayInterface } from './display.js';
|
|
|
25
25
|
* orbit: {
|
|
26
26
|
* a: { value: 1.0, unit: 'au' },
|
|
27
27
|
* e: 0.0167,
|
|
28
|
-
* period: { value:
|
|
28
|
+
* period: { value: 365.256, unit: 'd' },
|
|
29
29
|
* angle: 1.753 as Radians
|
|
30
30
|
* },
|
|
31
31
|
* radius: { value: 6371, unit: 'km' },
|
|
@@ -52,12 +52,12 @@ export interface PlanetInterface {
|
|
|
52
52
|
orbit?: OrbitInterface;
|
|
53
53
|
/** Physical radius of the planet in kilometres. */
|
|
54
54
|
radius: DistanceInterface;
|
|
55
|
-
/** X-coordinate in the parent's frame. */
|
|
56
|
-
x
|
|
55
|
+
/** X-coordinate in the parent's frame. Optional: a rogue planet or an exoplanet may have no known position. */
|
|
56
|
+
x?: DistanceInterface;
|
|
57
57
|
/** Y-coordinate in the parent's frame. */
|
|
58
|
-
y
|
|
58
|
+
y?: DistanceInterface;
|
|
59
59
|
/** Z-coordinate in the parent's frame. */
|
|
60
|
-
z
|
|
60
|
+
z?: DistanceInterface;
|
|
61
61
|
/** How to draw the planet: its colour, and state a renderer computes. */
|
|
62
62
|
display?: DisplayInterface;
|
|
63
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planets.d.ts","sourceRoot":"","sources":["../../src/celestial-bodies/planets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,IAAI,EACA,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,WAAW,GACX,WAAW,GACX,eAAe,GACf,eAAe,GACf,WAAW,GACX,YAAY,GACZ,aAAa,GACb,aAAa,GACb,cAAc,GACd,cAAc,GACd,cAAc,GACd,YAAY,GACZ,iBAAiB,GACjB,oBAAoB,CAAC;IACzB,6DAA6D;IAC7D,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC;IACjC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,mDAAmD;IACnD,MAAM,EAAE,iBAAiB,CAAC;IAC1B
|
|
1
|
+
{"version":3,"file":"planets.d.ts","sourceRoot":"","sources":["../../src/celestial-bodies/planets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,IAAI,EACA,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,WAAW,GACX,WAAW,GACX,eAAe,GACf,eAAe,GACf,WAAW,GACX,YAAY,GACZ,aAAa,GACb,aAAa,GACb,cAAc,GACd,cAAc,GACd,cAAc,GACd,YAAY,GACZ,iBAAiB,GACjB,oBAAoB,CAAC;IACzB,6DAA6D;IAC7D,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC;IACjC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,mDAAmD;IACnD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,+GAA+G;IAC/G,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,0CAA0C;IAC1C,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,0CAA0C;IAC1C,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,yEAAyE;IACzE,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,eAAe,EAAE,CAAC"}
|
|
@@ -25,7 +25,7 @@ import type { DisplayInterface } from './display.js';
|
|
|
25
25
|
* orbit: {
|
|
26
26
|
* a: { value: 27230, unit: 'ly' },
|
|
27
27
|
* e: 0.005,
|
|
28
|
-
* period: { value:
|
|
28
|
+
* period: { value: 480, unit: 'Myr' },
|
|
29
29
|
* angle: 1.5699 as Radians
|
|
30
30
|
* },
|
|
31
31
|
* radius: { value: 2600000, unit: 'km' },
|
|
@@ -34,7 +34,7 @@ export type SystemKindType = 'planetary' | 'binary' | 'multiple' | 'cluster';
|
|
|
34
34
|
* orbit: {
|
|
35
35
|
* a: { value: 503, unit: 'au' },
|
|
36
36
|
* e: 0.5,
|
|
37
|
-
* period: { value:
|
|
37
|
+
* period: { value: 547, unit: 'kyr' },
|
|
38
38
|
* angle: Math.PI as Radians
|
|
39
39
|
* }
|
|
40
40
|
* };
|
package/dist/distance.d.ts
CHANGED
|
@@ -58,17 +58,19 @@ export type DistanceUnitType = 'm' | 'km' | 'au' | 'ly' | 'kly' | 'Mly' | 'Gly'
|
|
|
58
58
|
*
|
|
59
59
|
* ### Typical flow
|
|
60
60
|
* 1) Accept `DistanceUnitAliasType | DistanceUnitType` at your API boundary.
|
|
61
|
-
* 2) Normalize to `DistanceUnitType`
|
|
61
|
+
* 2) Normalize to `DistanceUnitType` with `normalizeDistanceUnit` from
|
|
62
|
+
* `@interstellar-tools/equations`, or convert directly with `convertDistanceUnit`.
|
|
62
63
|
* 3) Perform calculations using canonical units only.
|
|
63
64
|
*
|
|
64
65
|
* @example
|
|
65
66
|
* ```ts
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* normalizeDistanceUnit('
|
|
67
|
+
* import { normalizeDistanceUnit } from '@interstellar-tools/equations';
|
|
68
|
+
*
|
|
69
|
+
* normalizeDistanceUnit('AU'); // 'au'
|
|
70
|
+
* normalizeDistanceUnit('lightyears'); // 'ly'
|
|
69
71
|
* normalizeDistanceUnit('kilolightyears'); // 'kly'
|
|
70
|
-
* normalizeDistanceUnit('parsecs');
|
|
71
|
-
* normalizeDistanceUnit('Mpc');
|
|
72
|
+
* normalizeDistanceUnit('parsecs'); // 'pc'
|
|
73
|
+
* normalizeDistanceUnit('Mpc'); // 'Mpc' (already canonical)
|
|
72
74
|
* ```
|
|
73
75
|
*
|
|
74
76
|
* @see DistanceUnitType for the canonical symbol set.
|
|
@@ -81,6 +83,8 @@ export type DistanceUnitAliasType = 'meter' | 'meters' | 'metre' | 'metres' | 'k
|
|
|
81
83
|
/**
|
|
82
84
|
* Represents a measurement with an associated unit.
|
|
83
85
|
*
|
|
86
|
+
* @deprecated Use {@link DistanceInterface}, which is identical. `MeasureInterface` will be
|
|
87
|
+
* removed in 2.0.
|
|
84
88
|
* @extends ValueInterface
|
|
85
89
|
* @property {DistanceUnitType} unit - The unit of measurement.
|
|
86
90
|
*
|
|
@@ -101,7 +105,7 @@ export interface MeasureInterface extends ValueInterface {
|
|
|
101
105
|
*
|
|
102
106
|
* @example
|
|
103
107
|
* ```ts
|
|
104
|
-
* const distanceToAlphaCentauri: DistanceInterface = { value: 4.367, unit: '
|
|
108
|
+
* const distanceToAlphaCentauri: DistanceInterface = { value: 4.367, unit: 'ly' };
|
|
105
109
|
* ```
|
|
106
110
|
* @group Distance
|
|
107
111
|
*/
|
package/dist/distance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distance.d.ts","sourceRoot":"","sources":["../src/distance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,gBAAgB,GACxB,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,GACL,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AAEV
|
|
1
|
+
{"version":3,"file":"distance.d.ts","sourceRoot":"","sources":["../src/distance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,gBAAgB,GACxB,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,GACL,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,MAAM,qBAAqB,GAE7B,OAAO,GACP,QAAQ,GACR,OAAO,GACP,QAAQ,GAER,WAAW,GACX,YAAY,GACZ,WAAW,GACX,YAAY,GAEZ,IAAI,GACJ,IAAI,GACJ,mBAAmB,GACnB,oBAAoB,GACpB,mBAAmB,GACnB,oBAAoB,GAEpB,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,KAAK,GACL,eAAe,GACf,gBAAgB,GAChB,KAAK,GACL,eAAe,GACf,gBAAgB,GAChB,KAAK,GAEL,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,aAAa,GACb,KAAK,GACL,YAAY,GACZ,aAAa,GACb,KAAK,GACL,YAAY,GACZ,aAAa,GACb,KAAK,CAAC;AAEV;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,IAAI,EAAE,gBAAgB,CAAC;CACxB"}
|
package/dist/orbits.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Radians } from './numeric.js';
|
|
1
|
+
import type { DistanceInterface } from './distance.js';
|
|
2
|
+
import type { DegreesType, Radians } from './numeric.js';
|
|
3
3
|
import type { TemporalInterface } from './temporal.js';
|
|
4
4
|
/**
|
|
5
5
|
* Clohessy–Wiltshire / Hill relative-motion **state vector** in the LVLH frame.
|
|
@@ -102,9 +102,11 @@ export type CwStateDerivative = readonly [
|
|
|
102
102
|
* B), each carries its own orbit. Both share `e`, `period` and `angle`, their
|
|
103
103
|
* periapses point in opposite directions, and their semi-major axes split by
|
|
104
104
|
* mass ratio: $a_1 = a \, m_2 / (m_1 + m_2)$, where $a$ is their separation.
|
|
105
|
-
* - **Direction**:
|
|
105
|
+
* - **Direction**: `period` is always a positive duration. A retrograde orbit,
|
|
106
|
+
* moving against its parent's rotation, has `retrograde: true`; a renderer
|
|
107
|
+
* can use `retrograde ? -1 : 1` as the direction of travel.
|
|
106
108
|
* - `i`, `w`, `om` and `q` are only given where the dataset has them (comets and
|
|
107
|
-
* asteroids).
|
|
109
|
+
* asteroids). Where `i` is given, `retrograde` is set exactly when `i > 90°`.
|
|
108
110
|
*
|
|
109
111
|
* :::
|
|
110
112
|
*
|
|
@@ -113,7 +115,7 @@ export type CwStateDerivative = readonly [
|
|
|
113
115
|
* const earthOrbit: OrbitInterface = {
|
|
114
116
|
* a: { value: 1.0, unit: 'au' },
|
|
115
117
|
* e: 0.0167,
|
|
116
|
-
* period: { value:
|
|
118
|
+
* period: { value: 365.256, unit: 'd' },
|
|
117
119
|
* angle: 1.753 as Radians
|
|
118
120
|
* };
|
|
119
121
|
* ```
|
|
@@ -121,20 +123,38 @@ export type CwStateDerivative = readonly [
|
|
|
121
123
|
*/
|
|
122
124
|
export interface OrbitInterface {
|
|
123
125
|
/** Semi-major axis of this body's orbit around the parent's centre of mass. */
|
|
124
|
-
a:
|
|
126
|
+
a: DistanceInterface;
|
|
125
127
|
/** Orbital eccentricity (0 = circular, closer to 1 = highly elliptical). */
|
|
126
128
|
e: number;
|
|
127
|
-
/** Orbital period.
|
|
129
|
+
/** Orbital period, always positive. See `retrograde` for the direction. */
|
|
128
130
|
period: TemporalInterface;
|
|
131
|
+
/** `true` for a retrograde orbit. Omitted for the usual prograde orbits. */
|
|
132
|
+
retrograde?: boolean;
|
|
129
133
|
/** Current orbital position at J2000 in radians (true anomaly). */
|
|
130
134
|
angle: Radians;
|
|
135
|
+
/** Orbital inclination in degrees, as catalogues give it. */
|
|
136
|
+
i?: DegreesType;
|
|
137
|
+
/** Argument of periapsis in degrees. */
|
|
138
|
+
w?: DegreesType;
|
|
139
|
+
/** Longitude of the ascending node in degrees. */
|
|
140
|
+
om?: DegreesType;
|
|
141
|
+
/** Periapsis distance $q = a(1 - e)$. */
|
|
142
|
+
q?: DistanceInterface;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* An {@link OrbitInterface} with every orientation element given: `i`, `w`,
|
|
146
|
+
* `om` and `q`. Comets and asteroids carry these.
|
|
147
|
+
*
|
|
148
|
+
* @group Orbits
|
|
149
|
+
*/
|
|
150
|
+
export interface FullOrbitInterface extends OrbitInterface {
|
|
131
151
|
/** Orbital inclination in degrees. */
|
|
132
|
-
i
|
|
152
|
+
i: DegreesType;
|
|
133
153
|
/** Argument of periapsis in degrees. */
|
|
134
|
-
w
|
|
154
|
+
w: DegreesType;
|
|
135
155
|
/** Longitude of the ascending node in degrees. */
|
|
136
|
-
om
|
|
137
|
-
/** Periapsis distance $q = a(1 - e)
|
|
138
|
-
q
|
|
156
|
+
om: DegreesType;
|
|
157
|
+
/** Periapsis distance $q = a(1 - e)$. */
|
|
158
|
+
q: DistanceInterface;
|
|
139
159
|
}
|
|
140
160
|
//# sourceMappingURL=orbits.d.ts.map
|
package/dist/orbits.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orbits.d.ts","sourceRoot":"","sources":["../src/orbits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"orbits.d.ts","sourceRoot":"","sources":["../src/orbits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,MAAM,OAAO,GAAG,SAAS;IAC7B,0CAA0C;IAC1C,CAAC,EAAE,MAAM;IACT,kDAAkD;IAClD,CAAC,EAAE,MAAM;IACT,oDAAoD;IACpD,CAAC,EAAE,MAAM;IACT,yDAAyD;IACzD,IAAI,EAAE,MAAM;IACZ,8DAA8D;IAC9D,IAAI,EAAE,MAAM;IACZ,8DAA8D;IAC9D,IAAI,EAAE,MAAM;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS;IACvC,yDAAyD;IACzD,IAAI,EAAE,MAAM;IACZ,8DAA8D;IAC9D,IAAI,EAAE,MAAM;IACZ,8DAA8D;IAC9D,IAAI,EAAE,MAAM;IACZ,gEAAgE;IAChE,KAAK,EAAE,MAAM;IACb,qEAAqE;IACrE,KAAK,EAAE,MAAM;IACb,qEAAqE;IACrE,KAAK,EAAE,MAAM;CACd,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,CAAC,EAAE,iBAAiB,CAAC;IACrB,4EAA4E;IAC5E,CAAC,EAAE,MAAM,CAAC;IACV,2EAA2E;IAC3E,MAAM,EAAE,iBAAiB,CAAC;IAC1B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mEAAmE;IACnE,KAAK,EAAE,OAAO,CAAC;IACf,6DAA6D;IAC7D,CAAC,CAAC,EAAE,WAAW,CAAC;IAChB,wCAAwC;IACxC,CAAC,CAAC,EAAE,WAAW,CAAC;IAChB,kDAAkD;IAClD,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,yCAAyC;IACzC,CAAC,CAAC,EAAE,iBAAiB,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,sCAAsC;IACtC,CAAC,EAAE,WAAW,CAAC;IACf,wCAAwC;IACxC,CAAC,EAAE,WAAW,CAAC;IACf,kDAAkD;IAClD,EAAE,EAAE,WAAW,CAAC;IAChB,yCAAyC;IACzC,CAAC,EAAE,iBAAiB,CAAC;CACtB"}
|
package/dist/temporal.d.ts
CHANGED
|
@@ -86,11 +86,11 @@ export interface TemporalInterface extends ValueInterface {
|
|
|
86
86
|
* Represents a **time step measurement** in simulation, restricted to days.
|
|
87
87
|
*
|
|
88
88
|
* @extends ValueInterface
|
|
89
|
-
* @property {'
|
|
89
|
+
* @property {'d'} unit - The unit is always **days** (`'d'`).
|
|
90
90
|
*
|
|
91
91
|
* @example
|
|
92
92
|
* ```ts
|
|
93
|
-
* const timeStep: TimeStepInterface = { value: 1, unit: '
|
|
93
|
+
* const timeStep: TimeStepInterface = { value: 1, unit: 'd' };
|
|
94
94
|
* ```
|
|
95
95
|
* @group Temporal
|
|
96
96
|
*/
|
package/package.json
CHANGED