ootk 1.0.8 → 1.5.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 (92) hide show
  1. package/{asc → .asc}/asconfig.json +0 -0
  2. package/{asc → .asc}/assembly/index.ts +0 -0
  3. package/{asc → .asc}/ex/asconfig.json +0 -0
  4. package/{asc → .asc}/ex/assembly/index.ts +0 -0
  5. package/{asc → .asc}/ex/index.html +0 -0
  6. package/{asc → .asc}/ex/package.json +0 -0
  7. package/{asc → .asc}/ex/tests/index.js +0 -0
  8. package/{asc → .asc}/package.json +0 -0
  9. package/{asc → .asc}/tests/index.js +0 -0
  10. package/.eslintrc.json +244 -0
  11. package/CHANGELOG.md +21 -1
  12. package/LICENSE.MD +299 -21
  13. package/README.md +17 -22
  14. package/dist/objects/base-object.d.ts +40 -0
  15. package/dist/objects/detailed-sat.d.ts +66 -0
  16. package/dist/objects/index.d.ts +4 -0
  17. package/dist/objects/sat.d.ts +88 -0
  18. package/dist/objects/sensor.d.ts +40 -0
  19. package/dist/objects/space-object.d.ts +38 -0
  20. package/dist/objects/star.d.ts +46 -0
  21. package/dist/ootk.d.ts +16 -21
  22. package/dist/ootk.js +2 -1
  23. package/dist/ootk.js.LICENSE.txt +77 -0
  24. package/dist/{sgp4.d.ts → sgp4/sgp4.d.ts} +14 -21
  25. package/dist/tle/tle-format-data.d.ts +6 -0
  26. package/dist/tle/tle.d.ts +374 -0
  27. package/{lib → dist/transforms}/transforms.d.ts +14 -17
  28. package/dist/{types.d.ts → types/types.d.ts} +111 -3
  29. package/dist/utils/constants.d.ts +34 -0
  30. package/dist/utils/moon-math.d.ts +104 -0
  31. package/dist/utils/sun-math.d.ts +230 -0
  32. package/dist/utils/utils.d.ts +36 -0
  33. package/lib/objects/base-object.d.ts +40 -0
  34. package/lib/objects/base-object.js +109 -0
  35. package/lib/objects/base-object.js.map +1 -0
  36. package/lib/objects/detailed-sat.d.ts +66 -0
  37. package/lib/objects/detailed-sat.js +149 -0
  38. package/lib/objects/detailed-sat.js.map +1 -0
  39. package/lib/objects/index.d.ts +4 -0
  40. package/lib/objects/index.js +5 -0
  41. package/lib/objects/index.js.map +1 -0
  42. package/lib/objects/sat.d.ts +88 -0
  43. package/lib/objects/sat.js +141 -0
  44. package/lib/objects/sat.js.map +1 -0
  45. package/lib/objects/sensor.d.ts +40 -0
  46. package/lib/objects/sensor.js +88 -0
  47. package/lib/objects/sensor.js.map +1 -0
  48. package/lib/objects/space-object.d.ts +38 -0
  49. package/lib/objects/space-object.js +60 -0
  50. package/lib/objects/space-object.js.map +1 -0
  51. package/lib/objects/star.d.ts +46 -0
  52. package/lib/objects/star.js +91 -0
  53. package/lib/objects/star.js.map +1 -0
  54. package/lib/ootk.d.ts +16 -21
  55. package/lib/ootk.js +16 -21
  56. package/lib/ootk.js.map +1 -1
  57. package/lib/{sgp4.d.ts → sgp4/sgp4.d.ts} +14 -21
  58. package/lib/{sgp4.js → sgp4/sgp4.js} +1064 -898
  59. package/lib/sgp4/sgp4.js.map +1 -0
  60. package/lib/tle/tle-format-data.d.ts +6 -0
  61. package/lib/tle/tle-format-data.js +10 -0
  62. package/lib/tle/tle-format-data.js.map +1 -0
  63. package/lib/tle/tle.d.ts +374 -0
  64. package/lib/tle/tle.js +611 -0
  65. package/lib/tle/tle.js.map +1 -0
  66. package/{dist → lib/transforms}/transforms.d.ts +14 -17
  67. package/lib/{transforms.js → transforms/transforms.js} +44 -40
  68. package/lib/transforms/transforms.js.map +1 -0
  69. package/lib/{types.d.ts → types/types.d.ts} +111 -3
  70. package/lib/types/types.js +34 -0
  71. package/lib/types/types.js.map +1 -0
  72. package/lib/utils/constants.d.ts +19 -15
  73. package/lib/utils/constants.js +20 -16
  74. package/lib/utils/constants.js.map +1 -1
  75. package/lib/utils/moon-math.d.ts +104 -0
  76. package/lib/utils/moon-math.js +387 -0
  77. package/lib/utils/moon-math.js.map +1 -0
  78. package/lib/utils/sun-math.d.ts +230 -0
  79. package/lib/utils/sun-math.js +421 -0
  80. package/lib/utils/sun-math.js.map +1 -0
  81. package/lib/utils/utils.d.ts +36 -0
  82. package/lib/utils/utils.js +81 -0
  83. package/lib/utils/utils.js.map +1 -0
  84. package/package.json +4 -3
  85. package/dist/utils.d.ts +0 -34
  86. package/lib/sgp4.js.map +0 -1
  87. package/lib/transforms.js.map +0 -1
  88. package/lib/types.js +0 -2
  89. package/lib/types.js.map +0 -1
  90. package/lib/utils.d.ts +0 -34
  91. package/lib/utils.js +0 -62
  92. package/lib/utils.js.map +0 -1
