ootk 3.0.0 → 4.0.0-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 (357) hide show
  1. package/CHANGELOG.md +235 -10
  2. package/README.md +27 -40
  3. package/dist/coordinate/Hill.d.ts +49 -0
  4. package/dist/coordinate/Hill.js +222 -0
  5. package/dist/coordinate/Hill.js.map +1 -0
  6. package/dist/coordinate/index.d.ts +1 -0
  7. package/dist/coordinate/index.js +2 -0
  8. package/dist/coordinate/index.js.map +1 -0
  9. package/dist/covariance/CovarianceSample.d.ts +43 -0
  10. package/dist/covariance/CovarianceSample.js +147 -0
  11. package/dist/covariance/CovarianceSample.js.map +1 -0
  12. package/dist/covariance/StateCovariance.d.ts +42 -0
  13. package/dist/covariance/StateCovariance.js +65 -0
  14. package/dist/covariance/StateCovariance.js.map +1 -0
  15. package/dist/force/AtmosphericDrag.d.ts +31 -0
  16. package/dist/force/AtmosphericDrag.js +73 -0
  17. package/dist/force/AtmosphericDrag.js.map +1 -0
  18. package/dist/force/EarthGravity.d.ts +27 -0
  19. package/dist/force/EarthGravity.js +117 -0
  20. package/dist/force/EarthGravity.js.map +1 -0
  21. package/{lib/ootk.d.ts → dist/force/Force.d.ts} +12 -11
  22. package/dist/force/Force.js +31 -0
  23. package/dist/force/Force.js.map +1 -0
  24. package/dist/force/ForceModel.d.ts +37 -0
  25. package/dist/force/ForceModel.js +75 -0
  26. package/dist/force/ForceModel.js.map +1 -0
  27. package/dist/force/Gravity.d.ts +38 -0
  28. package/dist/force/Gravity.js +47 -0
  29. package/dist/force/Gravity.js.map +1 -0
  30. package/dist/{ootk.d.ts → force/SolarRadiationPressure.d.ts} +12 -11
  31. package/dist/force/SolarRadiationPressure.js +44 -0
  32. package/dist/force/SolarRadiationPressure.js.map +1 -0
  33. package/dist/force/ThirdBodyGravity.d.ts +26 -0
  34. package/dist/force/ThirdBodyGravity.js +57 -0
  35. package/dist/force/ThirdBodyGravity.js.map +1 -0
  36. package/dist/force/Thrust.d.ts +34 -0
  37. package/dist/force/Thrust.js +58 -0
  38. package/dist/force/Thrust.js.map +1 -0
  39. package/dist/interfaces/RfSensorParams.d.ts +28 -0
  40. package/dist/interfaces/RfSensorParams.js +24 -0
  41. package/dist/interfaces/RfSensorParams.js.map +1 -0
  42. package/dist/interfaces/index.d.ts +1 -0
  43. package/dist/interfaces/index.js +2 -0
  44. package/dist/interfaces/index.js.map +1 -0
  45. package/dist/interpolator/ChebyshevCoefficients.d.ts +50 -0
  46. package/dist/interpolator/ChebyshevCoefficients.js +94 -0
  47. package/dist/interpolator/ChebyshevCoefficients.js.map +1 -0
  48. package/dist/interpolator/ChebyshevInterpolator.d.ts +38 -0
  49. package/dist/interpolator/ChebyshevInterpolator.js +71 -0
  50. package/dist/interpolator/ChebyshevInterpolator.js.map +1 -0
  51. package/dist/interpolator/CubicSpline.d.ts +35 -0
  52. package/dist/interpolator/CubicSpline.js +69 -0
  53. package/dist/interpolator/CubicSpline.js.map +1 -0
  54. package/dist/interpolator/CubicSplineInterpolator.d.ts +36 -0
  55. package/dist/interpolator/CubicSplineInterpolator.js +80 -0
  56. package/dist/interpolator/CubicSplineInterpolator.js.map +1 -0
  57. package/dist/interpolator/FieldInterpolator.d.ts +28 -0
  58. package/dist/interpolator/FieldInterpolator.js +34 -0
  59. package/dist/interpolator/FieldInterpolator.js.map +1 -0
  60. package/dist/interpolator/Interpolator.d.ts +22 -0
  61. package/dist/interpolator/Interpolator.js +47 -0
  62. package/dist/interpolator/Interpolator.js.map +1 -0
  63. package/dist/interpolator/LagrangeInterpolator.d.ts +40 -0
  64. package/dist/interpolator/LagrangeInterpolator.js +159 -0
  65. package/dist/interpolator/LagrangeInterpolator.js.map +1 -0
  66. package/dist/interpolator/StateInterpolator.d.ts +27 -0
  67. package/dist/interpolator/StateInterpolator.js +35 -0
  68. package/dist/interpolator/StateInterpolator.js.map +1 -0
  69. package/dist/interpolator/VerletBlendInterpolator.d.ts +43 -0
  70. package/dist/interpolator/VerletBlendInterpolator.js +118 -0
  71. package/dist/interpolator/VerletBlendInterpolator.js.map +1 -0
  72. package/{lib/ootk.js → dist/main.d.ts} +13 -10
  73. package/dist/{objects/space-object.d.ts → main.js} +17 -23
  74. package/dist/main.js.map +1 -0
  75. package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +41 -0
  76. package/dist/maneuver/TwoBurnOrbitTransfer.js +65 -0
  77. package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
  78. package/dist/maneuver/Waypoint.d.ts +91 -0
  79. package/dist/maneuver/Waypoint.js +179 -0
  80. package/dist/maneuver/Waypoint.js.map +1 -0
  81. package/{lib/objects/detailed-sat.d.ts → dist/objects/DetailedSatellite.d.ts} +40 -36
  82. package/dist/objects/DetailedSatellite.js +136 -0
  83. package/dist/objects/DetailedSatellite.js.map +1 -0
  84. package/dist/objects/DetailedSensor.d.ts +42 -0
  85. package/dist/objects/DetailedSensor.js +65 -0
  86. package/dist/objects/DetailedSensor.js.map +1 -0
  87. package/dist/objects/LandObject.d.ts +33 -0
  88. package/dist/objects/LandObject.js +34 -0
  89. package/dist/objects/LandObject.js.map +1 -0
  90. package/dist/objects/Marker.d.ts +20 -0
  91. package/dist/objects/Marker.js +24 -0
  92. package/dist/objects/Marker.js.map +1 -0
  93. package/dist/objects/RfSensor.d.ts +41 -0
  94. package/dist/objects/RfSensor.js +67 -0
  95. package/dist/objects/RfSensor.js.map +1 -0
  96. package/dist/objects/index.d.ts +5 -4
  97. package/dist/objects/index.js +6 -0
  98. package/dist/objects/index.js.map +1 -0
  99. package/dist/observation/Observation.d.ts +89 -0
  100. package/dist/observation/Observation.js +102 -0
  101. package/dist/observation/Observation.js.map +1 -0
  102. package/dist/observation/ObservationOptical.d.ts +48 -0
  103. package/dist/observation/ObservationOptical.js +105 -0
  104. package/dist/observation/ObservationOptical.js.map +1 -0
  105. package/dist/observation/ObservationRadar.d.ts +46 -0
  106. package/dist/observation/ObservationRadar.js +96 -0
  107. package/dist/observation/ObservationRadar.js.map +1 -0
  108. package/dist/observation/ObservationUtils.d.ts +20 -0
  109. package/dist/observation/ObservationUtils.js +32 -0
  110. package/dist/observation/ObservationUtils.js.map +1 -0
  111. package/dist/observation/PropagatorPairs.d.ts +32 -0
  112. package/dist/observation/PropagatorPairs.js +43 -0
  113. package/dist/observation/PropagatorPairs.js.map +1 -0
  114. package/dist/operations/BoxMuller.d.ts +46 -0
  115. package/dist/operations/BoxMuller.js +77 -0
  116. package/dist/operations/BoxMuller.js.map +1 -0
  117. package/dist/operations/EulerAngles.d.ts +105 -0
  118. package/dist/operations/EulerAngles.js +161 -0
  119. package/dist/operations/EulerAngles.js.map +1 -0
  120. package/dist/operations/Quaternion.d.ts +56 -0
  121. package/dist/operations/Quaternion.js +167 -0
  122. package/dist/operations/Quaternion.js.map +1 -0
  123. package/dist/operations/RandomGaussianSource.d.ts +24 -0
  124. package/dist/operations/RandomGaussianSource.js +43 -0
  125. package/dist/operations/RandomGaussianSource.js.map +1 -0
  126. package/dist/operations/index.d.ts +4 -0
  127. package/dist/operations/index.js +5 -0
  128. package/dist/operations/index.js.map +1 -0
  129. package/dist/optimize/ChebyshevCompressor.d.ts +32 -0
  130. package/dist/optimize/ChebyshevCompressor.js +83 -0
  131. package/dist/optimize/ChebyshevCompressor.js.map +1 -0
  132. package/dist/optimize/DownhillSimplex.d.ts +64 -0
  133. package/dist/optimize/DownhillSimplex.js +182 -0
  134. package/dist/optimize/DownhillSimplex.js.map +1 -0
  135. package/dist/optimize/GoldenSection.d.ts +39 -0
  136. package/dist/optimize/GoldenSection.js +55 -0
  137. package/dist/optimize/GoldenSection.js.map +1 -0
  138. package/dist/optimize/PolynomialRegression.d.ts +49 -0
  139. package/dist/optimize/PolynomialRegression.js +83 -0
  140. package/dist/optimize/PolynomialRegression.js.map +1 -0
  141. package/dist/optimize/PolynomicalRegressionResult.d.ts +31 -0
  142. package/dist/optimize/PolynomicalRegressionResult.js +38 -0
  143. package/dist/optimize/PolynomicalRegressionResult.js.map +1 -0
  144. package/dist/optimize/SimpleLinearRegression.d.ts +44 -0
  145. package/dist/optimize/SimpleLinearRegression.js +112 -0
  146. package/dist/optimize/SimpleLinearRegression.js.map +1 -0
  147. package/dist/optimize/SimplexEntry.d.ts +32 -0
  148. package/dist/optimize/SimplexEntry.js +42 -0
  149. package/dist/optimize/SimplexEntry.js.map +1 -0
  150. package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +65 -0
  151. package/dist/orbit_determination/BatchLeastSquaresOD.js +143 -0
  152. package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
  153. package/dist/orbit_determination/BatchLeastSquaresResult.d.ts +31 -0
  154. package/{lib/objects/space-object.d.ts → dist/orbit_determination/BatchLeastSquaresResult.js} +21 -23
  155. package/dist/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
  156. package/dist/orbit_determination/GibbsIOD.d.ts +38 -0
  157. package/dist/orbit_determination/GibbsIOD.js +76 -0
  158. package/dist/orbit_determination/GibbsIOD.js.map +1 -0
  159. package/dist/orbit_determination/GoodingIOD.d.ts +51 -0
  160. package/dist/orbit_determination/GoodingIOD.js +247 -0
  161. package/dist/orbit_determination/GoodingIOD.js.map +1 -0
  162. package/dist/orbit_determination/HerrickGibbsIOD.d.ts +33 -0
  163. package/dist/orbit_determination/HerrickGibbsIOD.js +50 -0
  164. package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -0
  165. package/dist/orbit_determination/LambertIOD.d.ts +59 -0
  166. package/dist/orbit_determination/LambertIOD.js +213 -0
  167. package/dist/orbit_determination/LambertIOD.js.map +1 -0
  168. package/dist/orbit_determination/ModifiedGoodingIOD.d.ts +40 -0
  169. package/dist/orbit_determination/ModifiedGoodingIOD.js +83 -0
  170. package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
  171. package/dist/propagator/DormandPrince54Propagator.d.ts +28 -0
  172. package/dist/propagator/DormandPrince54Propagator.js +64 -0
  173. package/dist/propagator/DormandPrince54Propagator.js.map +1 -0
  174. package/dist/propagator/KeplerPropagator.d.ts +35 -0
  175. package/dist/propagator/KeplerPropagator.js +84 -0
  176. package/dist/propagator/KeplerPropagator.js.map +1 -0
  177. package/dist/propagator/Propagator.d.ts +34 -0
  178. package/dist/propagator/Propagator.js +162 -0
  179. package/dist/propagator/Propagator.js.map +1 -0
  180. package/dist/propagator/RkCheckpoint.d.ts +22 -0
  181. package/dist/propagator/RkCheckpoint.js +27 -0
  182. package/dist/propagator/RkCheckpoint.js.map +1 -0
  183. package/dist/propagator/RkResult.d.ts +23 -0
  184. package/dist/propagator/RkResult.js +30 -0
  185. package/dist/propagator/RkResult.js.map +1 -0
  186. package/dist/propagator/RungeKutta4Propagator.d.ts +50 -0
  187. package/dist/propagator/RungeKutta4Propagator.js +141 -0
  188. package/dist/propagator/RungeKutta4Propagator.js.map +1 -0
  189. package/dist/propagator/RungeKutta89Propagator.d.ts +28 -0
  190. package/dist/propagator/RungeKutta89Propagator.js +126 -0
  191. package/dist/propagator/RungeKutta89Propagator.js.map +1 -0
  192. package/dist/propagator/RungeKuttaAdaptive.d.ts +54 -0
  193. package/dist/propagator/RungeKuttaAdaptive.js +159 -0
  194. package/dist/propagator/RungeKuttaAdaptive.js.map +1 -0
  195. package/dist/propagator/Sgp4Propagator.d.ts +34 -0
  196. package/dist/propagator/Sgp4Propagator.js +56 -0
  197. package/dist/propagator/Sgp4Propagator.js.map +1 -0
  198. package/dist/smoothing/ExponentialSmoothing.d.ts +23 -0
  199. package/dist/smoothing/ExponentialSmoothing.js +81 -0
  200. package/dist/smoothing/ExponentialSmoothing.js.map +1 -0
  201. package/dist/transforms/index.d.ts +1 -0
  202. package/dist/transforms/index.js +2 -0
  203. package/dist/transforms/index.js.map +1 -0
  204. package/dist/transforms/transforms.d.ts +56 -92
  205. package/dist/transforms/transforms.js +94 -0
  206. package/dist/transforms/transforms.js.map +1 -0
  207. package/dist/types/types.d.ts +105 -584
  208. package/dist/types/types.js +23 -0
  209. package/dist/types/types.js.map +1 -0
  210. package/dist/utils/index.d.ts +1 -0
  211. package/dist/utils/index.js +2 -0
  212. package/dist/utils/index.js.map +1 -0
  213. package/dist/utils/jacobian.d.ts +11 -0
  214. package/dist/utils/jacobian.js +29 -0
  215. package/dist/utils/jacobian.js.map +1 -0
  216. package/package.json +34 -42
  217. package/src/coordinate/Hill.ts +326 -0
  218. package/src/coordinate/index.ts +1 -0
  219. package/src/covariance/CovarianceSample.ts +194 -0
  220. package/src/covariance/StateCovariance.ts +69 -0
  221. package/src/force/AtmosphericDrag.ts +101 -0
  222. package/src/force/EarthGravity.ts +157 -0
  223. package/src/force/Force.ts +33 -0
  224. package/src/force/ForceModel.ts +91 -0
  225. package/src/force/Gravity.ts +53 -0
  226. package/src/force/SolarRadiationPressure.ts +42 -0
  227. package/src/force/ThirdBodyGravity.ts +62 -0
  228. package/src/force/Thrust.ts +83 -0
  229. package/src/interfaces/RfSensorParams.ts +30 -0
  230. package/src/interfaces/index.ts +1 -0
  231. package/src/interpolator/ChebyshevCoefficients.ts +109 -0
  232. package/src/interpolator/ChebyshevInterpolator.ts +87 -0
  233. package/src/interpolator/CubicSpline.ts +72 -0
  234. package/src/interpolator/CubicSplineInterpolator.ts +90 -0
  235. package/src/interpolator/FieldInterpolator.ts +37 -0
  236. package/src/interpolator/Interpolator.ts +56 -0
  237. package/src/interpolator/LagrangeInterpolator.ts +192 -0
  238. package/src/interpolator/StateInterpolator.ts +39 -0
  239. package/src/interpolator/VerletBlendInterpolator.ts +146 -0
  240. package/src/main.ts +32 -0
  241. package/src/maneuver/TwoBurnOrbitTransfer.ts +79 -0
  242. package/src/maneuver/Waypoint.ts +267 -0
  243. package/src/objects/DetailedSatellite.ts +159 -0
  244. package/src/objects/DetailedSensor.ts +68 -0
  245. package/src/objects/LandObject.ts +46 -0
  246. package/src/objects/Marker.ts +25 -0
  247. package/src/objects/RfSensor.ts +78 -0
  248. package/src/objects/index.ts +5 -0
  249. package/src/observation/Observation.ts +125 -0
  250. package/src/observation/ObservationOptical.ts +146 -0
  251. package/src/observation/ObservationRadar.ts +131 -0
  252. package/src/observation/ObservationUtils.ts +40 -0
  253. package/src/observation/PropagatorPairs.ts +45 -0
  254. package/src/operations/BoxMuller.ts +87 -0
  255. package/src/operations/EulerAngles.ts +183 -0
  256. package/src/operations/Quaternion.ts +222 -0
  257. package/src/operations/RandomGaussianSource.ts +51 -0
  258. package/src/operations/index.ts +4 -0
  259. package/src/optimize/ChebyshevCompressor.ts +96 -0
  260. package/src/optimize/DownhillSimplex.ts +212 -0
  261. package/src/optimize/GoldenSection.ts +71 -0
  262. package/src/optimize/PolynomialRegression.ts +109 -0
  263. package/src/optimize/PolynomicalRegressionResult.ts +32 -0
  264. package/src/optimize/SimpleLinearRegression.ts +127 -0
  265. package/src/optimize/SimplexEntry.ts +50 -0
  266. package/src/orbit_determination/BatchLeastSquaresOD.ts +174 -0
  267. package/src/orbit_determination/BatchLeastSquaresResult.ts +33 -0
  268. package/src/orbit_determination/GibbsIOD.ts +95 -0
  269. package/src/orbit_determination/GoodingIOD.ts +380 -0
  270. package/src/orbit_determination/HerrickGibbsIOD.ts +51 -0
  271. package/src/orbit_determination/LambertIOD.ts +260 -0
  272. package/src/orbit_determination/ModifiedGoodingIOD.ts +133 -0
  273. package/src/propagator/DormandPrince54Propagator.ts +73 -0
  274. package/src/propagator/KeplerPropagator.ts +102 -0
  275. package/src/propagator/Propagator.ts +253 -0
  276. package/src/propagator/RkCheckpoint.ts +25 -0
  277. package/src/propagator/RkResult.ts +26 -0
  278. package/src/propagator/RungeKutta4Propagator.ts +179 -0
  279. package/src/propagator/RungeKutta89Propagator.ts +132 -0
  280. package/src/propagator/RungeKuttaAdaptive.ts +232 -0
  281. package/src/propagator/Sgp4Propagator.ts +71 -0
  282. package/src/smoothing/ExponentialSmoothing.ts +90 -0
  283. package/src/transforms/index.ts +1 -0
  284. package/src/transforms/transforms.ts +117 -0
  285. package/src/types/types.ts +135 -0
  286. package/src/utils/index.ts +1 -0
  287. package/src/utils/jacobian.ts +38 -0
  288. package/.eslintrc.json +0 -244
  289. package/.prettierrc +0 -17
  290. package/babel.config.js +0 -16
  291. package/codecov.yml +0 -21
  292. package/dist/objects/base-object.d.ts +0 -40
  293. package/dist/objects/detailed-sat.d.ts +0 -66
  294. package/dist/objects/sat.d.ts +0 -92
  295. package/dist/objects/sensor.d.ts +0 -93
  296. package/dist/objects/star.d.ts +0 -46
  297. package/dist/ootk.js +0 -2
  298. package/dist/ootk.js.LICENSE.txt +0 -77
  299. package/dist/sgp4/sgp4.d.ts +0 -82
  300. package/dist/tle/tle-format-data.d.ts +0 -6
  301. package/dist/tle/tle.d.ts +0 -375
  302. package/dist/utils/constants.d.ts +0 -34
  303. package/dist/utils/moon-math.d.ts +0 -113
  304. package/dist/utils/sun-math.d.ts +0 -230
  305. package/dist/utils/utils.d.ts +0 -39
  306. package/jest.config.ts +0 -30
  307. package/lib/objects/base-object.d.ts +0 -40
  308. package/lib/objects/base-object.js +0 -79
  309. package/lib/objects/base-object.js.map +0 -1
  310. package/lib/objects/detailed-sat.js +0 -149
  311. package/lib/objects/detailed-sat.js.map +0 -1
  312. package/lib/objects/index.d.ts +0 -4
  313. package/lib/objects/index.js +0 -5
  314. package/lib/objects/index.js.map +0 -1
  315. package/lib/objects/sat.d.ts +0 -92
  316. package/lib/objects/sat.js +0 -188
  317. package/lib/objects/sat.js.map +0 -1
  318. package/lib/objects/sensor.d.ts +0 -93
  319. package/lib/objects/sensor.js +0 -273
  320. package/lib/objects/sensor.js.map +0 -1
  321. package/lib/objects/space-object.js +0 -60
  322. package/lib/objects/space-object.js.map +0 -1
  323. package/lib/objects/star.d.ts +0 -46
  324. package/lib/objects/star.js +0 -91
  325. package/lib/objects/star.js.map +0 -1
  326. package/lib/ootk.js.map +0 -1
  327. package/lib/sgp4/sgp4.d.ts +0 -82
  328. package/lib/sgp4/sgp4.js +0 -3262
  329. package/lib/sgp4/sgp4.js.map +0 -1
  330. package/lib/tle/tle-format-data.d.ts +0 -6
  331. package/lib/tle/tle-format-data.js +0 -10
  332. package/lib/tle/tle-format-data.js.map +0 -1
  333. package/lib/tle/tle.d.ts +0 -375
  334. package/lib/tle/tle.js +0 -611
  335. package/lib/tle/tle.js.map +0 -1
  336. package/lib/transforms/transforms.d.ts +0 -94
  337. package/lib/transforms/transforms.js +0 -308
  338. package/lib/transforms/transforms.js.map +0 -1
  339. package/lib/types/types.d.ts +0 -605
  340. package/lib/types/types.js +0 -36
  341. package/lib/types/types.js.map +0 -1
  342. package/lib/utils/constants.d.ts +0 -34
  343. package/lib/utils/constants.js +0 -35
  344. package/lib/utils/constants.js.map +0 -1
  345. package/lib/utils/moon-math.d.ts +0 -113
  346. package/lib/utils/moon-math.js +0 -387
  347. package/lib/utils/moon-math.js.map +0 -1
  348. package/lib/utils/sun-math.d.ts +0 -230
  349. package/lib/utils/sun-math.js +0 -422
  350. package/lib/utils/sun-math.js.map +0 -1
  351. package/lib/utils/utils.d.ts +0 -39
  352. package/lib/utils/utils.js +0 -102
  353. package/lib/utils/utils.js.map +0 -1
  354. package/sandbox.html +0 -8
  355. package/tsconfig.base.json +0 -31
  356. package/tsconfig.build.json +0 -14
  357. /package/{LICENSE.MD → LICENSE.md} +0 -0
