From 90bdd3eff917e58c1813bff597d933891fe5645b Mon Sep 17 00:00:00 2001 From: Theodore Kruczek Date: Mon, 15 Jan 2024 12:44:01 -0500 Subject: [PATCH] docs: :page_facing_up: update copyright/license documentation --- src/body/NutationAngles.ts | 51 ++++---- src/body/PrecessionAngles.ts | 27 +++- src/body/index.ts | 23 ++++ src/coordinate/index.ts | 23 ++++ src/data/values/Egm96Data.ts | 23 ++++ src/data/values/HpAtmosphereData.ts | 23 ++++ src/data/values/HpAtmosphereResult.ts | 23 ++++ src/data/values/Iau1980Data.ts | 23 ++++ src/data/values/LeapSecond.ts | 23 ++++ src/data/values/egm96.ts | 23 ++++ src/data/values/hpAtmosphere.ts | 23 ++++ src/data/values/iau1980.ts | 23 ++++ src/enums/AngularDiameterMethod.ts | 23 +++- src/enums/AngularDistanceMethod.ts | 23 +++- src/enums/OrbitRegime.ts | 23 ++++ src/enums/PassType.ts | 23 ++++ src/enums/Sgp4OpsMode.ts | 23 ++++ src/enums/index.ts | 23 ++++ src/interfaces/BaseObjectParams.ts | 24 +++- src/interfaces/ClassicalElementsParams.ts | 23 ++++ src/interfaces/EquinoctialElementsParams.ts | 27 +++- src/interfaces/GroundPositionParams.ts | 24 +++- src/main.ts | 2 +- src/objects/GroundObject.ts | 3 +- src/objects/RadarSensor.ts | 23 ++++ src/objects/index.ts | 23 ++++ src/observation/ObservationUtils.ts | 23 ++++ src/observation/index.ts | 23 ++++ src/operations/Vector3D.ts | 23 ++++ src/operations/operations.ts | 23 ++++ src/sgp4/index.ts | 23 ++++ src/sgp4/sgp4.LICENSE.md | 132 ++++++++++++++++++++ src/sgp4/sgp4.ts | 2 + src/time/Epoch.ts | 23 ++++ src/time/EpochGPS.ts | 23 ++++ src/time/EpochTAI.ts | 27 +++- src/time/EpochTDB.ts | 27 +++- src/time/EpochTT.ts | 27 +++- src/time/EpochUTC.ts | 23 ++++ src/time/EpochWindow.ts | 23 ++++ src/time/TimeStamped.ts | 23 ++++ src/time/index.ts | 31 +++++ src/time/time.ts | 8 -- src/transforms/TransformCache.ts | 23 ++++ src/transforms/conversions.ts | 23 ++++ src/transforms/index.ts | 23 ++++ src/types/types.ts | 23 ++++ test/utils/functions.test.ts | 13 ++ 48 files changed, 1134 insertions(+), 50 deletions(-) create mode 100644 src/sgp4/sgp4.LICENSE.md create mode 100644 src/time/index.ts delete mode 100644 src/time/time.ts diff --git a/src/body/NutationAngles.ts b/src/body/NutationAngles.ts index e03a4af..c6945e8 100644 --- a/src/body/NutationAngles.ts +++ b/src/body/NutationAngles.ts @@ -1,31 +1,40 @@ -import { Radians } from '../main'; - /** - * Represents the nutation angles. + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ + +import { Radians } from '../main'; + +/** Represents the nutation angles. */ export type NutationAngles = { - /** - * The nutation in longitude (Δψ) in radians. - */ + /** The nutation in longitude (Δψ) in radians. */ dPsi: Radians; - /** - * The nutation in obliquity (Δε) in radians. - */ + /** The nutation in obliquity (Δε) in radians. */ dEps: Radians; - /** - * The mean obliquity of the ecliptic (ε₀) in radians. - */ + /** The mean obliquity of the ecliptic (ε₀) in radians. */ mEps: Radians; - /** - * The true obliquity of the ecliptic (ε) in radians. - */ + /** The true obliquity of the ecliptic (ε) in radians. */ eps: Radians; - /** - * The equation of the equinoxes (ΔΔt) in radians. - */ + /** The equation of the equinoxes (ΔΔt) in radians. */ eqEq: Radians; - /** - * The Greenwich Apparent Sidereal Time (GAST) in radians. - */ + /** The Greenwich Apparent Sidereal Time (GAST) in radians. */ gast: Radians; }; diff --git a/src/body/PrecessionAngles.ts b/src/body/PrecessionAngles.ts index 14a2f0f..30da9aa 100644 --- a/src/body/PrecessionAngles.ts +++ b/src/body/PrecessionAngles.ts @@ -1,8 +1,29 @@ -import { Radians } from '../main'; - /** - * Represents the precession angles in radians. + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ + +import { Radians } from '../main'; + +/** Represents the precession angles in radians. */ export type PrecessionAngles = { zeta: Radians; theta: Radians; diff --git a/src/body/index.ts b/src/body/index.ts index c9c55dc..fd83cff 100644 --- a/src/body/index.ts +++ b/src/body/index.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export { Celestial } from './Celestial'; export { Earth } from './Earth'; export { Moon } from './Moon'; diff --git a/src/coordinate/index.ts b/src/coordinate/index.ts index 22fbae7..99a7669 100644 --- a/src/coordinate/index.ts +++ b/src/coordinate/index.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export * from './ClassicalElements'; export * from './EquinoctialElements'; export * from './FormatTle'; diff --git a/src/data/values/Egm96Data.ts b/src/data/values/Egm96Data.ts index a98bba9..0c5c6a0 100644 --- a/src/data/values/Egm96Data.ts +++ b/src/data/values/Egm96Data.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { factorial } from '../../utils/functions'; import { egm96 } from './egm96'; diff --git a/src/data/values/HpAtmosphereData.ts b/src/data/values/HpAtmosphereData.ts index 5757d2a..ccd8b78 100644 --- a/src/data/values/HpAtmosphereData.ts +++ b/src/data/values/HpAtmosphereData.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { hpAtmosphere } from './hpAtmosphere'; import { HpAtmosphereResult } from './HpAtmosphereResult'; diff --git a/src/data/values/HpAtmosphereResult.ts b/src/data/values/HpAtmosphereResult.ts index 79c4d28..91a3bb2 100644 --- a/src/data/values/HpAtmosphereResult.ts +++ b/src/data/values/HpAtmosphereResult.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { HpAtmosphereEntry } from './HpAtmosphereData'; // / Harris-Priester atmospheric density bracket. diff --git a/src/data/values/Iau1980Data.ts b/src/data/values/Iau1980Data.ts index 49ea018..8157db9 100644 --- a/src/data/values/Iau1980Data.ts +++ b/src/data/values/Iau1980Data.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { iau1980 } from './iau1980'; // / IAU a1, a2, a3, a4, a5, Ai, Bi, Ci, Di coefficients. diff --git a/src/data/values/LeapSecond.ts b/src/data/values/LeapSecond.ts index f1dde99..ddf6b42 100644 --- a/src/data/values/LeapSecond.ts +++ b/src/data/values/LeapSecond.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + // / Leap second data. export class LeapSecond { // / Julian date. diff --git a/src/data/values/egm96.ts b/src/data/values/egm96.ts index db6ed70..51cfc03 100644 --- a/src/data/values/egm96.ts +++ b/src/data/values/egm96.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Egm96Entry } from './Egm96Data'; // / The first degree 36 EGM-96 normalized coefficients. diff --git a/src/data/values/hpAtmosphere.ts b/src/data/values/hpAtmosphere.ts index a5e1551..e453807 100644 --- a/src/data/values/hpAtmosphere.ts +++ b/src/data/values/hpAtmosphere.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { HpAtmosphereEntry } from './HpAtmosphereData'; // / Harris-Priester atmosphere data, assuming mean solar flux. diff --git a/src/data/values/iau1980.ts b/src/data/values/iau1980.ts index bdbe6de..670d56a 100644 --- a/src/data/values/iau1980.ts +++ b/src/data/values/iau1980.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Iau1980Entry } from './Iau1980Data'; // / Array of the first 4 IAU-1980 coefficients. diff --git a/src/enums/AngularDiameterMethod.ts b/src/enums/AngularDiameterMethod.ts index 20de3ca..bcb2c4c 100644 --- a/src/enums/AngularDiameterMethod.ts +++ b/src/enums/AngularDiameterMethod.ts @@ -1,6 +1,27 @@ /** - * Enumeration representing different methods for calculating angular diameter. + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ + +/** Enumeration representing different methods for calculating angular diameter. */ export enum AngularDiameterMethod { Circle, Sphere, diff --git a/src/enums/AngularDistanceMethod.ts b/src/enums/AngularDistanceMethod.ts index b4ece11..ddb2e4c 100644 --- a/src/enums/AngularDistanceMethod.ts +++ b/src/enums/AngularDistanceMethod.ts @@ -1,6 +1,27 @@ /** - * Enumeration representing different methods for calculating angular distance. + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ + +/** Enumeration representing different methods for calculating angular distance. */ export enum AngularDistanceMethod { Cosine, Haversine, diff --git a/src/enums/OrbitRegime.ts b/src/enums/OrbitRegime.ts index df7046a..d3186e6 100644 --- a/src/enums/OrbitRegime.ts +++ b/src/enums/OrbitRegime.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + /** Orbit regime classifications. */ export enum OrbitRegime { LEO = 'Low Earth Orbit', diff --git a/src/enums/PassType.ts b/src/enums/PassType.ts index afe5850..506adeb 100644 --- a/src/enums/PassType.ts +++ b/src/enums/PassType.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export enum PassType { OUT_OF_VIEW = -1, ENTER = 0, diff --git a/src/enums/Sgp4OpsMode.ts b/src/enums/Sgp4OpsMode.ts index 7f288e4..fe970f6 100644 --- a/src/enums/Sgp4OpsMode.ts +++ b/src/enums/Sgp4OpsMode.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export enum Sgp4OpsMode { AFSPC = 'a', IMPROVED = 'i', diff --git a/src/enums/index.ts b/src/enums/index.ts index c5ccb1b..0ad2033 100644 --- a/src/enums/index.ts +++ b/src/enums/index.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export { AngularDiameterMethod } from './AngularDiameterMethod'; export { AngularDistanceMethod } from './AngularDistanceMethod'; export { PassType } from './PassType'; diff --git a/src/interfaces/BaseObjectParams.ts b/src/interfaces/BaseObjectParams.ts index 3e53501..f4cf82f 100644 --- a/src/interfaces/BaseObjectParams.ts +++ b/src/interfaces/BaseObjectParams.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { EciVec3, SpaceObjectType } from '../types/types'; export interface BaseObjectParams { @@ -6,6 +29,5 @@ export interface BaseObjectParams { type?: SpaceObjectType; position?: EciVec3; velocity?: EciVec3; - time?: Date; active?: boolean; } diff --git a/src/interfaces/ClassicalElementsParams.ts b/src/interfaces/ClassicalElementsParams.ts index 2bc157f..095a8a4 100644 --- a/src/interfaces/ClassicalElementsParams.ts +++ b/src/interfaces/ClassicalElementsParams.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Kilometers, Radians } from 'src/main'; import { EpochUTC } from '../time/EpochUTC'; diff --git a/src/interfaces/EquinoctialElementsParams.ts b/src/interfaces/EquinoctialElementsParams.ts index a061919..d1597b9 100644 --- a/src/interfaces/EquinoctialElementsParams.ts +++ b/src/interfaces/EquinoctialElementsParams.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Kilometers, Radians } from 'src/main'; import { EpochUTC } from '../time/EpochUTC'; @@ -10,8 +33,6 @@ export interface EquinoctialElementsParams { p: number; q: number; mu?: number; - /** - * Retrograde factor. 1 for prograde orbits, -1 for retrograde orbits. - */ + /** Retrograde factor. 1 for prograde orbits, -1 for retrograde orbits. */ I?: 1 | -1; } diff --git a/src/interfaces/GroundPositionParams.ts b/src/interfaces/GroundPositionParams.ts index 660bfa3..d36b354 100644 --- a/src/interfaces/GroundPositionParams.ts +++ b/src/interfaces/GroundPositionParams.ts @@ -1,7 +1,29 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Degrees, Kilometers } from '../types/types'; export interface GroundPositionParams { - name?: string; lat: Degrees; lon: Degrees; alt: Kilometers; diff --git a/src/main.ts b/src/main.ts index 2d976ea..dd9c64b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -29,7 +29,7 @@ export * from './enums'; export * from './types/types'; export * from './interfaces'; -export * from './time/time'; +export * from './time'; export * from './transforms'; export * from './utils'; export * from './operations/operations'; diff --git a/src/objects/GroundObject.ts b/src/objects/GroundObject.ts index 78c188b..0663266 100644 --- a/src/objects/GroundObject.ts +++ b/src/objects/GroundObject.ts @@ -35,6 +35,7 @@ import { llaRad2ecf, DEG2RAD, Geodetic, + BaseObjectParams, } from '../main'; import { BaseObject } from './BaseObject'; @@ -46,7 +47,7 @@ export class GroundObject extends BaseObject { lon: Degrees; alt: Kilometers; - constructor(info: GroundPositionParams) { + constructor(info: GroundPositionParams & BaseObjectParams) { super(info); this.validateGroundObjectInputData_(info); diff --git a/src/objects/RadarSensor.ts b/src/objects/RadarSensor.ts index 435ffd3..9d33df9 100644 --- a/src/objects/RadarSensor.ts +++ b/src/objects/RadarSensor.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Sensor } from '.'; import { Radians } from '../types/types'; diff --git a/src/objects/index.ts b/src/objects/index.ts index 2242d0c..a72fc73 100644 --- a/src/objects/index.ts +++ b/src/objects/index.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export { BaseObject } from './BaseObject'; export type { RadarSensor } from './RadarSensor'; export { GroundObject } from './GroundObject'; diff --git a/src/observation/ObservationUtils.ts b/src/observation/ObservationUtils.ts index ee639ba..8896e04 100644 --- a/src/observation/ObservationUtils.ts +++ b/src/observation/ObservationUtils.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Vector3D } from '../operations/Vector3D'; export const radecToPosition = (ra: number, dec: number, r: number): Vector3D => { diff --git a/src/observation/index.ts b/src/observation/index.ts index 871b745..89b90fd 100644 --- a/src/observation/index.ts +++ b/src/observation/index.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export * from './ObservationUtils'; export { RadecGeocentric } from './RadecGeocentric'; export { RadecTopocentric } from './RadecTopocentric'; diff --git a/src/operations/Vector3D.ts b/src/operations/Vector3D.ts index cd8f4d1..5431b2e 100644 --- a/src/operations/Vector3D.ts +++ b/src/operations/Vector3D.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Kilometers, Radians, linearDistance } from '../main'; import { Matrix } from './Matrix'; import { Vector } from './Vector'; diff --git a/src/operations/operations.ts b/src/operations/operations.ts index a8616ee..87ed204 100644 --- a/src/operations/operations.ts +++ b/src/operations/operations.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export { Matrix } from './Matrix'; export { Random } from './Random'; export { Vector } from './Vector'; diff --git a/src/sgp4/index.ts b/src/sgp4/index.ts index b54dc44..2cbfcd1 100644 --- a/src/sgp4/index.ts +++ b/src/sgp4/index.ts @@ -1 +1,24 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export { Sgp4 } from './sgp4'; diff --git a/src/sgp4/sgp4.LICENSE.md b/src/sgp4/sgp4.LICENSE.md new file mode 100644 index 0000000..87c5155 --- /dev/null +++ b/src/sgp4/sgp4.LICENSE.md @@ -0,0 +1,132 @@ +AIR FORCE SPACE COMMAND (AFSPC) OPEN SOURCE AGREEMENT for SGP4 - (Simplified General Perturbations #4) + +THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, REPRODUCTION, DISTRIBUTION, MODIFICATION AND +REDISTRIBUTION OF CERTAIN COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS REPRESENTED BY THE +GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, +IS AN INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. +ANYONE WHO USES, REPRODUCES, DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED HEREIN, OR ANY PART + THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +The intended purpose of the SGP4 propagator is to properly propagate an object's Two Line Element Set (TLE) supplied by +the USSTRATCOM'S Joint Functional Component Command for SPACE Joint Space Operations Center (JSpOC) such that the +positions calculated for that object agree with those calculated by the JSpOC. SGP4 propagator is to be used solely for +the purpose of propagating JSpOC created TLEs. TLEs created and supplied by the JSpOC are created in such a way as to +be compatible with the SGP4 propagator. In this way, compatibility/interoperability issues between the JSpOC and the +user of JSpOC SGP4 TLEs are addressed. Examples of what SGP4 should not be used for, included but are not limited to, +propagating JSpOC created state vectors which come from any of the various other messages the JSpOC creates, such as +Vector Covariance Messages, Orbital Conjunction Messages, Conjunction Data Messages, etc. + +Government Agency: Air Force Space Command Government Agency Original Software Designation and Software Title: SGP4 + +User Registration Requested. Please Visit: Government Agency Point of Contact for Original Software: + +DEFINITIONS +A. "Contributor" means Government Agency, as the developer of the Original Software, and any entity that makes a +Modification. + +B. "Covered Patents" mean patent claims licensable by a Contributor that are necessarily infringed by the use or sale of +its Modification alone or when combined with the Subject Software. + +C. "Display" means the showing of a copy of the Subject Software, either directly or by means of an image, or any other +device. + +D. "Distribution" means conveyance or transfer of the Subject Software, regardless of means, to another. + +E. "Larger Work" means computer software that combines Subject Software, or portions thereof, with software separate +from the Subject Software that is not governed by the terms of this Agreement. + +F. "Original Software" means any or all of the computer software first released under this Agreement by Government +Agency with Government Agency designation SGP4, with title identified herein, including object code and accompanying +documentation, if any. + +G. "Recipient" means anyone who acquires the Subject Software under this Agreement, including all Contributors. + +H. "Redistribution" means Distribution of the Subject Software to another party. + +I. "Reproduction" means the making of a counterpart, image or copy of the Subject Software. + +J. "Sale" means the exchange of the Subject Software for money or equivalent value. + +K. "Subject Software" means the Original Software, or any respective parts thereof. + +L. "Use" means the application or employment of the Subject Software for any purpose. + +GRANT OF RIGHTS +A. Under Non-Patent Rights: Subject to the terms and conditions of this Agreement, each Contributor, with respect to its +own contribution to the Subject Software, hereby grants to each Recipient a non-exclusive, world-wide, royalty-free +license to engage in the following activities pertaining to the Subject Software: + +Use +Distribution +Reproduction +Redistribution +Display + +B. Under Patent Rights: Subject to the terms and conditions of this Agreement, each Contributor, with respect to its own +contribution to the Subject Software, hereby grants to each Recipient under Covered Patents a non-exclusive, world-wide, +royalty-free license to engage in the following activities pertaining to the Subject Software: + +Use +Distribution +Reproduction +Sale +Offer for Sale + +C. Redistribution and use of binary forms,are permitted provided that the following conditions are met: + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided with the distribution. + +Neither the name of the Air Force Space Command nor the names of its contributors may be used to endorse or promote +products derived from this software without specific prior written permission. + +D. The rights granted in Paragraphs A. and B. allow the Recipient to sublicense those same rights. Such sublicense must +be under the same terms and conditions of this Agreement. + +OBLIGATIONS OF RECIPIENT + +A. Distribution or Redistribution of the Subject Software must be made under this Agreement except for additions covered +under paragraph 3H. + +Whenever a Recipient distributes or redistributes the Subject Software, a copy of this Agreement must be included with +each copy of the Subject Software; and + +B. Each Recipient must ensure that the following copyright notice appears prominently in the Subject Software: + +Copyright 2015 United States Government as represented by the Administrator of Air Force Space Command. All Rights +Reserved. + +C. A Contributor may add its own copyright notice to the Subject Software. Once a copyright notice has been added to the +Subject Software, a Recipient may not remove it without the express permission of the Contributor who added the notice. + +D. A Recipient may not make any representation in the Subject Software or in any promotional, advertising or other +material that may be construed as an endorsement by Government Agency or by any prior Recipient of any product or +service provided by Recipient, or that may seek to obtain commercial advantage by the fact of Government Agency's or a +prior Recipient's participation in this Agreement. + +E. In an effort to track usage and maintain accurate records of the Subject Software, each Recipient, upon receipt of +the Subject Software, is requested but not obligated to register with Government Agency by visiting the following +website: astrodynamicStandards.org. Recipient's name and personal information shall be used for statistical purposes +only. + +F. A Recipient may choose to offer, and to charge a fee for, warranty, support, indemnity and/or liability obligations +to one or more other Recipients of the Subject Software. A Recipient may do so, however, only on its own behalf and not +on behalf of Government Agency or any other Recipient. Such a Recipient must make it absolutely clear that any such +warranty, support, indemnity and/or liability obligation is offered by that Recipient alone. Further, such Recipient +agrees to indemnify Government Agency and every other Recipient for any liability incurred by them as a result of +warranty, support, indemnity and/or liability offered by such Recipient. + +G. A Recipient may create a Larger Work by combining Subject Software with separate software not governed by the terms +of this agreement and distribute the Larger Work as a single product. In such case, the Recipient must make sure Subject +Software, or portions thereof, included in the Larger Work is subject to this Agreement. + +H. Notwithstanding any provisions contained herein, Recipient is hereby put on notice that export of any goods or +technical data from the United States may require some form of export license from the U.S. Government. Failure to +obtain necessary export licenses may result in criminal liability under U.S. laws. Government Agency neither represents +that a license shall not be required nor that, if required, it shall be issued. Nothing granted herein provides any such +export license. \ No newline at end of file diff --git a/src/sgp4/sgp4.ts b/src/sgp4/sgp4.ts index 6d42a15..a3ebba5 100644 --- a/src/sgp4/sgp4.ts +++ b/src/sgp4/sgp4.ts @@ -19,6 +19,8 @@ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * @copyright © 2012–2016 Brandon Rhodes + * This was ported from the python-sgp4 library by Brandon Rhodes. */ // NOTE: This file is meant to maintain as much of the original format as possible. diff --git a/src/time/Epoch.ts b/src/time/Epoch.ts index 13aa05b..d07b293 100644 --- a/src/time/Epoch.ts +++ b/src/time/Epoch.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Seconds } from 'src/main'; import { secondsPerDay } from '../utils/constants'; diff --git a/src/time/EpochGPS.ts b/src/time/EpochGPS.ts index a833ec4..2d33913 100644 --- a/src/time/EpochGPS.ts +++ b/src/time/EpochGPS.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { DataHandler } from '../data/DataHandler'; import { secondsPerWeek } from '../utils/constants'; import type { EpochUTC } from './EpochUTC'; diff --git a/src/time/EpochTAI.ts b/src/time/EpochTAI.ts index 10eabce..9c7b9e2 100644 --- a/src/time/EpochTAI.ts +++ b/src/time/EpochTAI.ts @@ -1,6 +1,27 @@ -import { Epoch } from './Epoch'; - /** - * Represents an Epoch in International Atomic Time (TAI). + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ + +import { Epoch } from './Epoch'; + +/** Represents an Epoch in International Atomic Time (TAI). */ export class EpochTAI extends Epoch {} diff --git a/src/time/EpochTDB.ts b/src/time/EpochTDB.ts index 7f8d731..713386f 100644 --- a/src/time/EpochTDB.ts +++ b/src/time/EpochTDB.ts @@ -1,6 +1,27 @@ -import { Epoch } from './Epoch'; - /** - * Represents an Epoch in TDB (Barycentric Dynamical Time). + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ + +import { Epoch } from './Epoch'; + +/** Represents an Epoch in TDB (Barycentric Dynamical Time). */ export class EpochTDB extends Epoch {} diff --git a/src/time/EpochTT.ts b/src/time/EpochTT.ts index a6fbd9a..ca0b0ea 100644 --- a/src/time/EpochTT.ts +++ b/src/time/EpochTT.ts @@ -1,6 +1,27 @@ -import { Epoch } from './Epoch'; - /** - * Represents a Terrestrial Time (TT) epoch. + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ + +import { Epoch } from './Epoch'; + +/** Represents a Terrestrial Time (TT) epoch. */ export class EpochTT extends Epoch {} diff --git a/src/time/EpochUTC.ts b/src/time/EpochUTC.ts index 0982a92..d91e756 100644 --- a/src/time/EpochUTC.ts +++ b/src/time/EpochUTC.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { DEG2RAD, MS_PER_DAY, RAD2DEG, secondsPerWeek, TAU } from '../utils/constants'; import { evalPoly } from '../utils/functions'; import { DataHandler } from './../data/DataHandler'; diff --git a/src/time/EpochWindow.ts b/src/time/EpochWindow.ts index f210bf4..fd17506 100644 --- a/src/time/EpochWindow.ts +++ b/src/time/EpochWindow.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import type { EpochUTC } from './EpochUTC'; export class EpochWindow { diff --git a/src/time/TimeStamped.ts b/src/time/TimeStamped.ts index 76441cf..424c06b 100644 --- a/src/time/TimeStamped.ts +++ b/src/time/TimeStamped.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import type { EpochUTC } from './EpochUTC'; /** diff --git a/src/time/index.ts b/src/time/index.ts new file mode 100644 index 0000000..dfae3bc --- /dev/null +++ b/src/time/index.ts @@ -0,0 +1,31 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +export { Epoch } from './Epoch'; +export { EpochGPS } from './EpochGPS'; +export { EpochTAI } from './EpochTAI'; +export { EpochTDB } from './EpochTDB'; +export { EpochTT } from './EpochTT'; +export { EpochUTC } from './EpochUTC'; +export { EpochWindow } from './EpochWindow'; +export { TimeStamped } from './TimeStamped'; diff --git a/src/time/time.ts b/src/time/time.ts deleted file mode 100644 index 7705590..0000000 --- a/src/time/time.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { Epoch } from './Epoch'; -export { EpochGPS } from './EpochGPS'; -export { EpochTAI } from './EpochTAI'; -export { EpochTDB } from './EpochTDB'; -export { EpochTT } from './EpochTT'; -export { EpochUTC } from './EpochUTC'; -export { EpochWindow } from './EpochWindow'; -export { TimeStamped } from './TimeStamped'; diff --git a/src/transforms/TransformCache.ts b/src/transforms/TransformCache.ts index 6ace5f1..e9bf2ef 100644 --- a/src/transforms/TransformCache.ts +++ b/src/transforms/TransformCache.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export class TransformCache { private static cache_: Map = new Map(); diff --git a/src/transforms/conversions.ts b/src/transforms/conversions.ts index 5453bde..da8befe 100644 --- a/src/transforms/conversions.ts +++ b/src/transforms/conversions.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { DEG2RAD, Degrees, PI, RAD2DEG, Radians } from '../main'; /** diff --git a/src/transforms/index.ts b/src/transforms/index.ts index a2dfbc4..ce39345 100644 --- a/src/transforms/index.ts +++ b/src/transforms/index.ts @@ -1,2 +1,25 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + export * from './conversions'; export * from './transforms'; diff --git a/src/types/types.ts b/src/types/types.ts index e55b9a0..506c6b6 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -1,3 +1,26 @@ +/** + * @author Theodore Kruczek. + * @license MIT + * @copyright (c) 2022-2024 Theodore Kruczek Permission is + * hereby granted, free of charge, to any person obtaining a copy of this + * software and associated documentation files (the "Software"), to deal in the + * Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import { Satellite } from 'src/objects'; import { PassType } from '../enums/PassType'; import { Vector3D } from 'src/main'; diff --git a/test/utils/functions.test.ts b/test/utils/functions.test.ts index 4436130..745a834 100644 --- a/test/utils/functions.test.ts +++ b/test/utils/functions.test.ts @@ -1,4 +1,5 @@ import { + Degrees, Radians, SpaceObjectType, acoth, @@ -10,12 +11,14 @@ import { covariance, createVec, csch, + deg2rad, derivative, gamma, jacobian, linearInterpolate, log10, mean, + rad2deg, sech, sign, spaceObjType2Str, @@ -130,4 +133,14 @@ describe('functions', () => { it('should be calculate jacobian', () => { expect(jacobian((xs: Float64Array) => xs, 1, new Float64Array([1, 2, 3]))).toMatchSnapshot(); }); + + // rad2deg + it('should be calculate rad2deg', () => { + expect(rad2deg(1 as Radians)).toMatchSnapshot(); + }); + + // deg2rad + it('should be calculate deg2rad', () => { + expect(deg2rad(1 as Degrees)).toMatchSnapshot(); + }); });