@johnmorrisdotca/uchusen-rockets 0.18.0 → 0.19.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.
Files changed (322) hide show
  1. package/CHANGELOG.md +30 -4
  2. package/NOTICE.md +22 -4
  3. package/README.md +16 -11
  4. package/dist/assets/hubble-hubble-aft-shroud.glb +0 -0
  5. package/dist/assets/hubble-hubble-aft-shroud.painted.svg +1 -0
  6. package/dist/assets/hubble-hubble-aft-shroud.svg +1 -0
  7. package/dist/assets/hubble-hubble-aft-shroud.thick.svg +1 -0
  8. package/dist/assets/hubble-hubble-antenna-far.glb +0 -0
  9. package/dist/assets/hubble-hubble-antenna-far.painted.svg +1 -0
  10. package/dist/assets/hubble-hubble-antenna-far.svg +1 -0
  11. package/dist/assets/hubble-hubble-antenna-far.thick.svg +1 -0
  12. package/dist/assets/hubble-hubble-antenna-near.glb +0 -0
  13. package/dist/assets/hubble-hubble-antenna-near.painted.svg +1 -0
  14. package/dist/assets/hubble-hubble-antenna-near.svg +1 -0
  15. package/dist/assets/hubble-hubble-antenna-near.thick.svg +1 -0
  16. package/dist/assets/hubble-hubble-apart.painted.svg +1 -0
  17. package/dist/assets/hubble-hubble-apart.svg +1 -0
  18. package/dist/assets/hubble-hubble-apart.thick.svg +1 -0
  19. package/dist/assets/hubble-hubble-aperture-door.glb +0 -0
  20. package/dist/assets/hubble-hubble-aperture-door.painted.svg +1 -0
  21. package/dist/assets/hubble-hubble-aperture-door.svg +1 -0
  22. package/dist/assets/hubble-hubble-aperture-door.thick.svg +1 -0
  23. package/dist/assets/hubble-hubble-array-left.glb +0 -0
  24. package/dist/assets/hubble-hubble-array-left.painted.svg +1 -0
  25. package/dist/assets/hubble-hubble-array-left.svg +1 -0
  26. package/dist/assets/hubble-hubble-array-left.thick.svg +1 -0
  27. package/dist/assets/hubble-hubble-array-right.glb +0 -0
  28. package/dist/assets/hubble-hubble-array-right.painted.svg +1 -0
  29. package/dist/assets/hubble-hubble-array-right.svg +1 -0
  30. package/dist/assets/hubble-hubble-array-right.thick.svg +1 -0
  31. package/dist/assets/hubble-hubble-equipment-section.glb +0 -0
  32. package/dist/assets/hubble-hubble-equipment-section.painted.svg +1 -0
  33. package/dist/assets/hubble-hubble-equipment-section.svg +1 -0
  34. package/dist/assets/hubble-hubble-equipment-section.thick.svg +1 -0
  35. package/dist/assets/hubble-hubble-forward-shell.glb +0 -0
  36. package/dist/assets/hubble-hubble-forward-shell.painted.svg +1 -0
  37. package/dist/assets/hubble-hubble-forward-shell.svg +1 -0
  38. package/dist/assets/hubble-hubble-forward-shell.thick.svg +1 -0
  39. package/dist/assets/hubble-hubble-light-shield.glb +0 -0
  40. package/dist/assets/hubble-hubble-light-shield.painted.svg +1 -0
  41. package/dist/assets/hubble-hubble-light-shield.svg +1 -0
  42. package/dist/assets/hubble-hubble-light-shield.thick.svg +1 -0
  43. package/dist/assets/hubble-hubble.glb +0 -0
  44. package/dist/assets/hubble-hubble.painted.svg +1 -1
  45. package/dist/assets/hubble-hubble.svg +1 -1
  46. package/dist/assets/hubble-hubble.thick.svg +1 -1
  47. package/dist/assets/iss-iss-airlock.glb +0 -0
  48. package/dist/assets/iss-iss-airlock.painted.svg +1 -0
  49. package/dist/assets/iss-iss-airlock.svg +1 -0
  50. package/dist/assets/iss-iss-airlock.thick.svg +1 -0
  51. package/dist/assets/iss-iss-apart.painted.svg +1 -0
  52. package/dist/assets/iss-iss-apart.svg +1 -0
  53. package/dist/assets/iss-iss-apart.thick.svg +1 -0
  54. package/dist/assets/iss-iss-arrays-p4.glb +0 -0
  55. package/dist/assets/iss-iss-arrays-p4.painted.svg +1 -0
  56. package/dist/assets/iss-iss-arrays-p4.svg +1 -0
  57. package/dist/assets/iss-iss-arrays-p4.thick.svg +1 -0
  58. package/dist/assets/iss-iss-arrays-p6.glb +0 -0
  59. package/dist/assets/iss-iss-arrays-p6.painted.svg +1 -0
  60. package/dist/assets/iss-iss-arrays-p6.svg +1 -0
  61. package/dist/assets/iss-iss-arrays-p6.thick.svg +1 -0
  62. package/dist/assets/iss-iss-arrays-s4.glb +0 -0
  63. package/dist/assets/iss-iss-arrays-s4.painted.svg +1 -0
  64. package/dist/assets/iss-iss-arrays-s4.svg +1 -0
  65. package/dist/assets/iss-iss-arrays-s4.thick.svg +1 -0
  66. package/dist/assets/iss-iss-arrays-s6.glb +0 -0
  67. package/dist/assets/iss-iss-arrays-s6.painted.svg +1 -0
  68. package/dist/assets/iss-iss-arrays-s6.svg +1 -0
  69. package/dist/assets/iss-iss-arrays-s6.thick.svg +1 -0
  70. package/dist/assets/iss-iss-columbus.glb +0 -0
  71. package/dist/assets/iss-iss-columbus.painted.svg +1 -0
  72. package/dist/assets/iss-iss-columbus.svg +1 -0
  73. package/dist/assets/iss-iss-columbus.thick.svg +1 -0
  74. package/dist/assets/iss-iss-destiny.glb +0 -0
  75. package/dist/assets/iss-iss-destiny.painted.svg +1 -0
  76. package/dist/assets/iss-iss-destiny.svg +1 -0
  77. package/dist/assets/iss-iss-destiny.thick.svg +1 -0
  78. package/dist/assets/iss-iss-harmony.glb +0 -0
  79. package/dist/assets/iss-iss-harmony.painted.svg +1 -0
  80. package/dist/assets/iss-iss-harmony.svg +1 -0
  81. package/dist/assets/iss-iss-harmony.thick.svg +1 -0
  82. package/dist/assets/iss-iss-kibo.glb +0 -0
  83. package/dist/assets/iss-iss-kibo.painted.svg +1 -0
  84. package/dist/assets/iss-iss-kibo.svg +1 -0
  85. package/dist/assets/iss-iss-kibo.thick.svg +1 -0
  86. package/dist/assets/iss-iss-radiators-port.glb +0 -0
  87. package/dist/assets/iss-iss-radiators-port.painted.svg +1 -0
  88. package/dist/assets/iss-iss-radiators-port.svg +1 -0
  89. package/dist/assets/iss-iss-radiators-port.thick.svg +1 -0
  90. package/dist/assets/iss-iss-radiators-starboard.glb +0 -0
  91. package/dist/assets/iss-iss-radiators-starboard.painted.svg +1 -0
  92. package/dist/assets/iss-iss-radiators-starboard.svg +1 -0
  93. package/dist/assets/iss-iss-radiators-starboard.thick.svg +1 -0
  94. package/dist/assets/iss-iss-soyuz-aft.glb +0 -0
  95. package/dist/assets/iss-iss-soyuz-aft.painted.svg +1 -0
  96. package/dist/assets/iss-iss-soyuz-aft.svg +1 -0
  97. package/dist/assets/iss-iss-soyuz-aft.thick.svg +1 -0
  98. package/dist/assets/iss-iss-soyuz-zarya-nadir.glb +0 -0
  99. package/dist/assets/iss-iss-soyuz-zarya-nadir.painted.svg +1 -0
  100. package/dist/assets/iss-iss-soyuz-zarya-nadir.svg +1 -0
  101. package/dist/assets/iss-iss-soyuz-zarya-nadir.thick.svg +1 -0
  102. package/dist/assets/iss-iss-soyuz-zvezda-nadir.glb +0 -0
  103. package/dist/assets/iss-iss-soyuz-zvezda-nadir.painted.svg +1 -0
  104. package/dist/assets/iss-iss-soyuz-zvezda-nadir.svg +1 -0
  105. package/dist/assets/iss-iss-soyuz-zvezda-nadir.thick.svg +1 -0
  106. package/dist/assets/iss-iss-soyuz-zvezda-zenith.glb +0 -0
  107. package/dist/assets/iss-iss-soyuz-zvezda-zenith.painted.svg +1 -0
  108. package/dist/assets/iss-iss-soyuz-zvezda-zenith.svg +1 -0
  109. package/dist/assets/iss-iss-soyuz-zvezda-zenith.thick.svg +1 -0
  110. package/dist/assets/iss-iss-truss-p1.glb +0 -0
  111. package/dist/assets/iss-iss-truss-p1.painted.svg +1 -0
  112. package/dist/assets/iss-iss-truss-p1.svg +1 -0
  113. package/dist/assets/iss-iss-truss-p1.thick.svg +1 -0
  114. package/dist/assets/iss-iss-truss-p3-p4.glb +0 -0
  115. package/dist/assets/iss-iss-truss-p3-p4.painted.svg +1 -0
  116. package/dist/assets/iss-iss-truss-p3-p4.svg +1 -0
  117. package/dist/assets/iss-iss-truss-p3-p4.thick.svg +1 -0
  118. package/dist/assets/iss-iss-truss-p5.glb +0 -0
  119. package/dist/assets/iss-iss-truss-p5.painted.svg +1 -0
  120. package/dist/assets/iss-iss-truss-p5.svg +1 -0
  121. package/dist/assets/iss-iss-truss-p5.thick.svg +1 -0
  122. package/dist/assets/iss-iss-truss-p6.glb +0 -0
  123. package/dist/assets/iss-iss-truss-p6.painted.svg +1 -0
  124. package/dist/assets/iss-iss-truss-p6.svg +1 -0
  125. package/dist/assets/iss-iss-truss-p6.thick.svg +1 -0
  126. package/dist/assets/iss-iss-truss-s0.glb +0 -0
  127. package/dist/assets/iss-iss-truss-s0.painted.svg +1 -0
  128. package/dist/assets/iss-iss-truss-s0.svg +1 -0
  129. package/dist/assets/iss-iss-truss-s0.thick.svg +1 -0
  130. package/dist/assets/iss-iss-truss-s1.glb +0 -0
  131. package/dist/assets/iss-iss-truss-s1.painted.svg +1 -0
  132. package/dist/assets/iss-iss-truss-s1.svg +1 -0
  133. package/dist/assets/iss-iss-truss-s1.thick.svg +1 -0
  134. package/dist/assets/iss-iss-truss-s3-s4.glb +0 -0
  135. package/dist/assets/iss-iss-truss-s3-s4.painted.svg +1 -0
  136. package/dist/assets/iss-iss-truss-s3-s4.svg +1 -0
  137. package/dist/assets/iss-iss-truss-s3-s4.thick.svg +1 -0
  138. package/dist/assets/iss-iss-truss-s5.glb +0 -0
  139. package/dist/assets/iss-iss-truss-s5.painted.svg +1 -0
  140. package/dist/assets/iss-iss-truss-s5.svg +1 -0
  141. package/dist/assets/iss-iss-truss-s5.thick.svg +1 -0
  142. package/dist/assets/iss-iss-truss-s6.glb +0 -0
  143. package/dist/assets/iss-iss-truss-s6.painted.svg +1 -0
  144. package/dist/assets/iss-iss-truss-s6.svg +1 -0
  145. package/dist/assets/iss-iss-truss-s6.thick.svg +1 -0
  146. package/dist/assets/iss-iss-unity.glb +0 -0
  147. package/dist/assets/iss-iss-unity.painted.svg +1 -0
  148. package/dist/assets/iss-iss-unity.svg +1 -0
  149. package/dist/assets/iss-iss-unity.thick.svg +1 -0
  150. package/dist/assets/iss-iss-zarya.glb +0 -0
  151. package/dist/assets/iss-iss-zarya.painted.svg +1 -0
  152. package/dist/assets/iss-iss-zarya.svg +1 -0
  153. package/dist/assets/iss-iss-zarya.thick.svg +1 -0
  154. package/dist/assets/iss-iss-zvezda.glb +0 -0
  155. package/dist/assets/iss-iss-zvezda.painted.svg +1 -0
  156. package/dist/assets/iss-iss-zvezda.svg +1 -0
  157. package/dist/assets/iss-iss-zvezda.thick.svg +1 -0
  158. package/dist/assets/iss-iss.glb +0 -0
  159. package/dist/assets/iss-iss.painted.svg +1 -1
  160. package/dist/assets/iss-iss.svg +1 -1
  161. package/dist/assets/iss-iss.thick.svg +1 -1
  162. package/dist/assets/jupiter-c-jupiter-c-apart.painted.svg +1 -0
  163. package/dist/assets/jupiter-c-jupiter-c-apart.svg +1 -0
  164. package/dist/assets/jupiter-c-jupiter-c-apart.thick.svg +1 -0
  165. package/dist/assets/jupiter-c-jupiter-c-first-stage.glb +0 -0
  166. package/dist/assets/jupiter-c-jupiter-c-first-stage.painted.svg +1 -0
  167. package/dist/assets/jupiter-c-jupiter-c-first-stage.svg +1 -0
  168. package/dist/assets/jupiter-c-jupiter-c-first-stage.thick.svg +1 -0
  169. package/dist/assets/jupiter-c-jupiter-c-fourth-stage.glb +0 -0
  170. package/dist/assets/jupiter-c-jupiter-c-fourth-stage.painted.svg +1 -0
  171. package/dist/assets/jupiter-c-jupiter-c-fourth-stage.svg +1 -0
  172. package/dist/assets/jupiter-c-jupiter-c-fourth-stage.thick.svg +1 -0
  173. package/dist/assets/jupiter-c-jupiter-c-tail.glb +0 -0
  174. package/dist/assets/jupiter-c-jupiter-c-tail.painted.svg +1 -0
  175. package/dist/assets/jupiter-c-jupiter-c-tail.svg +1 -0
  176. package/dist/assets/jupiter-c-jupiter-c-tail.thick.svg +1 -0
  177. package/dist/assets/jupiter-c-jupiter-c-tub.glb +0 -0
  178. package/dist/assets/jupiter-c-jupiter-c-tub.painted.svg +1 -0
  179. package/dist/assets/jupiter-c-jupiter-c-tub.svg +1 -0
  180. package/dist/assets/jupiter-c-jupiter-c-tub.thick.svg +1 -0
  181. package/dist/assets/jupiter-c-jupiter-c.glb +0 -0
  182. package/dist/assets/jupiter-c-jupiter-c.painted.svg +1 -1
  183. package/dist/assets/jupiter-c-jupiter-c.svg +1 -1
  184. package/dist/assets/jupiter-c-jupiter-c.thick.svg +1 -1
  185. package/dist/assets/models/hubble-aft-shroud.glb +0 -0
  186. package/dist/assets/models/hubble-antenna-far.glb +0 -0
  187. package/dist/assets/models/hubble-antenna-near.glb +0 -0
  188. package/dist/assets/models/hubble-aperture-door.glb +0 -0
  189. package/dist/assets/models/hubble-array-left.glb +0 -0
  190. package/dist/assets/models/hubble-array-right.glb +0 -0
  191. package/dist/assets/models/hubble-equipment-section.glb +0 -0
  192. package/dist/assets/models/hubble-forward-shell.glb +0 -0
  193. package/dist/assets/models/hubble-light-shield.glb +0 -0
  194. package/dist/assets/models/iss-airlock.glb +0 -0
  195. package/dist/assets/models/iss-arrays-p4.glb +0 -0
  196. package/dist/assets/models/iss-arrays-p6.glb +0 -0
  197. package/dist/assets/models/iss-arrays-s4.glb +0 -0
  198. package/dist/assets/models/iss-arrays-s6.glb +0 -0
  199. package/dist/assets/models/iss-columbus.glb +0 -0
  200. package/dist/assets/models/iss-destiny.glb +0 -0
  201. package/dist/assets/models/iss-harmony.glb +0 -0
  202. package/dist/assets/models/iss-kibo.glb +0 -0
  203. package/dist/assets/models/iss-radiators-port.glb +0 -0
  204. package/dist/assets/models/iss-radiators-starboard.glb +0 -0
  205. package/dist/assets/models/iss-soyuz-aft.glb +0 -0
  206. package/dist/assets/models/iss-soyuz-zarya-nadir.glb +0 -0
  207. package/dist/assets/models/iss-soyuz-zvezda-nadir.glb +0 -0
  208. package/dist/assets/models/iss-soyuz-zvezda-zenith.glb +0 -0
  209. package/dist/assets/models/iss-truss-p1.glb +0 -0
  210. package/dist/assets/models/iss-truss-p3-p4.glb +0 -0
  211. package/dist/assets/models/iss-truss-p5.glb +0 -0
  212. package/dist/assets/models/iss-truss-p6.glb +0 -0
  213. package/dist/assets/models/iss-truss-s0.glb +0 -0
  214. package/dist/assets/models/iss-truss-s1.glb +0 -0
  215. package/dist/assets/models/iss-truss-s3-s4.glb +0 -0
  216. package/dist/assets/models/iss-truss-s5.glb +0 -0
  217. package/dist/assets/models/iss-truss-s6.glb +0 -0
  218. package/dist/assets/models/iss-unity.glb +0 -0
  219. package/dist/assets/models/iss-zarya.glb +0 -0
  220. package/dist/assets/models/iss-zvezda.glb +0 -0
  221. package/dist/assets/models/jupiter-c-first-stage.glb +0 -0
  222. package/dist/assets/models/jupiter-c-fourth-stage.glb +0 -0
  223. package/dist/assets/models/jupiter-c-tail.glb +0 -0
  224. package/dist/assets/models/jupiter-c-tub.glb +0 -0
  225. package/dist/assets/models/tiangong-hub.glb +0 -0
  226. package/dist/assets/models/tiangong-mengtian-arrays.glb +0 -0
  227. package/dist/assets/models/tiangong-mengtian.glb +0 -0
  228. package/dist/assets/models/tiangong-shenzhou-forward.glb +0 -0
  229. package/dist/assets/models/tiangong-shenzhou-nadir.glb +0 -0
  230. package/dist/assets/models/tiangong-tianhe-arrays.glb +0 -0
  231. package/dist/assets/models/tiangong-tianhe.glb +0 -0
  232. package/dist/assets/models/tiangong-tianzhou.glb +0 -0
  233. package/dist/assets/models/tiangong-wentian-arrays.glb +0 -0
  234. package/dist/assets/models/tiangong-wentian.glb +0 -0
  235. package/dist/assets/tiangong-tiangong-apart.painted.svg +1 -0
  236. package/dist/assets/tiangong-tiangong-apart.svg +1 -0
  237. package/dist/assets/tiangong-tiangong-apart.thick.svg +1 -0
  238. package/dist/assets/tiangong-tiangong-hub.glb +0 -0
  239. package/dist/assets/tiangong-tiangong-hub.painted.svg +1 -0
  240. package/dist/assets/tiangong-tiangong-hub.svg +1 -0
  241. package/dist/assets/tiangong-tiangong-hub.thick.svg +1 -0
  242. package/dist/assets/tiangong-tiangong-mengtian-arrays.glb +0 -0
  243. package/dist/assets/tiangong-tiangong-mengtian-arrays.painted.svg +1 -0
  244. package/dist/assets/tiangong-tiangong-mengtian-arrays.svg +1 -0
  245. package/dist/assets/tiangong-tiangong-mengtian-arrays.thick.svg +1 -0
  246. package/dist/assets/tiangong-tiangong-mengtian.glb +0 -0
  247. package/dist/assets/tiangong-tiangong-mengtian.painted.svg +1 -0
  248. package/dist/assets/tiangong-tiangong-mengtian.svg +1 -0
  249. package/dist/assets/tiangong-tiangong-mengtian.thick.svg +1 -0
  250. package/dist/assets/tiangong-tiangong-shenzhou-forward.glb +0 -0
  251. package/dist/assets/tiangong-tiangong-shenzhou-forward.painted.svg +1 -0
  252. package/dist/assets/tiangong-tiangong-shenzhou-forward.svg +1 -0
  253. package/dist/assets/tiangong-tiangong-shenzhou-forward.thick.svg +1 -0
  254. package/dist/assets/tiangong-tiangong-shenzhou-nadir.glb +0 -0
  255. package/dist/assets/tiangong-tiangong-shenzhou-nadir.painted.svg +1 -0
  256. package/dist/assets/tiangong-tiangong-shenzhou-nadir.svg +1 -0
  257. package/dist/assets/tiangong-tiangong-shenzhou-nadir.thick.svg +1 -0
  258. package/dist/assets/tiangong-tiangong-tianhe-arrays.glb +0 -0
  259. package/dist/assets/tiangong-tiangong-tianhe-arrays.painted.svg +1 -0
  260. package/dist/assets/tiangong-tiangong-tianhe-arrays.svg +1 -0
  261. package/dist/assets/tiangong-tiangong-tianhe-arrays.thick.svg +1 -0
  262. package/dist/assets/tiangong-tiangong-tianhe.glb +0 -0
  263. package/dist/assets/tiangong-tiangong-tianhe.painted.svg +1 -0
  264. package/dist/assets/tiangong-tiangong-tianhe.svg +1 -0
  265. package/dist/assets/tiangong-tiangong-tianhe.thick.svg +1 -0
  266. package/dist/assets/tiangong-tiangong-tianzhou.glb +0 -0
  267. package/dist/assets/tiangong-tiangong-tianzhou.painted.svg +1 -0
  268. package/dist/assets/tiangong-tiangong-tianzhou.svg +1 -0
  269. package/dist/assets/tiangong-tiangong-tianzhou.thick.svg +1 -0
  270. package/dist/assets/tiangong-tiangong-wentian-arrays.glb +0 -0
  271. package/dist/assets/tiangong-tiangong-wentian-arrays.painted.svg +1 -0
  272. package/dist/assets/tiangong-tiangong-wentian-arrays.svg +1 -0
  273. package/dist/assets/tiangong-tiangong-wentian-arrays.thick.svg +1 -0
  274. package/dist/assets/tiangong-tiangong-wentian.glb +0 -0
  275. package/dist/assets/tiangong-tiangong-wentian.painted.svg +1 -0
  276. package/dist/assets/tiangong-tiangong-wentian.svg +1 -0
  277. package/dist/assets/tiangong-tiangong-wentian.thick.svg +1 -0
  278. package/dist/assets/tiangong-tiangong.glb +0 -0
  279. package/dist/assets/tiangong-tiangong.painted.svg +1 -0
  280. package/dist/assets/tiangong-tiangong.svg +1 -0
  281. package/dist/assets/tiangong-tiangong.thick.svg +1 -0
  282. package/dist/buildbar.js +22 -5
  283. package/dist/data/credits.d.ts +18 -1
  284. package/dist/data/credits.js +20 -3
  285. package/dist/data/hubble.js +16 -6
  286. package/dist/data/iss.js +52 -5
  287. package/dist/data/jupiterc.js +11 -6
  288. package/dist/data/makers.d.ts +1 -0
  289. package/dist/data/makers.js +2 -1
  290. package/dist/data/sources.d.ts +160 -0
  291. package/dist/data/sources.js +20 -0
  292. package/dist/data/tiangong.d.ts +12 -0
  293. package/dist/data/tiangong.js +54 -0
  294. package/dist/element/orbitWorld.d.ts +5 -0
  295. package/dist/element/orbitWorld.js +46 -1
  296. package/dist/element/probe.d.ts +15 -0
  297. package/dist/element/probe.js +46 -0
  298. package/dist/element/scene.d.ts +6 -0
  299. package/dist/element/scene.js +25 -11
  300. package/dist/element.d.ts +2 -0
  301. package/dist/element.js +27 -20
  302. package/dist/launches/data.d.ts +2 -0
  303. package/dist/launches/data.js +4 -0
  304. package/dist/launches/index.d.ts +318 -0
  305. package/dist/launches/index.js +249 -0
  306. package/dist/launches/links.d.ts +43 -0
  307. package/dist/launches/links.js +40 -0
  308. package/dist/launches/source.d.ts +20 -0
  309. package/dist/launches/source.js +22 -0
  310. package/dist/model/hubble.js +51 -17
  311. package/dist/model/iss.js +109 -23
  312. package/dist/model/jupiterc.js +29 -11
  313. package/dist/model/registry.js +4 -2
  314. package/dist/model/tiangong.d.ts +2 -0
  315. package/dist/model/tiangong.js +109 -0
  316. package/dist/parts.d.ts +1 -1
  317. package/dist/rockets.js +52 -3
  318. package/dist/thrusters.js +4 -4
  319. package/package.json +11 -1
  320. package/dist/assets/models/hubble-telescope.glb +0 -0
  321. package/dist/assets/models/iss-station.glb +0 -0
  322. package/dist/assets/models/jupiter-c-vehicle.glb +0 -0