@@ -1,230 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file SunMath is a collection of functions for calculating the position of the sun
7
- * and other stars. This was originally created by Vladimir Agafonkin. Robert Gester's
8
- * update was referenced for documentation. There were a couple of bugs in both versions
9
- * so there will be some differences if you are migrating from either to this library.
10
- *
11
- *
12
- * @license AGPL-3.0-or-later
13
- * @Copyright (c) 2020-2023 Theodore Kruczek
14
- *
15
- * @Copyright (c) 2011-2015, Vladimir Agafonkin
16
- * SunCalc is a JavaScript library for calculating sun/moon position and light phases.
17
- * https://github.com/mourner/suncalc
18
- *
19
- * Reworked and enhanced by Robert Gester
20
- * @Copyright (c) 2022 Robert Gester
21
- * https://github.com/hypnos3/suncalc3
22
- *
23
- * sun calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas
24
- *
25
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
26
- * terms of the GNU Affero General Public License as published by the Free Software
27
- * Foundation, either version 3 of the License, or (at your option) any later version.
28
- *
29
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
30
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31
- * See the GNU Affero General Public License for more details.
32
- *
33
- * You should have received a copy of the GNU Affero General Public License along with
34
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
35
- */
36
- import { Degrees, Radians } from '../ootk';
37
- import { AzEl, Meters, SunTime } from '../types/types';
38
- export declare class SunMath {
39
- private static readonly J0_;
40
- private static readonly J1970_;
41
- private static readonly J2000_;
42
- private static readonly e_;
43
- private static times_;
44
- /**
45
- * approx transit
46
- * @param {number} Ht - hourAngle
47
- * @param {number} lw - rad * -lng
48
- * @param {number} n - Julian cycle
49
- * @returns {number} approx transit
50
- */
51
- static approxTransit(Ht: number, lw: number, n: number): number;
52
- /**
53
- * get astro refraction
54
- * @param {Radians} h - elevation
55
- * @returns {number} refraction
56
- */
57
- static astroRefraction(h: Radians): Radians;
58
- /**
59
- * get azimuth
60
- * @param {number} H - siderealTime
61
- * @param {Radians} phi - latitude
62
- * @param {Radians} dec - The declination of the sun
63
- * @returns {Radians} azimuth in rad
64
- */
65
- static azimuth(H: number, phi: Radians, dec: Radians): Radians;
66
- /**
67
- * get number of days for a dateValue since 2000
68
- *
69
- * See: https://en.wikipedia.org/wiki/Epoch_(astronomy)
70
- *
71
- * @param {number} date date as timestamp to get days
72
- * @return {number} count of days
73
- */
74
- static date2jSince2000(date: Date): number;
75
- /**
76
- * get declination
77
- * @param {number} l - ecliptic longitude
78
- * @param {number} b - ecliptic latitude
79
- * @returns {number} declination
80
- */
81
- static declination(l: number, b: number): Radians;
82
- /**
83
- * ecliptic latitude
84
- * @param {number} B - ?
85
- * @returns {number} ecliptic latitude
86
- */
87
- static eclipticLatitude(B: number): number;
88
- /**
89
- * ecliptic longitude
90
- * @param {number} M - solar mean anomaly
91
- * @returns {number} ecliptic longitude
92
- */
93
- static eclipticLongitude(M: number): Radians;
94
- /**
95
- * get elevation (sometimes called altitude)
96
- * @param {number} H - siderealTime
97
- * @param {Radians} phi - latitude
98
- * @param {Radians} dec - The declination of the sun
99
- * @returns {Radians} elevation
100
- */
101
- static elevation(H: number, phi: Radians, dec: Radians): Radians;
102
- /**
103
- * returns set time for the given sun altitude
104
- * @param {number} h - heigh at 0
105
- * @param {number} lw - rad * -lng
106
- * @param {number} phi - rad * lat;
107
- * @param {number} dec - declination
108
- * @param {number} n - Julian cycle
109
- * @param {number} M - solar mean anomal
110
- * @param {number} L - ecliptic longitude
111
- * @returns {number} set time
112
- */
113
- static getSetJulian(h: Meters, lw: number, phi: number, dec: number, n: number, M: number, L: number): number;
114
- /**
115
- * Convert Date to Solar Date/Time
116
- *
117
- * Based on https://www.pveducation.org/pvcdrom/properties-of-sunlight/solar-time
118
- *
119
- * See: https://github.com/mourner/suncalc/pull/156
120
- *
121
- * @param {date} date - Date to calculate for
122
- * @param {number} utcOffset - UTC offset in hours
123
- * @param {Degrees} lon - Longitude in degrees
124
- * @returns {Date} - Date Object in Solar Time
125
- */
126
- static getSolarTime(date: Date, utcOffset: number, lon: number): Date;
127
- static getStarAzEl(date: Date, lat: Degrees, lon: Degrees, ra: Radians, dec: Radians): AzEl;
128
- static getSunAzEl(date: Date, lat: Degrees, lon: Degrees): AzEl;
129
- static getSunRaDec(d: number): {
130
- dec: Radians;
131
- ra: Radians;
132
- };
133
- /**
134
- * calculates time for a given azimuth angle for a given date and latitude/longitude
135
- * @param {number|Date} dateValue Date object or timestamp for calculating sun-time
136
- * @param {Degrees} lat latitude for calculating sun-time
137
- * @param {Degrees} lon longitude for calculating sun-time
138
- * @param {Radians | Degrees} az azimuth for calculating sun-time
139
- * @param {boolean} [isDegrees] true if the az angle is in degree and not in rad
140
- * @return {Date} result time of sun-time
141
- */
142
- static getSunTimeByAzimuth(dateValue: any, lat: Degrees, lon: Degrees, az: Radians | Degrees, isDegrees?: boolean): Date;
143
- /**
144
- * calculates sun times for a given date and latitude/longitude
145
- * @param {Date|number} dateVal Date object for calculating sun-times
146
- * @param {number} lat latitude for calculating sun-times
147
- * @param {number} lon longitude for calculating sun-times
148
- * @param {number} [alt=0] the observer height (in meters) relative to the horizon
149
- * @param {boolean} [isUtc=false] defines if the calculation should be in utc or local time (default is local)
150
- * @return {SunTime} result object of sunTime
151
- */
152
- static getTimes(dateVal: Date, lat: Degrees, lon: Degrees, alt?: Meters, isUtc?: boolean): SunTime;
153
- /**
154
- * hour angle
155
- * @param {number} h - heigh at 0
156
- * @param {number} phi - rad * lat;
157
- * @param {number} dec - declination
158
- * @returns {number} hour angle
159
- */
160
- static hourAngle(h: number, phi: number, dec: number): number;
161
- /**
162
- * convert Julian calendar to date object
163
- * @param {number} julian day number in Julian calendar to convert
164
- * @return {number} result date as timestamp
165
- */
166
- static julian2date(julian: number): Date;
167
- /**
168
- * Julian cycle
169
- * @param {number} d - number of days
170
- * @param {number} lw - rad * -lng;
171
- * @returns {number} julian cycle
172
- */
173
- static julianCyle(d: number, lw: number): number;
174
- /**
175
- * get right ascension
176
- * @param {number} l - ecliptic longitude
177
- * @param {number} b - ecliptic latitude
178
- * @returns {number} right ascension
179
- */
180
- static rightAscension(l: number, b: number): Radians;
181
- /**
182
- * side real time
183
- * @param {number} d - julian day
184
- * @param {Radians} lw - longitude of the observer
185
- * @returns {number} sidereal time
186
- */
187
- static siderealTime(d: number, lw: Radians): number;
188
- /**
189
- * solar transit in Julian
190
- * @param {number} ds - approxTransit
191
- * @param {number} M - solar mean anomal
192
- * @param {number} L - ecliptic longitude
193
- * @returns {number} solar transit in Julian
194
- */
195
- static solarTransitJulian(ds: number, M: number, L: number): number;
196
- private static calculateJnoon_;
197
- /**
198
- * get azimuth
199
- * @param {number} H - siderealTime
200
- * @param {Radians} phi - latitude
201
- * @param {Radians} dec - The declination of the sun
202
- * @returns {Radians} azimuth
203
- */
204
- private static getAzimuth_;
205
- /**
206
- * returns set time for the given sun altitude
207
- * @param {Meters} alt - altitude at 0
208
- * @param {Radians} lw - -lng
209
- * @param {Radians} phi - lat;
210
- * @param {Radians} dec - declination
211
- * @param {number} n - Julian cycle
212
- * @param {number} M - solar mean anomal
213
- * @param {number} L - ecliptic longitude
214
- * @return {J2000Value} sunset time in days since 2000
215
- */
216
- private static getSetJ_;
217
- private static julianCycle_;
218
- /**
219
- * calculates the obderver angle
220
- * @param {number} alt the observer altitude (in meters) relative to the horizon
221
- * @returns {Degrees} height for further calculations
222
- */
223
- private static observerAngle_;
224
- /**
225
- * get solar mean anomaly
226
- * @param {number} d - julian day
227
- * @returns {number} solar mean anomaly
228
- */
229
- private static solarMeanAnomaly_;
230
- }
@@ -1,422 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file SunMath is a collection of functions for calculating the position of the sun
7
- * and other stars. This was originally created by Vladimir Agafonkin. Robert Gester's
8
- * update was referenced for documentation. There were a couple of bugs in both versions
9
- * so there will be some differences if you are migrating from either to this library.
10
- *
11
- *
12
- * @license AGPL-3.0-or-later
13
- * @Copyright (c) 2020-2023 Theodore Kruczek
14
- *
15
- * @Copyright (c) 2011-2015, Vladimir Agafonkin
16
- * SunCalc is a JavaScript library for calculating sun/moon position and light phases.
17
- * https://github.com/mourner/suncalc
18
- *
19
- * Reworked and enhanced by Robert Gester
20
- * @Copyright (c) 2022 Robert Gester
21
- * https://github.com/hypnos3/suncalc3
22
- *
23
- * sun calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas
24
- *
25
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
26
- * terms of the GNU Affero General Public License as published by the Free Software
27
- * Foundation, either version 3 of the License, or (at your option) any later version.
28
- *
29
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
30
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31
- * See the GNU Affero General Public License for more details.
32
- *
33
- * You should have received a copy of the GNU Affero General Public License along with
34
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
35
- */
36
- import { DEG2RAD, MS_PER_DAY } from './constants';
37
- var TAU = Math.PI * 2; // https://tauday.com/tau-manifesto
38
- var SunMath = /** @class */ (function () {
39
- function SunMath() {
40
- }
41
- /**
42
- * approx transit
43
- * @param {number} Ht - hourAngle
44
- * @param {number} lw - rad * -lng
45
- * @param {number} n - Julian cycle
46
- * @returns {number} approx transit
47
- */
48
- SunMath.approxTransit = function (Ht, lw, n) {
49
- return SunMath.J0_ + (Ht + lw) / TAU + n;
50
- };
51
- /**
52
- * get astro refraction
53
- * @param {Radians} h - elevation
54
- * @returns {number} refraction
55
- */
56
- SunMath.astroRefraction = function (h) {
57
- if (h < 0) {
58
- h = 0;
59
- }
60
- return (0.0002967 / Math.tan(h + 0.00312536 / (h + 0.08901179)));
61
- };
62
- /**
63
- * get azimuth
64
- * @param {number} H - siderealTime
65
- * @param {Radians} phi - latitude
66
- * @param {Radians} dec - The declination of the sun
67
- * @returns {Radians} azimuth in rad
68
- */
69
- SunMath.azimuth = function (H, phi, dec) {
70
- return (Math.PI + Math.atan2(Math.sin(H), Math.cos(H) * Math.sin(phi) - Math.tan(dec) * Math.cos(phi)));
71
- };
72
- /**
73
- * get number of days for a dateValue since 2000
74
- *
75
- * See: https://en.wikipedia.org/wiki/Epoch_(astronomy)
76
- *
77
- * @param {number} date date as timestamp to get days
78
- * @return {number} count of days
79
- */
80
- SunMath.date2jSince2000 = function (date) {
81
- return date.getTime() / MS_PER_DAY + SunMath.J1970_ - SunMath.J2000_;
82
- };
83
- /**
84
- * get declination
85
- * @param {number} l - ecliptic longitude
86
- * @param {number} b - ecliptic latitude
87
- * @returns {number} declination
88
- */
89
- SunMath.declination = function (l, b) {
90
- return Math.asin(Math.sin(b) * Math.cos(SunMath.e_) + Math.cos(b) * Math.sin(SunMath.e_) * Math.sin(l));
91
- };
92
- /**
93
- * ecliptic latitude
94
- * @param {number} B - ?
95
- * @returns {number} ecliptic latitude
96
- */
97
- SunMath.eclipticLatitude = function (B) {
98
- var C = TAU / 360;
99
- var L = B - 0.00569 - 0.00478 * Math.sin(C * B);
100
- return TAU * (L + 0.0003 * Math.sin(C * 2 * L));
101
- };
102
- /**
103
- * ecliptic longitude
104
- * @param {number} M - solar mean anomaly
105
- * @returns {number} ecliptic longitude
106
- */
107
- SunMath.eclipticLongitude = function (M) {
108
- var C = DEG2RAD * (1.9148 * Math.sin(M) + 0.02 * Math.sin(2 * M) + 0.0003 * Math.sin(3 * M));
109
- var P = DEG2RAD * 102.9372; // perihelion of Earth
110
- return (M + C + P + Math.PI); // Sun's mean longitude
111
- };
112
- /**
113
- * get elevation (sometimes called altitude)
114
- * @param {number} H - siderealTime
115
- * @param {Radians} phi - latitude
116
- * @param {Radians} dec - The declination of the sun
117
- * @returns {Radians} elevation
118
- */
119
- SunMath.elevation = function (H, phi, dec) {
120
- return Math.asin(Math.sin(phi) * Math.sin(dec) + Math.cos(phi) * Math.cos(dec) * Math.cos(H));
121
- };
122
- /**
123
- * returns set time for the given sun altitude
124
- * @param {number} h - heigh at 0
125
- * @param {number} lw - rad * -lng
126
- * @param {number} phi - rad * lat;
127
- * @param {number} dec - declination
128
- * @param {number} n - Julian cycle
129
- * @param {number} M - solar mean anomal
130
- * @param {number} L - ecliptic longitude
131
- * @returns {number} set time
132
- */
133
- SunMath.getSetJulian = function (h, lw, phi, dec, n, M, L) {
134
- var w = SunMath.hourAngle(h, phi, dec);
135
- var a = SunMath.approxTransit(w, lw, n);
136
- return SunMath.solarTransitJulian(a, M, L);
137
- };
138
- /**
139
- * Convert Date to Solar Date/Time
140
- *
141
- * Based on https://www.pveducation.org/pvcdrom/properties-of-sunlight/solar-time
142
- *
143
- * See: https://github.com/mourner/suncalc/pull/156
144
- *
145
- * @param {date} date - Date to calculate for
146
- * @param {number} utcOffset - UTC offset in hours
147
- * @param {Degrees} lon - Longitude in degrees
148
- * @returns {Date} - Date Object in Solar Time
149
- */
150
- SunMath.getSolarTime = function (date, utcOffset, lon) {
151
- // calculate the day of year
152
- var start = new Date();
153
- start.setUTCFullYear(date.getUTCFullYear(), 0, 1);
154
- start.setUTCHours(0, 0, 0, 0);
155
- var diff = date.getTime() - start.getTime();
156
- var dayOfYear = Math.floor(diff / MS_PER_DAY);
157
- var b = (360 / 365) * (dayOfYear - 81) * DEG2RAD;
158
- var equationOfTime = 9.87 * Math.sin(2 * b) - 7.53 * Math.cos(b) - 1.5 * Math.sin(b);
159
- var localSolarTimeMeridian = 15 * utcOffset;
160
- var timeCorrection = equationOfTime + 4 * (lon - localSolarTimeMeridian);
161
- return new Date(date.getTime() + timeCorrection * 60 * 1000);
162
- };
163
- SunMath.getStarAzEl = function (date, lat, lon, ra, dec) {
164
- var lw = (-lon * DEG2RAD);
165
- var phi = (lat * DEG2RAD);
166
- var d = SunMath.date2jSince2000(date);
167
- var H = SunMath.siderealTime(d, lw) - ra;
168
- var el = SunMath.elevation(H, phi, dec);
169
- var az = SunMath.azimuth(H, phi, dec);
170
- el = (el + SunMath.astroRefraction(el)); // elevation correction for refraction
171
- return {
172
- az: az,
173
- el: el,
174
- };
175
- };
176
- SunMath.getSunAzEl = function (date, lat, lon) {
177
- var lw = (-lon * DEG2RAD);
178
- var phi = (lat * DEG2RAD);
179
- var d = SunMath.date2jSince2000(date);
180
- var c = SunMath.getSunRaDec(d);
181
- var H = SunMath.siderealTime(d, lw) - c.ra;
182
- return {
183
- az: SunMath.azimuth(H, phi, c.dec),
184
- el: SunMath.elevation(H, phi, c.dec),
185
- };
186
- };
187
- SunMath.getSunRaDec = function (d) {
188
- var M = SunMath.solarMeanAnomaly_(d);
189
- var L = SunMath.eclipticLongitude(M);
190
- return {
191
- dec: SunMath.declination(L, 0),
192
- ra: SunMath.rightAscension(L, 0),
193
- };
194
- };
195
- /**
196
- * calculates time for a given azimuth angle for a given date and latitude/longitude
197
- * @param {number|Date} dateValue Date object or timestamp for calculating sun-time
198
- * @param {Degrees} lat latitude for calculating sun-time
199
- * @param {Degrees} lon longitude for calculating sun-time
200
- * @param {Radians | Degrees} az azimuth for calculating sun-time
201
- * @param {boolean} [isDegrees] true if the az angle is in degree and not in rad
202
- * @return {Date} result time of sun-time
203
- */
204
- SunMath.getSunTimeByAzimuth = function (dateValue, lat, lon, az, isDegrees) {
205
- if (isDegrees === void 0) { isDegrees = false; }
206
- if (isNaN(az)) {
207
- throw new Error('azimuth missing');
208
- }
209
- if (isNaN(lat)) {
210
- throw new Error('latitude missing');
211
- }
212
- if (isNaN(lon)) {
213
- throw new Error('longitude missing');
214
- }
215
- if (isDegrees) {
216
- az = (az * DEG2RAD);
217
- }
218
- var date = new Date(dateValue);
219
- var lw = (DEG2RAD * -lon);
220
- var phi = (DEG2RAD * lat);
221
- var dateVal = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0).getTime();
222
- var addval = MS_PER_DAY; // / 2);
223
- dateVal += addval;
224
- while (addval > 200) {
225
- // let nazi = this.getPosition(dateVal, lat, lng).azimuth;
226
- var d = SunMath.date2jSince2000(new Date(dateVal));
227
- var c = SunMath.getSunRaDec(d);
228
- var H = SunMath.siderealTime(d, lw) - c.ra;
229
- var newAz = SunMath.getAzimuth_(H, phi, c.dec);
230
- addval /= 2;
231
- if (newAz < az) {
232
- dateVal += addval;
233
- }
234
- else {
235
- dateVal -= addval;
236
- }
237
- }
238
- return new Date(Math.floor(dateVal));
239
- };
240
- /**
241
- * calculates sun times for a given date and latitude/longitude
242
- * @param {Date|number} dateVal Date object for calculating sun-times
243
- * @param {number} lat latitude for calculating sun-times
244
- * @param {number} lon longitude for calculating sun-times
245
- * @param {number} [alt=0] the observer height (in meters) relative to the horizon
246
- * @param {boolean} [isUtc=false] defines if the calculation should be in utc or local time (default is local)
247
- * @return {SunTime} result object of sunTime
248
- */
249
- SunMath.getTimes = function (dateVal, lat, lon, alt, isUtc) {
250
- if (alt === void 0) { alt = 0; }
251
- if (isUtc === void 0) { isUtc = false; }
252
- if (isNaN(lat)) {
253
- throw new Error('latitude missing');
254
- }
255
- if (isNaN(lon)) {
256
- throw new Error('longitude missing');
257
- }
258
- var date = new Date(dateVal);
259
- if (isUtc) {
260
- date.setUTCHours(12, 0, 0, 0);
261
- }
262
- else {
263
- date.setHours(12, 0, 0, 0);
264
- }
265
- var i = 0;
266
- var len = 0;
267
- var time = [];
268
- var h0 = 0;
269
- var Jset = 0;
270
- var Jrise = 0;
271
- var _a = SunMath.calculateJnoon_(lon, lat, alt, date), Jnoon = _a.Jnoon, dh = _a.dh, lw = _a.lw, phi = _a.phi, dec = _a.dec, n = _a.n, M = _a.M, L = _a.L;
272
- // Determine when the sun is at its highest and lowest (darkest) points.
273
- var result = {
274
- solarNoon: SunMath.julian2date(Jnoon),
275
- nadir: SunMath.julian2date(Jnoon + 0.5), // https://github.com/mourner/suncalc/pull/125
276
- };
277
- // Add all other unique times using Jnoon as a reference
278
- for (i = 0, len = SunMath.times_.length; i < len; i += 1) {
279
- time = SunMath.times_[i];
280
- h0 = ((time[0] + dh) * DEG2RAD);
281
- Jset = SunMath.getSetJ_(h0, lw, phi, dec, n, M, L);
282
- Jrise = Jnoon - (Jset - Jnoon);
283
- result[time[1]] = SunMath.julian2date(Jrise);
284
- result[time[2]] = SunMath.julian2date(Jset);
285
- }
286
- return result;
287
- };
288
- /**
289
- * hour angle
290
- * @param {number} h - heigh at 0
291
- * @param {number} phi - rad * lat;
292
- * @param {number} dec - declination
293
- * @returns {number} hour angle
294
- */
295
- SunMath.hourAngle = function (h, phi, dec) {
296
- return Math.acos((Math.sin(h) - Math.sin(phi) * Math.sin(dec)) / (Math.cos(phi) * Math.cos(dec)));
297
- };
298
- /**
299
- * convert Julian calendar to date object
300
- * @param {number} julian day number in Julian calendar to convert
301
- * @return {number} result date as timestamp
302
- */
303
- SunMath.julian2date = function (julian) {
304
- return new Date((julian - SunMath.J1970_) * MS_PER_DAY);
305
- };
306
- /**
307
- * Julian cycle
308
- * @param {number} d - number of days
309
- * @param {number} lw - rad * -lng;
310
- * @returns {number} julian cycle
311
- */
312
- SunMath.julianCyle = function (d, lw) {
313
- return Math.round(d - SunMath.J0_ - lw / ((2 * TAU) / 2));
314
- };
315
- /**
316
- * get right ascension
317
- * @param {number} l - ecliptic longitude
318
- * @param {number} b - ecliptic latitude
319
- * @returns {number} right ascension
320
- */
321
- SunMath.rightAscension = function (l, b) {
322
- return Math.atan2(Math.sin(l) * Math.cos(SunMath.e_) - Math.tan(b) * Math.sin(SunMath.e_), Math.cos(l));
323
- };
324
- /**
325
- * side real time
326
- * @param {number} d - julian day
327
- * @param {Radians} lw - longitude of the observer
328
- * @returns {number} sidereal time
329
- */
330
- SunMath.siderealTime = function (d, lw) {
331
- return DEG2RAD * (280.16 + 360.9856235 * d) - lw;
332
- };
333
- /**
334
- * solar transit in Julian
335
- * @param {number} ds - approxTransit
336
- * @param {number} M - solar mean anomal
337
- * @param {number} L - ecliptic longitude
338
- * @returns {number} solar transit in Julian
339
- */
340
- SunMath.solarTransitJulian = function (ds, M, L) {
341
- return SunMath.J2000_ + ds + 0.0053 * Math.sin(M) - 0.0069 * Math.sin(2 * L);
342
- };
343
- SunMath.calculateJnoon_ = function (lon, lat, alt, date) {
344
- var lw = (DEG2RAD * -lon);
345
- var phi = (DEG2RAD * lat);
346
- var dh = SunMath.observerAngle_(alt);
347
- var d = SunMath.date2jSince2000(date);
348
- var n = SunMath.julianCycle_(d, lw);
349
- var ds = SunMath.approxTransit(0, lw, n);
350
- var M = SunMath.solarMeanAnomaly_(ds);
351
- var L = SunMath.eclipticLongitude(M);
352
- var dec = SunMath.declination(L, 0);
353
- var Jnoon = SunMath.solarTransitJulian(ds, M, L);
354
- return { Jnoon: Jnoon, dh: dh, lw: lw, phi: phi, dec: dec, n: n, M: M, L: L };
355
- };
356
- /**
357
- * get azimuth
358
- * @param {number} H - siderealTime
359
- * @param {Radians} phi - latitude
360
- * @param {Radians} dec - The declination of the sun
361
- * @returns {Radians} azimuth
362
- */
363
- SunMath.getAzimuth_ = function (H, phi, dec) {
364
- return Math.atan2(Math.sin(H), Math.cos(H) * Math.sin(phi) - Math.tan(dec) * Math.cos(phi)) + Math.PI;
365
- };
366
- /**
367
- * returns set time for the given sun altitude
368
- * @param {Meters} alt - altitude at 0
369
- * @param {Radians} lw - -lng
370
- * @param {Radians} phi - lat;
371
- * @param {Radians} dec - declination
372
- * @param {number} n - Julian cycle
373
- * @param {number} M - solar mean anomal
374
- * @param {number} L - ecliptic longitude
375
- * @return {J2000Value} sunset time in days since 2000
376
- */
377
- SunMath.getSetJ_ = function (alt, lw, phi, dec, n, M, L) {
378
- var w = SunMath.hourAngle(alt, phi, dec);
379
- var a = SunMath.approxTransit(w, lw, n);
380
- return SunMath.solarTransitJulian(a, M, L);
381
- };
382
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
383
- SunMath.julianCycle_ = function (d, lw) {
384
- var lonOffset = lw / TAU;
385
- return Math.round(d - SunMath.J0_ - lonOffset);
386
- };
387
- /**
388
- * calculates the obderver angle
389
- * @param {number} alt the observer altitude (in meters) relative to the horizon
390
- * @returns {Degrees} height for further calculations
391
- */
392
- SunMath.observerAngle_ = function (alt) {
393
- return ((-2.076 * Math.sqrt(alt)) / 60);
394
- };
395
- /**
396
- * get solar mean anomaly
397
- * @param {number} d - julian day
398
- * @returns {number} solar mean anomaly
399
- */
400
- SunMath.solarMeanAnomaly_ = function (d) {
401
- return DEG2RAD * (357.5291 + 0.98560028 * d);
402
- };
403
- SunMath.J0_ = 0.0009;
404
- SunMath.J1970_ = 2440587.5;
405
- SunMath.J2000_ = 2451545;
406
- SunMath.e_ = DEG2RAD * 23.4397;
407
- SunMath.times_ = [
408
- [6, 'goldenHourDawnEnd', 'goldenHourDuskStart'],
409
- [-0.3, 'sunriseEnd', 'sunsetStart'],
410
- [-0.833, 'sunriseStart', 'sunsetEnd'],
411
- [-1, 'goldenHourDawnStart', 'goldenHourDuskEnd'],
412
- [-4, 'blueHourDawnEnd', 'blueHourDuskStart'],
413
- [-6, 'civilDawn', 'civilDusk'],
414
- [-8, 'blueHourDawnStart', 'blueHourDuskEnd'],
415
- [-12, 'nauticalDawn', 'nauticalDusk'],
416
- [-15, 'amateurDawn', 'amateurDusk'],
417
- [-18, 'astronomicalDawn', 'astronomicalDusk'], // ASTRO_DAWN
418
- ];
419
- return SunMath;
420
- }());
421
- export { SunMath };
422
- //# sourceMappingURL=sun-math.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sun-math.js","sourceRoot":"","sources":["../../src/utils/sun-math.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAMH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGlD,IAAM,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,mCAAmC;AAE5D;IAAA;IAybA,CAAC;IAtaC;;;;;;OAMG;IACI,qBAAa,GAApB,UAAqB,EAAU,EAAE,EAAU,EAAE,CAAS;QACpD,OAAO,OAAO,CAAC,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACI,uBAAe,GAAtB,UAAuB,CAAU;QAC/B,IAAI,CAAC,GAAG,CAAC,EAAE;YACT,CAAC,GAAY,CAAC,CAAC;SAChB;QAED,OAAgB,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;OAMG;IACI,eAAO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