@interstellar-tools/types 0.14.0 → 0.16.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/index.d.ts CHANGED
@@ -3,5 +3,6 @@ export * from './temporal';
3
3
  export * from './numeric';
4
4
  export * from './math';
5
5
  export * from './physics';
6
+ export * from './orbits';
6
7
  export * from './celestial-bodies';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,WAAW,CAAC;AAE1B,cAAc,QAAQ,CAAC;AAEvB,cAAc,WAAW,CAAC;AAE1B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,WAAW,CAAC;AAE1B,cAAc,QAAQ,CAAC;AAEvB,cAAc,WAAW,CAAC;AAE1B,cAAc,UAAU,CAAC;AAEzB,cAAc,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -3,5 +3,6 @@ export * from './temporal';
3
3
  export * from './numeric';
4
4
  export * from './math';
5
5
  export * from './physics';
6
+ export * from './orbits';
6
7
  export * from './celestial-bodies';
7
8
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,WAAW,CAAC;AAE1B,cAAc,QAAQ,CAAC;AAEvB,cAAc,WAAW,CAAC;AAE1B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,WAAW,CAAC;AAE1B,cAAc,QAAQ,CAAC;AAEvB,cAAc,WAAW,CAAC;AAE1B,cAAc,UAAU,CAAC;AAEzB,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Clohessy–Wiltshire / Hill relative-motion **state vector** in the LVLH frame.
3
+ *
4
+ * Axes (LVLH / RSW-style):
5
+ * - `x` — **radial** (outward from the central body / reference orbit radius)
6
+ * - `y` — **along-track** / tangential (direction of motion of the reference orbit)
7
+ * - `z` — **cross-track** (completes right-handed frame, roughly orbit-normal)
8
+ *
9
+ * Components:
10
+ * - `x`, `y`, `z` are relative position components.
11
+ * - `xDot`, `yDot`, `zDot` are relative velocity components (time derivatives).
12
+ *
13
+ * Units:
14
+ * - Positions in meters or kilometers (choose one and stay consistent).
15
+ * - Velocities in m/s or km/s accordingly.
16
+ *
17
+ * This tuple is commonly used as the state for integrating the CW/Hill ODEs.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const s: CwState = [
22
+ * 100, // x (m)
23
+ * 0, // y (m)
24
+ * 0, // z (m)
25
+ * 0, // xDot (m/s)
26
+ * 0.01, // yDot (m/s)
27
+ * 0 // zDot (m/s)
28
+ * ];
29
+ * ```
30
+ *
31
+ * @group Orbits
32
+ */
33
+ export type CwState = readonly [
34
+ /** Radial relative position (outward). */
35
+ x: number,
36
+ /** Along-track relative position (tangential). */
37
+ y: number,
38
+ /** Cross-track relative position (orbit-normal). */
39
+ z: number,
40
+ /** Time derivative of `x` (radial relative velocity). */
41
+ xDot: number,
42
+ /** Time derivative of `y` (along-track relative velocity). */
43
+ yDot: number,
44
+ /** Time derivative of `z` (cross-track relative velocity). */
45
+ zDot: number
46
+ ];
47
+ /**
48
+ * Time derivative of {@link CwState} for CW/Hill dynamics.
49
+ *
50
+ * Ordered as:
51
+ * - Position derivatives: `[xDot, yDot, zDot]`
52
+ * - Acceleration terms: `[xDDot, yDDot, zDDot]`
53
+ *
54
+ * Units:
55
+ * - First three components: velocity (m/s or km/s).
56
+ * - Last three components: acceleration (m/s² or km/s²).
57
+ *
58
+ * Useful as the return type for an ODE RHS function, e.g. `cwHillDerivatives(state, n)`.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const ds: CwStateDerivative = [
63
+ * 0, // xDot (m/s)
64
+ * 0.01, // yDot (m/s)
65
+ * 0, // zDot (m/s)
66
+ * 0.0002,// xDDot (m/s²)
67
+ * 0, // yDDot (m/s²)
68
+ * 0 // zDDot (m/s²)
69
+ * ];
70
+ * ```
71
+ *
72
+ * @group Orbits
73
+ */
74
+ export type CwStateDerivative = readonly [
75
+ /** Time derivative of `x` (radial relative velocity). */
76
+ xDot: number,
77
+ /** Time derivative of `y` (along-track relative velocity). */
78
+ yDot: number,
79
+ /** Time derivative of `z` (cross-track relative velocity). */
80
+ zDot: number,
81
+ /** Time derivative of `xDot` (radial relative acceleration). */
82
+ xDDot: number,
83
+ /** Time derivative of `yDot` (along-track relative acceleration). */
84
+ yDDot: number,
85
+ /** Time derivative of `zDot` (cross-track relative acceleration). */
86
+ zDDot: number
87
+ ];
88
+ //# sourceMappingURL=orbits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orbits.d.ts","sourceRoot":"","sources":["../src/orbits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
package/dist/orbits.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=orbits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orbits.js","sourceRoot":"","sources":["../src/orbits.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interstellar-tools/types",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "Shared TypeScript types (e.g., 3D tuples, equation result interfaces) used across the monorepo to keep APIs predictable and safe.",
5
5
  "keywords": [
6
6
  "types",