@@ -0,0 +1,230 @@
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-2022 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 { AzEl, Meters, SunTime } from '../types/types';
37
+ import { Degrees, Radians } from '../ootk';
38
+ export declare class SunMath {
39
+ private static readonly J1970;
40
+ private static readonly J2000;
41
+ private static readonly J0;
42
+ private static readonly e;
43
+ private static times;
44
+ private static julianCycle;
45
+ /**
46
+ * calculates the obderver angle
47
+ * @param {number} alt the observer altitude (in meters) relative to the horizon
48
+ * @returns {number} height for further calculations
49
+ */
50
+ private static observerAngle;
51
+ /**
52
+ * get solar mean anomaly
53
+ * @param {number} d - julian day
54
+ * @returns {number} solar mean anomaly
55
+ */
56
+ private static solarMeanAnomaly;
57
+ /**
58
+ * convert Julian calendar to date object
59
+ * @param {number} julian day number in Julian calendar to convert
60
+ * @return {number} result date as timestamp
61
+ */
62
+ static julian2date(julian: number): Date;
63
+ /**
64
+ * get number of days for a dateValue since 2000
65
+ *
66
+ * See: https://en.wikipedia.org/wiki/Epoch_(astronomy)
67
+ *
68
+ * @param {number} date date as timestamp to get days
69
+ * @return {number} count of days
70
+ */
71
+ static date2jSince2000(date: Date): number;
72
+ /**
73
+ * get right ascension
74
+ * @param {number} l - ecliptic longitude
75
+ * @param {number} b - ecliptic latitude
76
+ * @returns {number} right ascension
77
+ */
78
+ static rightAscension(l: number, b: number): Radians;
79
+ /**
80
+ * get declination
81
+ * @param {number} l - ecliptic longitude
82
+ * @param {number} b - ecliptic latitude
83
+ * @returns {number} declination
84
+ */
85
+ static declination(l: number, b: number): Radians;
86
+ /**
87
+ * get azimuth
88
+ * @param {number} H - siderealTime
89
+ * @param {Radians} phi - latitude
90
+ * @param {Radians} dec - The declination of the sun
91
+ * @returns {Radians} azimuth in rad
92
+ */
93
+ static azimuth(H: number, phi: Radians, dec: Radians): 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
+ * side real time
104
+ * @param {number} d - julian day
105
+ * @param {Radians} lw - longitude of the observer
106
+ * @returns {number} sidereal time
107
+ */
108
+ static siderealTime(d: number, lw: Radians): number;
109
+ /**
110
+ * get astro refraction
111
+ * @param {Radians} h - elevation
112
+ * @returns {number} refraction
113
+ */
114
+ static astroRefraction(h: Degrees): Radians;
115
+ /**
116
+ * ecliptic longitude
117
+ * @param {number} M - solar mean anomaly
118
+ * @returns {number} ecliptic longitude
119
+ */
120
+ static eclipticLongitude(M: number): number;
121
+ /**
122
+ * ecliptic latitude
123
+ * @param {number} B - ?
124
+ * @returns {number} ecliptic latitude
125
+ */
126
+ static eclipticLatitude(B: number): number;
127
+ /**
128
+ * Julian cycle
129
+ * @param {number} d - number of days
130
+ * @param {number} lw - rad * -lng;
131
+ * @returns {number} julian cycle
132
+ */
133
+ static julianCyle(d: number, lw: number): number;
134
+ /**
135
+ * approx transit
136
+ * @param {number} Ht - hourAngle
137
+ * @param {number} lw - rad * -lng
138
+ * @param {number} n - Julian cycle
139
+ * @returns {number} approx transit
140
+ */
141
+ static approxTransit(Ht: number, lw: number, n: number): number;
142
+ /**
143
+ * solar transit in Julian
144
+ * @param {number} ds - approxTransit
145
+ * @param {number} M - solar mean anomal
146
+ * @param {number} L - ecliptic longitude
147
+ * @returns {number} solar transit in Julian
148
+ */
149
+ static solarTransitJulian(ds: number, M: number, L: number): number;
150
+ /**
151
+ * hour angle
152
+ * @param {number} h - heigh at 0
153
+ * @param {number} phi - rad * lat;
154
+ * @param {number} dec - declination
155
+ * @returns {number} hour angle
156
+ */
157
+ static hourAngle(h: number, phi: number, dec: number): number;
158
+ /**
159
+ * returns set time for the given sun altitude
160
+ * @param {number} h - heigh at 0
161
+ * @param {number} lw - rad * -lng
162
+ * @param {number} phi - rad * lat;
163
+ * @param {number} dec - declination
164
+ * @param {number} n - Julian cycle
165
+ * @param {number} M - solar mean anomal
166
+ * @param {number} L - ecliptic longitude
167
+ * @returns {number} set time
168
+ */
169
+ static getSetJulian(h: number, lw: number, phi: number, dec: number, n: number, M: number, L: number): number;
170
+ /**
171
+ * returns set time for the given sun altitude
172
+ * @param {Meters} alt - altitude at 0
173
+ * @param {Radians} lw - -lng
174
+ * @param {Radians} phi - lat;
175
+ * @param {Radians} dec - declination
176
+ * @param {number} n - Julian cycle
177
+ * @param {number} M - solar mean anomal
178
+ * @param {number} L - ecliptic longitude
179
+ * @return {J2000Value} sunset time in days since 2000
180
+ */
181
+ private static getSetJ;
182
+ /**
183
+ * calculates sun times for a given date and latitude/longitude
184
+ * @param {Date|number} dateVal Date object for calculating sun-times
185
+ * @param {number} lat latitude for calculating sun-times
186
+ * @param {number} lon longitude for calculating sun-times
187
+ * @param {number} [alt=0] the observer height (in meters) relative to the horizon
188
+ * @param {boolean} [isUtc=false] defines if the calculation should be in utc or local time (default is local)
189
+ * @return {SunTime} result object of sunTime
190
+ */
191
+ static getTimes(dateVal: Date, lat: Degrees, lon: Degrees, alt?: Meters, isUtc?: boolean): SunTime;
192
+ private static calculateJnoon;
193
+ /**
194
+ * calculates time for a given azimuth angle for a given date and latitude/longitude
195
+ * @param {number|Date} dateValue Date object or timestamp for calculating sun-time
196
+ * @param {Degrees} lat latitude for calculating sun-time
197
+ * @param {Degrees} lon longitude for calculating sun-time
198
+ * @param {Radians | Degrees} az azimuth for calculating sun-time
199
+ * @param {boolean} [isDegrees] true if the az angle is in degree and not in rad
200
+ * @return {Date} result time of sun-time
201
+ */
202
+ static getSunTimeByAzimuth(dateValue: any, lat: Degrees, lon: Degrees, az: Radians | Degrees, isDegrees?: boolean): Date;
203
+ /**
204
+ * get azimuth
205
+ * @param {number} H - siderealTime
206
+ * @param {Radians} phi - latitude
207
+ * @param {Radians} dec - The declination of the sun
208
+ * @returns {Radians} azimuth
209
+ */
210
+ private static getAzimuth;
211
+ /**
212
+ * Convert Date to Solar Date/Time
213
+ *
214
+ * Based on https://www.pveducation.org/pvcdrom/properties-of-sunlight/solar-time
215
+ *
216
+ * See: https://github.com/mourner/suncalc/pull/156
217
+ *
218
+ * @param {date} date - Date to calculate for
219
+ * @param {number} utcOffset - UTC offset in hours
220
+ * @param {Degrees} lon - Longitude in degrees
221
+ * @returns {Date} - Date Object in Solar Time
222
+ */
223
+ static getSolarTime(date: Date, utcOffset: number, lon: number): Date;
224
+ static getStarAzEl(date: Date, lat: Degrees, lon: Degrees, ra: number, dec: number): AzEl;
225
+ static getSunAzEl(date: Date, lat: Degrees, lon: Degrees): AzEl;
226
+ static getSunRaDec(d: number): {
227
+ dec: number;
228
+ ra: number;
229
+ };
230
+ }
@@ -0,0 +1,36 @@
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 The Utils module.
7
+ *
8
+ * @license AGPL-3.0-or-later
9
+ * @Copyright (c) 2020-2022 Theodore Kruczek
10
+ *
11
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
12
+ * terms of the GNU Affero General Public License as published by the Free Software
13
+ * Foundation, either version 3 of the License, or (at your option) any later version.
14
+ *
15
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
16
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
+ * See the GNU Affero General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public License along with
20
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import * as Types from '../types/types';
23
+ import { MoonMath } from './moon-math';
24
+ import { SunMath } from './sun-math';
25
+ declare class Utils {
26
+ static Types: typeof Types;
27
+ static distance(pos1: Types.EciVec3, pos2: Types.EciVec3): Types.Kilometer;
28
+ private static sign;
29
+ static dopplerFactor(location: Types.EciVec3, position: Types.EciVec3, velocity: Types.EciVec3): Types.Kilometer;
30
+ static createVec(start: number, stop: number, step: number): number[];
31
+ static jday: (year?: number, mon?: number, day?: number, hr?: number, minute?: number, sec?: number) => number;
32
+ static roundToNDecimalPlaces(value: number, places: number): number;
33
+ static SunMath: typeof SunMath;
34
+ static MoonMath: typeof MoonMath;
35
+ }
36
+ export { Utils };
@@ -0,0 +1,40 @@
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 The BaseObject class is used for creating core properties and methods applicable
7
+ * to ground and space based objects.
8
+ *
9
+ * @license AGPL-3.0-or-later
10
+ * @Copyright (c) 2020-2022 Theodore Kruczek
11
+ *
12
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
+ * terms of the GNU Affero General Public License as published by the Free Software
14
+ * Foundation, either version 3 of the License, or (at your option) any later version.
15
+ *
16
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
+ * See the GNU Affero General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Affero General Public License along with
21
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
+ */
23
+ import { EciVec3, SpaceObjectType } from '../types/types';
24
+ interface ObjectInfo {
25
+ name?: string;
26
+ type?: SpaceObjectType;
27
+ position?: EciVec3;
28
+ time?: Date;
29
+ }
30
+ export declare class BaseObject {
31
+ name: string;
32
+ type: SpaceObjectType;
33
+ position: EciVec3;
34
+ time: Date;
35
+ constructor(info: ObjectInfo);
36
+ getName(): string;
37
+ getType(): SpaceObjectType;
38
+ getTypeString(): string;
39
+ }
40
+ export {};
@@ -0,0 +1,109 @@
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 The BaseObject class is used for creating core properties and methods applicable
7
+ * to ground and space based objects.
8
+ *
9
+ * @license AGPL-3.0-or-later
10
+ * @Copyright (c) 2020-2022 Theodore Kruczek
11
+ *
12
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
+ * terms of the GNU Affero General Public License as published by the Free Software
14
+ * Foundation, either version 3 of the License, or (at your option) any later version.
15
+ *
16
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
+ * See the GNU Affero General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Affero General Public License along with
21
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
+ */
23
+ import { SpaceObjectType } from '../types/types';
24
+ var BaseObject = /** @class */ (function () {
25
+ function BaseObject(info) {
26
+ this.type = info.type || SpaceObjectType.UNKNOWN;
27
+ this.name = info.name || 'Unknown';
28
+ this.position = info.position || {
29
+ x: 0,
30
+ y: 0,
31
+ z: 0,
32
+ }; // Default to the center of the earth until position is calculated
33
+ this.time = info.time || new Date();
34
+ }
35
+ BaseObject.prototype.getName = function () {
36
+ return this.name;
37
+ };
38
+ BaseObject.prototype.getType = function () {
39
+ return this.type;
40
+ };
41
+ // eslint-disable-next-line complexity
42
+ BaseObject.prototype.getTypeString = function () {
43
+ switch (this.type) {
44
+ case SpaceObjectType.UNKNOWN:
45
+ return 'Unknown';
46
+ case SpaceObjectType.PAYLOAD:
47
+ return 'Payload';
48
+ case SpaceObjectType.ROCKET_BODY:
49
+ return 'Rocket Body';
50
+ case SpaceObjectType.DEBRIS:
51
+ return 'Debris';
52
+ case SpaceObjectType.SPECIAL:
53
+ return 'Special';
54
+ case SpaceObjectType.RADAR_MEASUREMENT:
55
+ return 'Radar Measurement';
56
+ case SpaceObjectType.RADAR_TRACK:
57
+ return 'Radar Track';
58
+ case SpaceObjectType.RADAR_OBJECT:
59
+ return 'Radar Object';
60
+ case SpaceObjectType.BALLISTIC_MISSILE:
61
+ return 'Ballistic Missile';
62
+ case SpaceObjectType.STAR:
63
+ return 'Star';
64
+ case SpaceObjectType.INTERGOVERNMENTAL_ORGANIZATION:
65
+ return 'Intergovernmental Organization';
66
+ case SpaceObjectType.SUBORBITAL_PAYLOAD_OPERATOR:
67
+ return 'Suborbital Payload Operator';
68
+ case SpaceObjectType.PAYLOAD_OWNER:
69
+ return 'Payload Owner';
70
+ case SpaceObjectType.METEOROLOGICAL_ROCKET_LAUNCH_AGENCY_OR_MANUFACTURER:
71
+ return 'Meteorological Rocket Launch Agency or Manufacturer';
72
+ case SpaceObjectType.PAYLOAD_MANUFACTURER:
73
+ return 'Payload Manufacturer';
74
+ case SpaceObjectType.LAUNCH_AGENCY:
75
+ return 'Launch Agency';
76
+ case SpaceObjectType.LAUNCH_SITE:
77
+ return 'Launch Site';
78
+ case SpaceObjectType.LAUNCH_POSITION:
79
+ return 'Launch Position';
80
+ case SpaceObjectType.LAUNCH_FACILITY:
81
+ return 'Launch Facility';
82
+ case SpaceObjectType.CONTROL_FACILITY:
83
+ return 'Control Facility';
84
+ case SpaceObjectType.GROUND_SENSOR_STATION:
85
+ return 'Ground Sensor Station';
86
+ case SpaceObjectType.OPTICAL:
87
+ return 'Optical';
88
+ case SpaceObjectType.MECHANICAL:
89
+ return 'Mechanical';
90
+ case SpaceObjectType.PHASED_ARRAY_RADAR:
91
+ return 'Phased Array Radar';
92
+ case SpaceObjectType.OBSERVER:
93
+ return 'Observer';
94
+ case SpaceObjectType.BISTATIC_RADIO_TELESCOPE:
95
+ return 'Bistatic Radio Telescope';
96
+ case SpaceObjectType.COUNTRY:
97
+ return 'Country';
98
+ case SpaceObjectType.LAUNCH_VEHICLE_MANUFACTURER:
99
+ return 'Launch Vehicle Manufacturer';
100
+ case SpaceObjectType.ENGINE_MANUFACTURER:
101
+ return 'Engine Manufacturer';
102
+ default:
103
+ return 'Unknown';
104
+ }
105
+ };
106
+ return BaseObject;
107
+ }());
108
+ export { BaseObject };
109
+ //# sourceMappingURL=base-object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-object.js","sourceRoot":"","sources":["../../src/objects/base-object.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAW,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAS1D;IAME,oBAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,eAAe,CAAC,OAAO,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC;QAEnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI;YAC/B,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;SACL,CAAC,CAAC,kEAAkE;QAErE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;IACtC,CAAC;IAEM,4BAAO,GAAd;QACE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAEM,4BAAO,GAAd;QACE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,sCAAsC;IAC/B,kCAAa,GAApB;QACE,QAAQ,IAAI,CAAC,IAAI,EAAE;YACjB,KAAK,eAAe,CAAC,OAAO;gBAC1B,OAAO,SAAS,CAAC;YACnB,KAAK,eAAe,CAAC,OAAO;gBAC1B,OAAO,SAAS,CAAC;YACnB,KAAK,eAAe,CAAC,WAAW;gBAC9B,OAAO,aAAa,CAAC;YACvB,KAAK,eAAe,CAAC,MAAM;gBACzB,OAAO,QAAQ,CAAC;YAClB,KAAK,eAAe,CAAC,OAAO;gBAC1B,OAAO,SAAS,CAAC;YACnB,KAAK,eAAe,CAAC,iBAAiB;gBACpC,OAAO,mBAAmB,CAAC;YAC7B,KAAK,eAAe,CAAC,WAAW;gBAC9B,OAAO,aAAa,CAA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CAAC;YACvC,KAAK,eAAe,CAAC,mBAAmB;gBACtC,OAAO,qBAAqB,CAAC;YAC/B;gBACE,OAAO,SAAS,CAAC;SACpB;IACH,CAAC;IACH,iBAAC;AAAD,CAAC,AA5FD,IA4FC"}
@@ -0,0 +1,66 @@
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 The DetailedSat class is an extension of the Sat class that provides additional
7
+ * properties for categorizing and filtering satellites.
8
+ *
9
+ * @license AGPL-3.0-or-later
10
+ * @Copyright (c) 2020-2022 Theodore Kruczek
11
+ *
12
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
+ * terms of the GNU Affero General Public License as published by the Free Software
14
+ * Foundation, either version 3 of the License, or (at your option) any later version.
15
+ *
16
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
+ * See the GNU Affero General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Affero General Public License along with
21
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
+ */
23
+ import { LaunchDetails, OperationsDetails, SpaceCraftDetails, SpaceObjectType } from '../types/types';
24
+ import { Sat } from './sat';
25
+ interface ObjectInfo {
26
+ name?: string;
27
+ type?: SpaceObjectType;
28
+ rcs?: number;
29
+ vmag?: number;
30
+ tle1: string;
31
+ tle2: string;
32
+ }
33
+ export declare class DetailedSat extends Sat {
34
+ launchDate: string;
35
+ launchMass: string;
36
+ launchSite: string;
37
+ launchVehicle: string;
38
+ lifetime: string | number;
39
+ maneuver: string;
40
+ manufacturer: string;
41
+ motor: string;
42
+ power: string;
43
+ payload: string;
44
+ purpose: string;
45
+ shape: string;
46
+ span: string;
47
+ user: string;
48
+ mission: string;
49
+ owner: string;
50
+ configuration: string;
51
+ equipment: string;
52
+ dryMass: string;
53
+ country: string;
54
+ constructor(info: ObjectInfo, options: any, details: {
55
+ launchDetails: LaunchDetails;
56
+ spaceCraftDetails: SpaceCraftDetails;
57
+ operationsDetails: OperationsDetails;
58
+ });
59
+ setLaunchDetails(details: LaunchDetails): void;
60
+ getLaunchDetails(): LaunchDetails;
61
+ setSpaceCraftDetails(details: SpaceCraftDetails): void;
62
+ getSpaceCraftDetails(): SpaceCraftDetails;
63
+ setOperationsDetails(details: OperationsDetails): void;
64
+ getOperationsDetails(): OperationsDetails;
65
+ }
66
+ export {};
@@ -0,0 +1,149 @@
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 The DetailedSat class is an extension of the Sat class that provides additional
7
+ * properties for categorizing and filtering satellites.
8
+ *
9
+ * @license AGPL-3.0-or-later
10
+ * @Copyright (c) 2020-2022 Theodore Kruczek
11
+ *
12
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
+ * terms of the GNU Affero General Public License as published by the Free Software
14
+ * Foundation, either version 3 of the License, or (at your option) any later version.
15
+ *
16
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
+ * See the GNU Affero General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Affero General Public License along with
21
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
+ */
23
+ var __extends = (this && this.__extends) || (function () {
24
+ var extendStatics = function (d, b) {
25
+ extendStatics = Object.setPrototypeOf ||
26
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
27
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
28
+ return extendStatics(d, b);
29
+ };
30
+ return function (d, b) {
31
+ if (typeof b !== "function" && b !== null)
32
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33
+ extendStatics(d, b);
34
+ function __() { this.constructor = d; }
35
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
+ };
37
+ })();
38
+ import { Sat } from './sat';
39
+ var DetailedSat = /** @class */ (function (_super) {
40
+ __extends(DetailedSat, _super);
41
+ function DetailedSat(info, options, details) {
42
+ var _this = _super.call(this, info, options) || this;
43
+ _this.setLaunchDetails(details.launchDetails);
44
+ _this.setSpaceCraftDetails(details.spaceCraftDetails);
45
+ _this.setOperationsDetails(details.operationsDetails);
46
+ return _this;
47
+ }
48
+ DetailedSat.prototype.setLaunchDetails = function (details) {
49
+ if (details.launchDate) {
50
+ this.launchDate = details.launchDate;
51
+ }
52
+ if (details.launchMass) {
53
+ this.launchMass = details.launchMass;
54
+ }
55
+ if (details.launchSite) {
56
+ this.launchSite = details.launchSite;
57
+ }
58
+ if (details.launchVehicle) {
59
+ this.launchVehicle = details.launchVehicle;
60
+ }
61
+ };
62
+ DetailedSat.prototype.getLaunchDetails = function () {
63
+ return {
64
+ launchDate: this.launchDate,
65
+ launchMass: this.launchMass,
66
+ launchSite: this.launchSite,
67
+ launchVehicle: this.launchVehicle,
68
+ };
69
+ };
70
+ DetailedSat.prototype.setSpaceCraftDetails = function (details) {
71
+ if (details.lifetime) {
72
+ this.lifetime = details.lifetime;
73
+ }
74
+ if (details.maneuver) {
75
+ this.maneuver = details.maneuver;
76
+ }
77
+ if (details.manufacturer) {
78
+ this.manufacturer = details.manufacturer;
79
+ }
80
+ if (details.motor) {
81
+ this.motor = details.motor;
82
+ }
83
+ if (details.power) {
84
+ this.power = details.power;
85
+ }
86
+ if (details.payload) {
87
+ this.payload = details.payload;
88
+ }
89
+ if (details.purpose) {
90
+ this.purpose = details.purpose;
91
+ }
92
+ if (details.shape) {
93
+ this.shape = details.shape;
94
+ }
95
+ if (details.span) {
96
+ this.span = details.span;
97
+ }
98
+ if (details.configuration) {
99
+ this.configuration = details.configuration;
100
+ }
101
+ if (details.equipment) {
102
+ this.equipment = details.equipment;
103
+ }
104
+ if (details.dryMass) {
105
+ this.dryMass = details.dryMass;
106
+ }
107
+ };
108
+ DetailedSat.prototype.getSpaceCraftDetails = function () {
109
+ return {
110
+ lifetime: this.lifetime,
111
+ maneuver: this.maneuver,
112
+ manufacturer: this.manufacturer,
113
+ motor: this.motor,
114
+ power: this.power,
115
+ payload: this.payload,
116
+ purpose: this.purpose,
117
+ shape: this.shape,
118
+ span: this.span,
119
+ configuration: this.configuration,
120
+ equipment: this.equipment,
121
+ dryMass: this.dryMass,
122
+ };
123
+ };
124
+ DetailedSat.prototype.setOperationsDetails = function (details) {
125
+ if (details.user) {
126
+ this.user = details.user;
127
+ }
128
+ if (details.mission) {
129
+ this.mission = details.mission;
130
+ }
131
+ if (details.owner) {
132
+ this.owner = details.owner;
133
+ }
134
+ if (details.country) {
135
+ this.country = details.country;
136
+ }
137
+ };
138
+ DetailedSat.prototype.getOperationsDetails = function () {
139
+ return {
140
+ user: this.user,
141
+ mission: this.mission,
142
+ owner: this.owner,
143
+ country: this.country,
144
+ };
145
+ };
146
+ return DetailedSat;
147
+ }(Sat));
148
+ export { DetailedSat };
149
+ //# sourceMappingURL=detailed-sat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detailed-sat.js","sourceRoot":"","sources":["../../src/objects/detailed-sat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAW5B;IAAiC,+BAAG;IAyClC,qBACE,IAAgB,EAChB,OAAO,EACP,OAIC;QAPH,YASE,kBAAM,IAAI,EAAE,OAAO,CAAC,SAKrB;QAHC,KAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC7C,KAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACrD,KAAI,CA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E;YAChB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;SAC1B;QACD,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;SAChC;QACD,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;SAC5B;QACD,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;SAChC;IACH,CAAC;IAEM,0CAAoB,GAA3B;QACE,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;IACJ,CAAC;IACH,kBAAC;AAAD,CAAC,AAhKD,CAAiC,GAAG,GAgKnC"}
@@ -0,0 +1,4 @@
1
+ export { DetailedSat } from './detailed-sat';
2
+ export { Sat } from './sat';
3
+ export { Sensor } from './sensor';
4
+ export { Star } from './star';
@@ -0,0 +1,5 @@
1
+ export { DetailedSat } from './detailed-sat';
2
+ export { Sat } from './sat';
3
+ export { Sensor } from './sensor';
4
+ export { Star } from './star';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/objects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}