@@ -0,0 +1,318 @@
1
+ export { LAUNCH_LOG_SOURCE } from "./source.ts";
2
+ export { LAUNCH_VEHICLE_LINKS } from "./links.ts";
3
+ export type { VehicleLink, VehicleMatch } from "./links.ts";
4
+ /**
5
+ * How a launch ended. `success` is GCAT's S, `failure` its F. `partial` is a launch GCAT scored between the two, such as an orbit that is usable but not the one aimed at (`score` says how well it went, from 1 to 99).
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { launchesByOutcome, type LaunchOutcome } from "@johnmorrisdotca/uchusen-rockets/launches";
10
+ *
11
+ * const outcome: LaunchOutcome = "partial";
12
+ * console.log(launchesByOutcome(outcome).length > 0);
13
+ * ```
14
+ */
15
+ export type LaunchOutcome = "success" | "partial" | "failure";
16
+ /**
17
+ * The kind of orbit a launch aimed at, as GCAT's launch profile code names it. A launch carries it only when it reached an orbit.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * import { ORBIT_KINDS, type OrbitKind } from "@johnmorrisdotca/uchusen-rockets/launches";
22
+ *
23
+ * const kind: OrbitKind = "GTO";
24
+ * console.log(ORBIT_KINDS[kind]);
25
+ * ```
26
+ */
27
+ export type OrbitKind = "LEO" | "SSO" | "ISS" | "LSS" | "MEO" | "MTO" | "MOL" | "HEO" | "GTO" | "STO" | "GEO" | "DSO" | "EEO";
28
+ /**
29
+ * What each orbit kind means, in GCAT's words shortened.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * import { ORBIT_KINDS } from "@johnmorrisdotca/uchusen-rockets/launches";
34
+ *
35
+ * console.log(Object.keys(ORBIT_KINDS).length);
36
+ * ```
37
+ */
38
+ export declare const ORBIT_KINDS: Readonly<Record<OrbitKind, string>>;
39
+ /**
40
+ * The orbit a launch reached. `kind` is what it aimed at; the numbers are the insertion orbit's, and each is there only where GCAT has it (about one launch in five has a perigee and an inclination).
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * import { launchByTag, type LaunchOrbit } from "@johnmorrisdotca/uchusen-rockets/launches";
45
+ *
46
+ * const orbit: LaunchOrbit | null | undefined = launchByTag("1969-059")?.orbit;
47
+ * console.log(orbit?.kind, orbit?.perigeeKm, orbit?.apogeeKm);
48
+ * ```
49
+ */
50
+ export interface LaunchOrbit {
51
+ readonly kind: OrbitKind;
52
+ /** Height of the insertion orbit's apogee above the surface, in km. For a launch on an escape trajectory (207 of them) it is 150000, GCAT's round figure for "leaves Earth", not a measurement. */
53
+ readonly apogeeKm?: number;
54
+ /** Height of its perigee, in km. It is negative (13 launches, Starship's flights among them) where the path GCAT gives dips below the surface, so the flight did not complete an orbit at that figure; it is not a height. */
55
+ readonly perigeeKm?: number;
56
+ /** Its inclination, in degrees. */
57
+ readonly inclinationDeg?: number;
58
+ }
59
+ /**
60
+ * One launch attempt.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * import { launchByTag, type Launch } from "@johnmorrisdotca/uchusen-rockets/launches";
65
+ *
66
+ * const launch: Launch | undefined = launchByTag("2018-017");
67
+ * console.log(launch?.utc, launch?.vehicle, launch?.payloads);
68
+ * ```
69
+ */
70
+ export interface Launch {
71
+ /** GCAT's launch tag: the international (COSPAR) designation of a launch that reached orbit ("1957 ALP", "2018-017"), or one GCAT made up for a failure ("1957-F01"). Unique. */
72
+ readonly tag: string;
73
+ /** The UTC date, `YYYY-MM-DD`. */
74
+ readonly date: string;
75
+ /** The UTC time, `HH:MM` or `HH:MM:SS`, or null where GCAT has none. */
76
+ readonly time: string | null;
77
+ /** The date and time in UTC as an ISO 8601 string, or just the date where there is no time. */
78
+ readonly utc: string;
79
+ /** The launch in milliseconds since 1970, in UTC (midnight where there is no time). */
80
+ readonly ms: number;
81
+ /** True where GCAT marks the date or time as uncertain. */
82
+ readonly approximate: boolean;
83
+ /** The vehicle's type name in GCAT, as `LAUNCH_VEHICLE_LINKS` and `launchesByVehicle` take it. */
84
+ readonly vehicle: string;
85
+ /** The vehicle's variant (an upper stage, a series), or null. */
86
+ readonly variant: string | null;
87
+ /** GCAT's name for the family the vehicle belongs to ("R-7", "Falcon9"), or null. */
88
+ readonly family: string | null;
89
+ /** The id of this package's rocket the vehicle is, or is a member of the family of, or null. See `LAUNCH_VEHICLE_LINKS`. */
90
+ readonly rocket: string | null;
91
+ /** The variant of that rocket that this vehicle is, where one is, or null. */
92
+ readonly rocketVariant: string | null;
93
+ /** The launch site: GCAT's code and its name ("NIIP-5", "Baikonur"). */
94
+ readonly site: {
95
+ readonly code: string;
96
+ readonly name: string;
97
+ };
98
+ /** The pad, as GCAT writes it ("LC1", "LC39A"), or null. */
99
+ readonly pad: string | null;
100
+ /** The organization that launched: GCAT's code and short name ("SPX", "SpaceX"). */
101
+ readonly agency: {
102
+ readonly code: string;
103
+ readonly name: string;
104
+ };
105
+ /** The country of that organization, as GCAT gives it ("SU", "USSR"), or null. */
106
+ readonly country: {
107
+ readonly code: string;
108
+ readonly name: string;
109
+ } | null;
110
+ /** GCAT's name for the flight or mission ("Apollo 11", "Tesla Roadster"), or null. */
111
+ readonly flight: string | null;
112
+ /** The names of the payloads, at most the first eight. */
113
+ readonly payloads: readonly string[];
114
+ /** How many payloads the launch carried in all; more than `payloads.length` for a launch of a constellation. */
115
+ readonly payloadCount: number;
116
+ readonly outcome: LaunchOutcome;
117
+ /** For a `partial` launch, GCAT's score from 1 (a tiny part of the job done) to 99 (nearly all of it); 75 and over is within GCAT's pass mark. Null otherwise. */
118
+ readonly score: number | null;
119
+ /** The orbit reached, or null for a launch that failed to reach one. */
120
+ readonly orbit: LaunchOrbit | null;
121
+ }
122
+ /**
123
+ * Every launch in the log, oldest first, each as a plain object. The first call parses the log; the rest return the same array. The array and every launch in it are frozen, because every caller shares them: copy a launch to change it.
124
+ *
125
+ * @returns Every orbital launch attempt in the log.
126
+ * @example
127
+ * ```ts
128
+ * import { launches } from "@johnmorrisdotca/uchusen-rockets/launches";
129
+ *
130
+ * const all = launches();
131
+ * console.log(all[0]?.date, all.length > 7000);
132
+ * ```
133
+ */
134
+ export declare function launches(): readonly Launch[];
135
+ /**
136
+ * One launch by its GCAT tag.
137
+ *
138
+ * @param tag A launch tag, such as "1957 ALP" or "2018-017".
139
+ * @returns The launch, or undefined where the log has none with that tag.
140
+ * @example
141
+ * ```ts
142
+ * import { launchByTag } from "@johnmorrisdotca/uchusen-rockets/launches";
143
+ *
144
+ * console.log(launchByTag("1957 ALP")?.site.name); // "Baikonur"
145
+ * ```
146
+ */
147
+ export declare function launchByTag(tag: string): Launch | undefined;
148
+ /**
149
+ * What to keep. Every field given must hold, so each one narrows the others. Names and codes match without regard to case.
150
+ *
151
+ * @example
152
+ * ```ts
153
+ * import { findLaunches, type LaunchFilter } from "@johnmorrisdotca/uchusen-rockets/launches";
154
+ *
155
+ * const filter: LaunchFilter = { rocket: "falcon-9", year: 2020, outcome: "success" };
156
+ * console.log(findLaunches(filter).length > 10);
157
+ * ```
158
+ */
159
+ export interface LaunchFilter {
160
+ /** A vehicle's type name in GCAT ("Falcon 9", "Soyuz-U"). */
161
+ vehicle?: string;
162
+ /** GCAT's name for a vehicle's family ("R-7"). */
163
+ family?: string;
164
+ /** The id of one of this package's rockets: every vehicle linked to it counts. */
165
+ rocket?: string;
166
+ /** A launch site's code or name ("NIIP-5", "Baikonur"): a name that several codes share holds for all of them. */
167
+ site?: string;
168
+ /** An organization's code or short name ("SPX", "SpaceX"). */
169
+ agency?: string;
170
+ /** A country's code or name ("SU", "USSR", "China"). */
171
+ country?: string;
172
+ /** A UTC year. */
173
+ year?: number;
174
+ /** The first day to keep, `YYYY-MM-DD`. */
175
+ from?: string;
176
+ /** The last day to keep, `YYYY-MM-DD`. */
177
+ to?: string;
178
+ outcome?: LaunchOutcome;
179
+ }
180
+ /**
181
+ * The launches that meet every field of a filter, oldest first.
182
+ *
183
+ * @param filter What to keep; none keeps all.
184
+ * @returns The matching launches.
185
+ * @example
186
+ * ```ts
187
+ * import { findLaunches } from "@johnmorrisdotca/uchusen-rockets/launches";
188
+ *
189
+ * const shuttle = findLaunches({ rocket: "space-shuttle", outcome: "failure" });
190
+ * console.log(shuttle.length); // 0
191
+ * ```
192
+ */
193
+ export declare function findLaunches(filter?: LaunchFilter): readonly Launch[];
194
+ /**
195
+ * Every launch of one vehicle, by GCAT's type name.
196
+ *
197
+ * @param vehicle A vehicle's type name, such as "Falcon 9" or "Soyuz-U".
198
+ * @returns Its launches, oldest first.
199
+ * @example
200
+ * ```ts
201
+ * import { launchesByVehicle } from "@johnmorrisdotca/uchusen-rockets/launches";
202
+ *
203
+ * console.log(launchesByVehicle("Saturn V").length); // 13
204
+ * ```
205
+ */
206
+ export declare function launchesByVehicle(vehicle: string): readonly Launch[];
207
+ /**
208
+ * Every launch from one site, by GCAT's code or its name.
209
+ *
210
+ * @param site A launch site, such as "Baikonur" or "KSC".
211
+ * @returns Its launches, oldest first.
212
+ * @example
213
+ * ```ts
214
+ * import { launchesBySite } from "@johnmorrisdotca/uchusen-rockets/launches";
215
+ *
216
+ * console.log(launchesBySite("Baikonur")[0]?.date); // "1957-10-04"
217
+ * ```
218
+ */
219
+ export declare function launchesBySite(site: string): readonly Launch[];
220
+ /**
221
+ * Every launch of one UTC year.
222
+ *
223
+ * @param year A year, such as 1969.
224
+ * @returns Its launches, oldest first.
225
+ * @example
226
+ * ```ts
227
+ * import { launchesByYear } from "@johnmorrisdotca/uchusen-rockets/launches";
228
+ *
229
+ * console.log(launchesByYear(1957).length); // 3
230
+ * ```
231
+ */
232
+ export declare function launchesByYear(year: number): readonly Launch[];
233
+ /**
234
+ * Every launch that ended one way.
235
+ *
236
+ * @param outcome `success`, `partial` or `failure`.
237
+ * @returns Those launches, oldest first.
238
+ * @example
239
+ * ```ts
240
+ * import { launchesByOutcome } from "@johnmorrisdotca/uchusen-rockets/launches";
241
+ *
242
+ * console.log(launchesByOutcome("failure")[0]?.tag); // "1957-F01"
243
+ * ```
244
+ */
245
+ export declare function launchesByOutcome(outcome: LaunchOutcome): readonly Launch[];
246
+ /**
247
+ * What a count can be grouped by.
248
+ *
249
+ * @example
250
+ * ```ts
251
+ * import { countLaunches, type LaunchGroup } from "@johnmorrisdotca/uchusen-rockets/launches";
252
+ *
253
+ * const by: LaunchGroup = "year";
254
+ * console.log(countLaunches(by, { rocket: "electron" })[0]);
255
+ * ```
256
+ */
257
+ export type LaunchGroup = "vehicle" | "family" | "rocket" | "site" | "agency" | "country" | "year" | "outcome" | "orbit";
258
+ /**
259
+ * One group of a count.
260
+ *
261
+ * @example
262
+ * ```ts
263
+ * import { countLaunches, type LaunchCount } from "@johnmorrisdotca/uchusen-rockets/launches";
264
+ *
265
+ * const top: LaunchCount | undefined = countLaunches("vehicle")[0];
266
+ * console.log(top?.key, top?.count);
267
+ * ```
268
+ */
269
+ export interface LaunchCount {
270
+ /** The group: a vehicle name, a site name, a year, an outcome and so on. */
271
+ key: string;
272
+ count: number;
273
+ }
274
+ /**
275
+ * Counts launches by a group, most first (oldest first for years). A launch with no value for the group, such as one with no linked rocket, is left out.
276
+ *
277
+ * @param by What to group by.
278
+ * @param filter What to count; none counts all.
279
+ * @returns The groups with their counts.
280
+ * @example
281
+ * ```ts
282
+ * import { countLaunches } from "@johnmorrisdotca/uchusen-rockets/launches";
283
+ *
284
+ * console.log(countLaunches("outcome").map((one) => one.key)); // ["success","failure","partial"]
285
+ * ```
286
+ */
287
+ export declare function countLaunches(by: LaunchGroup, filter?: LaunchFilter): readonly LaunchCount[];
288
+ /**
289
+ * How many launches there were, and how many of them ended each way.
290
+ *
291
+ * @example
292
+ * ```ts
293
+ * import { type LaunchTotals, launchTotals } from "@johnmorrisdotca/uchusen-rockets/launches";
294
+ *
295
+ * const totals: LaunchTotals = launchTotals({ year: 2020 });
296
+ * console.log(totals.total === totals.success + totals.partial + totals.failure); // true
297
+ * ```
298
+ */
299
+ export interface LaunchTotals {
300
+ total: number;
301
+ success: number;
302
+ partial: number;
303
+ failure: number;
304
+ }
305
+ /**
306
+ * The totals of the launches that meet a filter.
307
+ *
308
+ * @param filter What to count; none counts all.
309
+ * @returns The total and the count of each outcome.
310
+ * @example
311
+ * ```ts
312
+ * import { launchTotals } from "@johnmorrisdotca/uchusen-rockets/launches";
313
+ *
314
+ * const falcon = launchTotals({ rocket: "falcon-9" });
315
+ * console.log(falcon.total > 500);
316
+ * ```
317
+ */
318
+ export declare function launchTotals(filter?: LaunchFilter): LaunchTotals;
@@ -0,0 +1,249 @@
1
+ // The launch log: every orbital launch attempt since 1957, from GCAT (Jonathan McDowell, CC BY 4.0), with lookups and counts. Pure: no DOM, no clock, no dependency. The data is one packed string in ./data.ts, parsed on first use.
2
+ import { PACKED_LAUNCHES } from "./data.js";
3
+ import { LAUNCH_VEHICLE_LINKS } from "./links.js";
4
+ export { LAUNCH_LOG_SOURCE } from "./source.js";
5
+ export { LAUNCH_VEHICLE_LINKS } from "./links.js";
6
+ /**
7
+ * What each orbit kind means, in GCAT's words shortened.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { ORBIT_KINDS } from "@johnmorrisdotca/uchusen-rockets/launches";
12
+ *
13
+ * console.log(Object.keys(ORBIT_KINDS).length);
14
+ * ```
15
+ */
16
+ export const ORBIT_KINDS = {
17
+ LEO: "Low Earth orbit (other than sun-synchronous, space station and ISS)",
18
+ SSO: "Sun-synchronous orbit",
19
+ ISS: "The International Space Station",
20
+ LSS: "A low-orbit space station other than the ISS",
21
+ MEO: "Medium Earth orbit",
22
+ MTO: "Medium Earth orbit transfer, the payload circularizes it",
23
+ MOL: "Molniya orbit",
24
+ HEO: "Highly elliptical orbit (other than Molniya)",
25
+ GTO: "Geosynchronous transfer orbit",
26
+ STO: "Supersynchronous transfer orbit, apogee over 45,000 km",
27
+ GEO: "Direct insertion to geosynchronous orbit",
28
+ DSO: "Deep space orbit: Earth orbit with an apogee beyond 150,000 km",
29
+ EEO: "Earth escape orbit",
30
+ };
31
+ const OUTCOMES = { s: "success", p: "partial", f: "failure" };
32
+ const LINKS = new Map(LAUNCH_VEHICLE_LINKS.map((link) => [link.vehicle, link]));
33
+ let parsed;
34
+ function parse() {
35
+ const packed = JSON.parse(PACKED_LAUNCHES);
36
+ const countries = new Map(packed.countries);
37
+ const rows = packed.rows.map((row) => {
38
+ const [tag, date, time, v, variant, s, pad, a, outcome, score, o, apogee, perigee, inclination, flight, approximate, count, payloads] = row;
39
+ const vehicle = packed.vehicles[v];
40
+ const agency = packed.agencies[a];
41
+ const link = LINKS.get(vehicle[0]);
42
+ const orbitNumbers = { ...(apogee > 0 ? { apogeeKm: apogee } : {}), ...(perigee === null ? {} : { perigeeKm: perigee }), ...(inclination === null ? {} : { inclinationDeg: inclination }) };
43
+ return {
44
+ tag,
45
+ date,
46
+ time: time === "" ? null : time,
47
+ utc: time === "" ? date : `${date}T${time.length === 5 ? `${time}:00` : time}Z`,
48
+ ms: Date.parse(`${date}T${time === "" ? "00:00:00" : time.length === 5 ? `${time}:00` : time}Z`),
49
+ approximate: approximate === 1,
50
+ vehicle: vehicle[0],
51
+ variant,
52
+ family: vehicle[1] === "" ? null : vehicle[1],
53
+ rocket: link?.rocket ?? null,
54
+ rocketVariant: link?.variant ?? null,
55
+ site: { code: packed.sites[s][0], name: packed.sites[s][1] },
56
+ pad,
57
+ agency: { code: agency[0], name: agency[1] },
58
+ country: agency[2] === "" ? null : { code: agency[2], name: countries.get(agency[2]) ?? agency[2] },
59
+ flight,
60
+ payloads,
61
+ payloadCount: count,
62
+ outcome: OUTCOMES[outcome],
63
+ score: score === 0 ? null : score,
64
+ orbit: o < 0 ? null : Object.freeze({ kind: packed.orbits[o], ...orbitNumbers }),
65
+ };
66
+ });
67
+ return Object.freeze(rows.map(freezeLaunch));
68
+ }
69
+ /** Freezes a launch and the objects inside it: every caller reads the same rows, so one that wrote to a row would change them for all. */
70
+ function freezeLaunch(launch) {
71
+ Object.freeze(launch.site);
72
+ Object.freeze(launch.agency);
73
+ if (launch.country)
74
+ Object.freeze(launch.country);
75
+ Object.freeze(launch.payloads);
76
+ return Object.freeze(launch);
77
+ }
78
+ /**
79
+ * Every launch in the log, oldest first, each as a plain object. The first call parses the log; the rest return the same array. The array and every launch in it are frozen, because every caller shares them: copy a launch to change it.
80
+ *
81
+ * @returns Every orbital launch attempt in the log.
82
+ * @example
83
+ * ```ts
84
+ * import { launches } from "@johnmorrisdotca/uchusen-rockets/launches";
85
+ *
86
+ * const all = launches();
87
+ * console.log(all[0]?.date, all.length > 7000);
88
+ * ```
89
+ */
90
+ export function launches() {
91
+ parsed ??= parse();
92
+ return parsed;
93
+ }
94
+ /**
95
+ * One launch by its GCAT tag.
96
+ *
97
+ * @param tag A launch tag, such as "1957 ALP" or "2018-017".
98
+ * @returns The launch, or undefined where the log has none with that tag.
99
+ * @example
100
+ * ```ts
101
+ * import { launchByTag } from "@johnmorrisdotca/uchusen-rockets/launches";
102
+ *
103
+ * console.log(launchByTag("1957 ALP")?.site.name); // "Baikonur"
104
+ * ```
105
+ */
106
+ export function launchByTag(tag) {
107
+ return launches().find((launch) => launch.tag === tag);
108
+ }
109
+ const same = (a, b) => b !== undefined && b !== null && a.toLowerCase() === b.toLowerCase();
110
+ /**
111
+ * The launches that meet every field of a filter, oldest first.
112
+ *
113
+ * @param filter What to keep; none keeps all.
114
+ * @returns The matching launches.
115
+ * @example
116
+ * ```ts
117
+ * import { findLaunches } from "@johnmorrisdotca/uchusen-rockets/launches";
118
+ *
119
+ * const shuttle = findLaunches({ rocket: "space-shuttle", outcome: "failure" });
120
+ * console.log(shuttle.length); // 0
121
+ * ```
122
+ */
123
+ export function findLaunches(filter = {}) {
124
+ return launches().filter((launch) => (filter.vehicle === undefined || same(filter.vehicle, launch.vehicle)) &&
125
+ (filter.family === undefined || same(filter.family, launch.family)) &&
126
+ (filter.rocket === undefined || launch.rocket === filter.rocket) &&
127
+ (filter.site === undefined || same(filter.site, launch.site.code) || same(filter.site, launch.site.name)) &&
128
+ (filter.agency === undefined || same(filter.agency, launch.agency.code) || same(filter.agency, launch.agency.name)) &&
129
+ (filter.country === undefined || same(filter.country, launch.country?.code) || same(filter.country, launch.country?.name)) &&
130
+ (filter.year === undefined || launch.date.startsWith(`${String(filter.year).padStart(4, "0")}-`)) &&
131
+ (filter.from === undefined || launch.date >= filter.from) &&
132
+ (filter.to === undefined || launch.date <= filter.to) &&
133
+ (filter.outcome === undefined || launch.outcome === filter.outcome));
134
+ }
135
+ /**
136
+ * Every launch of one vehicle, by GCAT's type name.
137
+ *
138
+ * @param vehicle A vehicle's type name, such as "Falcon 9" or "Soyuz-U".
139
+ * @returns Its launches, oldest first.
140
+ * @example
141
+ * ```ts
142
+ * import { launchesByVehicle } from "@johnmorrisdotca/uchusen-rockets/launches";
143
+ *
144
+ * console.log(launchesByVehicle("Saturn V").length); // 13
145
+ * ```
146
+ */
147
+ export function launchesByVehicle(vehicle) {
148
+ return findLaunches({ vehicle });
149
+ }
150
+ /**
151
+ * Every launch from one site, by GCAT's code or its name.
152
+ *
153
+ * @param site A launch site, such as "Baikonur" or "KSC".
154
+ * @returns Its launches, oldest first.
155
+ * @example
156
+ * ```ts
157
+ * import { launchesBySite } from "@johnmorrisdotca/uchusen-rockets/launches";
158
+ *
159
+ * console.log(launchesBySite("Baikonur")[0]?.date); // "1957-10-04"
160
+ * ```
161
+ */
162
+ export function launchesBySite(site) {
163
+ return findLaunches({ site });
164
+ }
165
+ /**
166
+ * Every launch of one UTC year.
167
+ *
168
+ * @param year A year, such as 1969.
169
+ * @returns Its launches, oldest first.
170
+ * @example
171
+ * ```ts
172
+ * import { launchesByYear } from "@johnmorrisdotca/uchusen-rockets/launches";
173
+ *
174
+ * console.log(launchesByYear(1957).length); // 3
175
+ * ```
176
+ */
177
+ export function launchesByYear(year) {
178
+ return findLaunches({ year });
179
+ }
180
+ /**
181
+ * Every launch that ended one way.
182
+ *
183
+ * @param outcome `success`, `partial` or `failure`.
184
+ * @returns Those launches, oldest first.
185
+ * @example
186
+ * ```ts
187
+ * import { launchesByOutcome } from "@johnmorrisdotca/uchusen-rockets/launches";
188
+ *
189
+ * console.log(launchesByOutcome("failure")[0]?.tag); // "1957-F01"
190
+ * ```
191
+ */
192
+ export function launchesByOutcome(outcome) {
193
+ return findLaunches({ outcome });
194
+ }
195
+ const KEYS = {
196
+ vehicle: (launch) => launch.vehicle,
197
+ family: (launch) => launch.family,
198
+ rocket: (launch) => launch.rocket,
199
+ site: (launch) => launch.site.name,
200
+ agency: (launch) => launch.agency.name,
201
+ country: (launch) => launch.country?.name ?? null,
202
+ year: (launch) => launch.date.slice(0, 4),
203
+ outcome: (launch) => launch.outcome,
204
+ orbit: (launch) => launch.orbit?.kind ?? null,
205
+ };
206
+ /**
207
+ * Counts launches by a group, most first (oldest first for years). A launch with no value for the group, such as one with no linked rocket, is left out.
208
+ *
209
+ * @param by What to group by.
210
+ * @param filter What to count; none counts all.
211
+ * @returns The groups with their counts.
212
+ * @example
213
+ * ```ts
214
+ * import { countLaunches } from "@johnmorrisdotca/uchusen-rockets/launches";
215
+ *
216
+ * console.log(countLaunches("outcome").map((one) => one.key)); // ["success","failure","partial"]
217
+ * ```
218
+ */
219
+ export function countLaunches(by, filter = {}) {
220
+ const counts = new Map();
221
+ for (const launch of findLaunches(filter)) {
222
+ const key = KEYS[by](launch);
223
+ if (key !== null)
224
+ counts.set(key, (counts.get(key) ?? 0) + 1);
225
+ }
226
+ const list = [...counts].map(([key, count]) => ({ key, count }));
227
+ return by === "year" ? list.sort((a, b) => a.key.localeCompare(b.key)) : list.sort((a, b) => b.count - a.count || a.key.localeCompare(b.key));
228
+ }
229
+ /**
230
+ * The totals of the launches that meet a filter.
231
+ *
232
+ * @param filter What to count; none counts all.
233
+ * @returns The total and the count of each outcome.
234
+ * @example
235
+ * ```ts
236
+ * import { launchTotals } from "@johnmorrisdotca/uchusen-rockets/launches";
237
+ *
238
+ * const falcon = launchTotals({ rocket: "falcon-9" });
239
+ * console.log(falcon.total > 500);
240
+ * ```
241
+ */
242
+ export function launchTotals(filter = {}) {
243
+ const totals = { total: 0, success: 0, partial: 0, failure: 0 };
244
+ for (const launch of findLaunches(filter)) {
245
+ totals.total++;
246
+ totals[launch.outcome]++;
247
+ }
248
+ return totals;
249
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * How a GCAT vehicle relates to the rocket this package draws: `same` when it is the vehicle drawn, `family` when it is another member of the same named family (Soyuz-U beside the drawn Soyuz-2).
3
+ *
4
+ * @example
5
+ * ```ts
6
+ * import { LAUNCH_VEHICLE_LINKS, type VehicleMatch } from "@johnmorrisdotca/uchusen-rockets/launches";
7
+ *
8
+ * const match: VehicleMatch | undefined = LAUNCH_VEHICLE_LINKS[0]?.match;
9
+ * console.log(match);
10
+ * ```
11
+ */
12
+ export type VehicleMatch = "same" | "family";
13
+ /**
14
+ * One row of the table that links a GCAT launch vehicle to this package's rocket: GCAT's vehicle name as the log spells it, the rocket id, the variant id where one variant is the vehicle, and how close the two are.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * import { LAUNCH_VEHICLE_LINKS, type VehicleLink } from "@johnmorrisdotca/uchusen-rockets/launches";
19
+ *
20
+ * const falcon: VehicleLink | undefined = LAUNCH_VEHICLE_LINKS.find((link) => link.vehicle === "Falcon 9");
21
+ * console.log(falcon?.rocket);
22
+ * ```
23
+ */
24
+ export interface VehicleLink {
25
+ /** The vehicle's type name in GCAT, exactly as `Launch.vehicle` spells it. */
26
+ vehicle: string;
27
+ /** The id of the rocket in `ROCKETS`. */
28
+ rocket: string;
29
+ /** The id of the variant in `ROCKETS[rocket].variants`, only where one variant is this vehicle. */
30
+ variant?: string;
31
+ match: VehicleMatch;
32
+ }
33
+ /**
34
+ * The table that links the log's vehicle names to this package's rocket ids. A test holds that every row names a vehicle that flew, a rocket that is in `ROCKETS` and a variant that belongs to it.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * import { LAUNCH_VEHICLE_LINKS } from "@johnmorrisdotca/uchusen-rockets/launches";
39
+ *
40
+ * console.log(LAUNCH_VEHICLE_LINKS.filter((link) => link.rocket === "soyuz").map((link) => link.vehicle));
41
+ * ```
42
+ */
43
+ export declare const LAUNCH_VEHICLE_LINKS: readonly VehicleLink[];
@@ -0,0 +1,40 @@
1
+ // Which of GCAT's launch vehicles are rockets this package draws. GCAT names a vehicle by its type ("Soyuz-2-1A"); the package names it by a rocket id ("soyuz") and a variant id ("soyuz-2").
2
+ // Only a vehicle that is the one drawn, or a plain member of the family of the one drawn, is listed. Any other vehicle in the log has no link and its `rocket` is null.
3
+ const same = (vehicle, rocket, variant) => ({ vehicle, rocket, ...(variant === undefined ? {} : { variant }), match: "same" });
4
+ const family = (vehicle, rocket) => ({ vehicle, rocket, match: "family" });
5
+ /**
6
+ * The table that links the log's vehicle names to this package's rocket ids. A test holds that every row names a vehicle that flew, a rocket that is in `ROCKETS` and a variant that belongs to it.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { LAUNCH_VEHICLE_LINKS } from "@johnmorrisdotca/uchusen-rockets/launches";
11
+ *
12
+ * console.log(LAUNCH_VEHICLE_LINKS.filter((link) => link.rocket === "soyuz").map((link) => link.vehicle));
13
+ * ```
14
+ */
15
+ export const LAUNCH_VEHICLE_LINKS = [
16
+ same("Falcon 9", "falcon-9"),
17
+ same("Falcon Heavy", "falcon-heavy", "falcon-heavy"),
18
+ same("Falcon 1", "falcon-1", "falcon-1"),
19
+ same("Saturn V", "saturn-v", "saturn-v"),
20
+ same("Space Shuttle", "space-shuttle", "stack"),
21
+ same("SLS Block 1", "sls", "block-1"),
22
+ same("New Glenn 7x2", "new-glenn", "7x2"),
23
+ same("Electron", "electron", "electron"),
24
+ same("Jupiter C", "jupiter-c", "jupiter-c"),
25
+ same("Starship V2", "starship", "v2"),
26
+ same("Starship V3", "starship", "v3"),
27
+ family("Starship V1.0", "starship"),
28
+ same("Soyuz-2-1A", "soyuz", "soyuz-2"),
29
+ same("Soyuz-2-1B", "soyuz", "soyuz-2"),
30
+ family("Soyuz-2-1V", "soyuz"),
31
+ family("Soyuz-ST-A", "soyuz"),
32
+ family("Soyuz-ST-B", "soyuz"),
33
+ family("Soyuz-FG", "soyuz"),
34
+ family("Soyuz-U", "soyuz"),
35
+ family("Soyuz-U2", "soyuz"),
36
+ family("Soyuz-U-PVB", "soyuz"),
37
+ family("Soyuz 11A511", "soyuz"),
38
+ family("Soyuz 11A511L", "soyuz"),
39
+ family("Soyuz 11A511M", "soyuz"),
40
+ ];
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Where the log comes from: GCAT, its author, its licence and the exact credit to print where the log is used, with the release it was packed from and the day its files were last updated.
3
+ *
4
+ * @example
5
+ * ```ts
6
+ * import { LAUNCH_LOG_SOURCE } from "@johnmorrisdotca/uchusen-rockets/launches/source";
7
+ *
8
+ * console.log(LAUNCH_LOG_SOURCE.credit);
9
+ * ```
10
+ */
11
+ export declare const LAUNCH_LOG_SOURCE: {
12
+ readonly title: "GCAT: General Catalog of Artificial Space Objects";
13
+ readonly author: "Jonathan C. McDowell";
14
+ readonly url: "https://planet4589.org/space/gcat";
15
+ readonly licence: "CC BY 4.0";
16
+ readonly licenceUrl: "https://creativecommons.org/licenses/by/4.0/";
17
+ readonly credit: "Data from GCAT (J. McDowell, planet4589.org/space/gcat)";
18
+ readonly release: "1.8.9";
19
+ readonly updated: "2026-11-09";
20
+ };