@interstellar-tools/constants 0.60.1 → 0.61.1

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.
@@ -3,11 +3,13 @@
3
3
  *
4
4
  * ::: info
5
5
  *
6
- * - Units: `radius` (km); galactocentric coordinates `x`,`y`,`z` (ly); orbital semi-major axis `a` (ly);
7
- * `period` in million years (Myr); orbital angles are unitless here (radians) if provided.
6
+ * - Each star names its `parent` (a galaxy or a system barycenter) and its `orbit` around it.
7
+ * - Units: `radius` (km). Orbits around the galaxy: `a` and `x`,`y`,`z` in ly, `period` in Myr.
8
+ * Orbits within a system: `a` in au, `period` in yr or kyr. `angle` in radians. `mass` in M☉.
8
9
  * - `color` is for visualization only.
9
10
  * - Negative `period` may encode integration direction; the table shows raw values.
10
11
  *
12
+ * - Sources: compiled from public references, mainly NASA, NASA JPL, ESA and Wikipedia. See [data sources](https://github.com/phun-ky/interstellar-tools/blob/main/NOTICE.md#data).
11
13
  * :::
12
14
  *
13
15
  * {@include ../../../../docs/partials/stars.md}
@@ -23,136 +25,158 @@
23
25
  * ```
24
26
  */
25
27
  export const STARS = [
26
- // #region datasetStars
27
28
  {
29
+ id: 'sun',
28
30
  name: 'Sun',
29
31
  type: 'G2V', // Yellow Dwarf, Main Sequence
30
32
  category: 'star',
31
- system: { name: 'Solar System', type: 'planetary system' },
33
+ /** Bound to the Solar System barycenter, which carries the galactic orbit */
34
+ parent: 'solar-system',
35
+ // No orbit: the Sun's wobble around the barycenter is the sum of the planets' pulls, not a Kepler orbit
36
+ /** Mass in solar masses */
37
+ mass: 1,
32
38
  /** Radius in km */
33
39
  radius: { value: 696340, unit: 'km' },
34
40
  /** Visual representation color */
35
- color: '#fff5f1',
36
- /** Galactic position in light-years (relative to Milky Way center) */
37
- x: { value: 0, unit: 'ly' },
38
- y: { value: 27000, unit: 'ly' },
39
- z: { value: 20, unit: 'ly' },
40
- /** Semi-major axis in light-years */
41
- a: { value: 27000, unit: 'ly' },
42
- /** Orbital eccentricity */
43
- e: 0.07,
44
- /** Initial angle in orbit */
45
- angle: 1.5707963267948966,
46
- /** Orbital period in million years (Myr) */
47
- period: { value: -230, unit: 'Myr' }
41
+ color: '#fff5f1'
48
42
  },
49
- // #endregion datasetStars
43
+ // #region datasetStars
50
44
  {
45
+ id: 'vega',
51
46
  name: 'Vega',
52
47
  type: 'A0V', // White-Blue Main Sequence
53
48
  category: 'star',
54
- system: { name: 'Lyra', type: 'stellar system' },
49
+ /** A single star orbits the galaxy directly */
50
+ parent: 'milky-way',
51
+ orbit: {
52
+ /** Semi-major axis in light-years */
53
+ a: { value: 27230.011753394454, unit: 'ly' },
54
+ /** Orbital eccentricity */
55
+ e: 0.005,
56
+ /** Orbital period in million years (Myr) */
57
+ period: { value: -480, unit: 'Myr' },
58
+ /** Initial angle in orbit */
59
+ angle: 1.569867205171707
60
+ },
61
+ /** Radius in km */
55
62
  radius: { value: 2600000, unit: 'km' },
63
+ /** Visual representation color */
56
64
  color: 'blue',
65
+ /** Galactic position in light-years (relative to Milky Way center) */
57
66
  x: { value: 25.3, unit: 'ly' },
58
67
  y: { value: 27230.011753394454, unit: 'ly' },
59
- z: { value: 0, unit: 'ly' },
60
- e: 0.005,
61
- a: { value: 27230.011753394454, unit: 'ly' },
62
- angle: 1.569867205171707,
63
- period: { value: -480, unit: 'Myr' }
68
+ z: { value: 0, unit: 'ly' }
64
69
  },
70
+ // #endregion datasetStars
65
71
  {
72
+ id: 'altair',
66
73
  name: 'Altair',
67
74
  type: 'A7V', // White Main Sequence
68
75
  category: 'star',
69
- system: { name: 'Aquila', type: 'stellar system' },
76
+ parent: 'milky-way',
77
+ orbit: {
78
+ a: { value: 27050.005155082687, unit: 'ly' },
79
+ e: 0.004,
80
+ period: { value: -410, unit: 'Myr' },
81
+ angle: 1.5701789517599378
82
+ },
70
83
  radius: { value: 1700000, unit: 'km' },
71
84
  color: 'white',
72
85
  x: { value: 16.7, unit: 'ly' },
73
86
  y: { value: 27050.005155082687, unit: 'ly' },
74
- z: { value: 0, unit: 'ly' },
75
- e: 0.004,
76
- a: { value: 27050.005155082687, unit: 'ly' },
77
- angle: 1.5701789517599378,
78
- period: { value: -410, unit: 'Myr' }
87
+ z: { value: 0, unit: 'ly' }
79
88
  },
80
89
  {
90
+ id: 'deneb',
81
91
  name: 'Deneb',
82
92
  type: 'A2Ia', // White-Blue Supergiant
83
93
  category: 'star',
84
- system: { name: 'Cygnus', type: 'stellar system' },
94
+ parent: 'milky-way',
95
+ orbit: {
96
+ a: { value: 27375.280016832705, unit: 'ly' },
97
+ e: 0.009,
98
+ period: { value: -720, unit: 'Myr' },
99
+ angle: 1.475524958596149
100
+ },
85
101
  radius: { value: 108000000, unit: 'km' },
86
102
  color: '#cad7ff', // A-type (blue-white)
87
103
  x: { value: 2616, unit: 'ly' },
88
104
  y: { value: 27375.280016832705, unit: 'ly' },
89
- z: { value: 0, unit: 'ly' },
90
- e: 0.009,
91
- a: { value: 27375.280016832705, unit: 'ly' },
92
- angle: 1.475524958596149,
93
- period: { value: -720, unit: 'Myr' }
105
+ z: { value: 0, unit: 'ly' }
94
106
  },
95
107
  {
108
+ // Spica is a close binary; modelled as a single star until the binary is added
109
+ id: 'spica',
96
110
  name: 'Spica',
97
111
  type: 'B1III-IV', // Blue Giant/Subgiant
98
112
  category: 'star',
99
- system: { name: 'Virgo', type: 'stellar system' },
113
+ parent: 'milky-way',
114
+ orbit: {
115
+ a: { value: 27201.148872795795, unit: 'ly' },
116
+ e: 0.006,
117
+ period: { value: -550, unit: 'Myr' },
118
+ angle: 1.5616057972952029
119
+ },
100
120
  radius: { value: 73500000, unit: 'km' },
101
121
  color: 'blue',
102
122
  x: { value: 250, unit: 'ly' },
103
123
  y: { value: 27201.148872795795, unit: 'ly' },
104
- z: { value: 0, unit: 'ly' },
105
- e: 0.006,
106
- a: { value: 27201.148872795795, unit: 'ly' },
107
- angle: 1.5616057972952029,
108
- period: { value: -550, unit: 'Myr' }
124
+ z: { value: 0, unit: 'ly' }
109
125
  },
110
- // Alpha Centauri: ~4.4 ly away, so its galactic orbit (a, e, period) is approximated by the Sun's.
111
- // Radii from Kervella et al. 2017 (A, B) and Ribas et al. 2017 (Proxima), with R☉ = 695 700 km.
126
+ // Alpha Centauri: A and B orbit the AB barycenter; the AB pair and Proxima orbit the
127
+ // system barycenter (see SYSTEMS). Each pair shares e, period and angle, and splits its
128
+ // separation by mass ratio, a₁ = a·m₂/(m₁ + m₂).
129
+ // A-B orbit, masses and radii: Akeson et al. 2021, Table 8 (P, e, periastron 1955.564, and a
130
+ // separation of 17.4930 arcsec at a parallax of 750.81 mas = 23.30 au).
131
+ // Proxima's orbit and mass: Kervella et al. 2017, Tables 1 and 3 (a 8.7 kau, e 0.50, P 547 kyr,
132
+ // next periastron in 283 kyr). Proxima's radius from Ribas et al. 2017. R☉ = 695 700 km.
112
133
  {
134
+ id: 'alpha-centauri-a',
113
135
  name: 'Alpha Centauri A',
114
136
  type: 'G2V', // Yellow Dwarf, Main Sequence
115
137
  category: 'star',
116
- system: { name: 'Alpha Centauri', type: 'stellar system' },
117
- radius: { value: 851119, unit: 'km' }, // 1.2234 R☉
118
- color: '#fff4ea', // G-type
119
- x: { value: 4.37, unit: 'ly' },
120
- y: { value: 27000.000353646294, unit: 'ly' },
121
- z: { value: 0, unit: 'ly' },
122
- e: 0.07,
123
- a: { value: 27000.000353646294, unit: 'ly' },
124
- angle: 1.570634474946578,
125
- period: { value: -230, unit: 'Myr' }
138
+ parent: 'alpha-centauri-ab',
139
+ orbit: {
140
+ a: { value: 10.66, unit: 'au' }, // 23.30 au × m_B / (m_A + m_B)
141
+ e: 0.51947,
142
+ period: { value: -79.762, unit: 'yr' },
143
+ angle: 3.275243601437025 // true anomaly at J2000
144
+ },
145
+ mass: 1.0788,
146
+ radius: { value: 847015, unit: 'km' }, // 1.2175 R☉
147
+ color: '#fff4ea' // G-type
126
148
  },
127
149
  {
150
+ id: 'alpha-centauri-b',
128
151
  name: 'Alpha Centauri B',
129
152
  type: 'K1V', // Orange Dwarf, Main Sequence
130
153
  category: 'star',
131
- system: { name: 'Alpha Centauri', type: 'stellar system' },
132
- radius: { value: 600528, unit: 'km' }, // 0.8632 R☉
133
- color: '#ffd2a1', // K-type
134
- x: { value: 4.37, unit: 'ly' },
135
- y: { value: 27000.000353646294, unit: 'ly' },
136
- z: { value: 0, unit: 'ly' },
137
- e: 0.07,
138
- a: { value: 27000.000353646294, unit: 'ly' },
139
- angle: 1.570634474946578,
140
- period: { value: -230, unit: 'Myr' }
154
+ parent: 'alpha-centauri-ab',
155
+ orbit: {
156
+ a: { value: 12.64, unit: 'au' }, // 23.30 au × m_A / (m_A + m_B)
157
+ e: 0.51947,
158
+ period: { value: -79.762, unit: 'yr' },
159
+ angle: 3.275243601437025
160
+ },
161
+ mass: 0.9092,
162
+ radius: { value: 597676, unit: 'km' }, // 0.8591 R☉
163
+ color: '#ffd2a1' // K-type
141
164
  },
142
165
  {
166
+ id: 'proxima-centauri',
143
167
  name: 'Proxima Centauri',
144
168
  type: 'M5.5Ve', // Red Dwarf, flare star
145
169
  category: 'star',
146
- system: { name: 'Alpha Centauri', type: 'stellar system' },
170
+ parent: 'alpha-centauri',
171
+ orbit: {
172
+ a: { value: 8197, unit: 'au' }, // 8700 au × m_AB / (m_AB + m_P)
173
+ e: 0.5,
174
+ period: { value: -547, unit: 'kyr' },
175
+ angle: 3.099566485428788 // near apastron, 13.0 kau from AB
176
+ },
177
+ mass: 0.1221,
147
178
  radius: { value: 107277, unit: 'km' }, // 0.1542 R☉
148
- color: '#ffcc6f', // M-type
149
- x: { value: 4.2465, unit: 'ly' },
150
- y: { value: 27000.00033394004, unit: 'ly' },
151
- z: { value: 0, unit: 'ly' },
152
- e: 0.07,
153
- a: { value: 27000.00033394004, unit: 'ly' },
154
- angle: 1.570639049020361,
155
- period: { value: -230, unit: 'Myr' }
179
+ color: '#ffcc6f' // M-type
156
180
  }
157
181
  ];
158
182
  //# sourceMappingURL=stars.js.map
@@ -1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,EAAE,EAAE,YAAY;QACnD,KAAK,EAAE,SAAS,CAAC,SAAS;KAC3B;CAC2B,CAAC"}
@@ -1,12 +1,14 @@
1
1
  import { SystemsType } from '@interstellar-tools/types';
2
2
  /**
3
- * Predefined star systems in the galaxy.
3
+ * Predefined systems: the barycenters that stars and planets orbit.
4
4
  *
5
5
  * ::: info
6
6
  *
7
- * - `distance` is in light-years (ly).
8
- * - `stars` lists the primary named stars in the system (referenced by name).
7
+ * - Systems don't list their members; stars and planets name their system as `parent`.
8
+ * - Systems nest: `alpha-centauri-ab` orbits inside `alpha-centauri`.
9
+ * - `distance` (from the Sun) and galactic `x`,`y`,`z` are in light-years (ly).
9
10
  *
11
+ * - Sources: compiled from public references, mainly NASA, NASA JPL, ESA and Wikipedia. See [data sources](https://github.com/phun-ky/interstellar-tools/blob/main/NOTICE.md#data).
10
12
  * :::
11
13
  *
12
14
  * {@include ../../../../docs/partials/systems.md}
@@ -1 +1 @@
1
- {"version":3,"file":"systems.d.ts","sourceRoot":"","sources":["../../src/bodies/systems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,EAAE,WAaU,CAAC"}
1
+ {"version":3,"file":"systems.d.ts","sourceRoot":"","sources":["../../src/bodies/systems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,OAAO,EAAE,WAmDU,CAAC"}
@@ -1,11 +1,13 @@
1
1
  /**
2
- * Predefined star systems in the galaxy.
2
+ * Predefined systems: the barycenters that stars and planets orbit.
3
3
  *
4
4
  * ::: info
5
5
  *
6
- * - `distance` is in light-years (ly).
7
- * - `stars` lists the primary named stars in the system (referenced by name).
6
+ * - Systems don't list their members; stars and planets name their system as `parent`.
7
+ * - Systems nest: `alpha-centauri-ab` orbits inside `alpha-centauri`.
8
+ * - `distance` (from the Sun) and galactic `x`,`y`,`z` are in light-years (ly).
8
9
  *
10
+ * - Sources: compiled from public references, mainly NASA, NASA JPL, ESA and Wikipedia. See [data sources](https://github.com/phun-ky/interstellar-tools/blob/main/NOTICE.md#data).
9
11
  * :::
10
12
  *
11
13
  * {@include ../../../../docs/partials/systems.md}
@@ -24,15 +26,53 @@
24
26
  */
25
27
  export const SYSTEMS = [
26
28
  {
29
+ id: 'solar-system',
27
30
  name: 'Solar System',
28
- stars: ['Sun'],
29
- distance: 0
31
+ kind: 'planetary',
32
+ parent: 'milky-way',
33
+ /** One galactic orbit for the whole system, shared by everything in it */
34
+ orbit: {
35
+ a: { value: 27000, unit: 'ly' },
36
+ e: 0.07,
37
+ period: { value: -230, unit: 'Myr' },
38
+ angle: 1.5707963267948966
39
+ },
40
+ distance: { value: 0, unit: 'ly' },
41
+ /** Galactic position in light-years (relative to Milky Way center) */
42
+ x: { value: 0, unit: 'ly' },
43
+ y: { value: 27000, unit: 'ly' },
44
+ z: { value: 20, unit: 'ly' }
30
45
  },
31
46
  // #region datasetSystems
32
47
  {
48
+ id: 'alpha-centauri',
33
49
  name: 'Alpha Centauri',
34
- stars: ['Alpha Centauri A', 'Alpha Centauri B', 'Proxima Centauri'],
35
- distance: 4.37
50
+ kind: 'multiple',
51
+ parent: 'milky-way',
52
+ // ~4.4 ly away, so its galactic orbit is approximated by the Sun's
53
+ orbit: {
54
+ a: { value: 27000.000353646294, unit: 'ly' },
55
+ e: 0.07,
56
+ period: { value: -230, unit: 'Myr' },
57
+ angle: 1.570634474946578
58
+ },
59
+ distance: { value: 4.37, unit: 'ly' },
60
+ x: { value: 4.37, unit: 'ly' },
61
+ y: { value: 27000.000353646294, unit: 'ly' },
62
+ z: { value: 0, unit: 'ly' }
63
+ },
64
+ {
65
+ // The A-B pair, orbiting the system barycenter opposite Proxima (Kervella et al. 2017)
66
+ id: 'alpha-centauri-ab',
67
+ name: 'Alpha Centauri AB',
68
+ kind: 'binary',
69
+ parent: 'alpha-centauri',
70
+ orbit: {
71
+ a: { value: 503, unit: 'au' }, // 8700 au × m_P / (m_AB + m_P)
72
+ e: 0.5,
73
+ period: { value: -547, unit: 'kyr' },
74
+ angle: 3.099566485428788
75
+ }
36
76
  }
37
77
  // #endregion datasetSystems
38
78
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"systems.js","sourceRoot":"","sources":["../../src/bodies/systems.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAgB;IAClC;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,CAAC,KAAK,CAAC;QACd,QAAQ,EAAE,CAAC;KACZ;IACD,yBAAyB;IACzB;QACE,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,CAAC;QACnE,QAAQ,EAAE,IAAI;KACf;IACD,4BAA4B;CACE,CAAC"}
1
+ {"version":3,"file":"systems.js","sourceRoot":"","sources":["../../src/bodies/systems.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAgB;IAClC;QACE,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,WAAW;QACnB,0EAA0E;QAC1E,KAAK,EAAE;YACL,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE;YAC/B,CAAC,EAAE,IAAI;YACP,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE;YACpC,KAAK,EAAE,kBAA6B;SACrC;QACD,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;QAClC,sEAAsE;QACtE,CAA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ACpC;KACF;IACD,4BAA4B;CACE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interstellar-tools/constants",
3
- "version": "0.60.1",
3
+ "version": "0.61.1",
4
4
  "description": "Authoritative physical and astronomical constants in SI units for consistent calculations.",
5
5
  "keywords": [
6
6
  "interstellar",
@@ -110,7 +110,7 @@
110
110
  "test:ci": "glob-bin -c \"node --import tsx --test --no-warnings --experimental-test-coverage --test-reporter=cobertura --test-reporter-destination=coverage/cobertura-coverage.xml --test-reporter=spec --test-reporter-destination=stdout\" \"**/__tests__/**/*.spec.ts\""
111
111
  },
112
112
  "dependencies": {
113
- "@interstellar-tools/types": "^0.60.0"
113
+ "@interstellar-tools/types": "^0.61.0"
114
114
  },
115
115
  "devDependencies": {
116
116
  "@types/node": "^24.19.2",