ootk 1.5.0 → 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.
@@ -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,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,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,88 @@
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 Sat class provides functions for calculating satellites positions relative
7
+ * to earth based sensors and other orbital 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 { EcfVec3, EciVec3, LlaVec3, RaeVec3, SatelliteRecord, SpaceObjectType, StateVector } from '../types/types';
24
+ import { Sensor } from './sensor';
25
+ import { SpaceObject } from './space-object';
26
+ interface ObjectInfo {
27
+ name?: string;
28
+ type?: SpaceObjectType;
29
+ rcs?: number;
30
+ vmag?: number;
31
+ tle1: string;
32
+ tle2: string;
33
+ }
34
+ export declare class Sat extends SpaceObject {
35
+ satNum: number;
36
+ satrec: SatelliteRecord;
37
+ intlDes: string;
38
+ epochYear: number;
39
+ epochDay: number;
40
+ meanMoDev1: number;
41
+ meanMoDev2: number;
42
+ bstar: number;
43
+ inclination: number;
44
+ raan: number;
45
+ eccentricity: number;
46
+ argOfPerigee: number;
47
+ meanAnomaly: number;
48
+ meanMotion: number;
49
+ period: number;
50
+ apogee: number;
51
+ perigee: number;
52
+ options: any;
53
+ constructor(info: ObjectInfo, options: any);
54
+ propagateTo(date: Date): Sat;
55
+ /**
56
+ * Calculates position and velocity in ECI coordinates at a given time.
57
+ * @param {Date} date Date to calculate the state vector for
58
+ * @returns {StateVector} State vector for the given date
59
+ */
60
+ getStateVec(date?: Date): StateVector;
61
+ /**
62
+ * Calculates ECI position at a given time.
63
+ * @param {Date} date Date to calculate
64
+ * @returns {EciVec3} ECI position vector
65
+ */
66
+ getEci(date?: Date): EciVec3;
67
+ /**
68
+ * Calculates ECF position at a given time.
69
+ * @param {Date} date Date to calculate
70
+ * @returns {EcfVec3} ECF position vector
71
+ */
72
+ getEcf(date?: Date): EcfVec3;
73
+ /**
74
+ * Calculates LLA position at a given time.
75
+ * @param {Date} date Date to calculate
76
+ * @returns {LlaVec3} LLA position vector
77
+ */
78
+ getLla(date?: Date): LlaVec3;
79
+ getRae(sensor: Sensor, date?: Date): RaeVec3;
80
+ /**
81
+ * Calculates the time variables for a given date relative to the TLE epoch.
82
+ * @param {Date} date Date to calculate
83
+ * @param {SatelliteRecord} satrec Satellite orbital information
84
+ * @returns {{m: number, gmst: GreenwichMeanSiderealTime, j: number}} Time variables
85
+ */
86
+ private static calculateTimeVariables;
87
+ }
88
+ export {};
@@ -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 Sensor class is used for creating ground based observers.
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 { RaeVec3, SpaceObjectType } from '../types/types';
23
+ import { BaseObject } from './base-object';
24
+ import { Sat } from './sat';
25
+ interface ObjectInfo {
26
+ name?: string;
27
+ type?: SpaceObjectType;
28
+ lat: number;
29
+ lon: number;
30
+ alt: number;
31
+ }
32
+ export declare class Sensor extends BaseObject {
33
+ lat: number;
34
+ lon: number;
35
+ alt: number;
36
+ constructor(info: ObjectInfo);
37
+ setTime(date: Date): Sensor;
38
+ getRae(sat: Sat, date?: Date): RaeVec3;
39
+ }
40
+ export {};
@@ -0,0 +1,38 @@
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 SpaceObject class is meant to provide properties to satellites/stars that
7
+ * do not apply to ground 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 { BaseObject } from './base-object';
24
+ import { SpaceObjectType } from '../types/types';
25
+ interface ObjectInfo {
26
+ name?: string;
27
+ type?: SpaceObjectType;
28
+ rcs?: number;
29
+ vmag?: number;
30
+ }
31
+ export declare class SpaceObject extends BaseObject {
32
+ rcs: number;
33
+ vmag: number;
34
+ constructor(info: ObjectInfo);
35
+ getRcs(): number;
36
+ getVmag(): number;
37
+ }
38
+ export {};
@@ -0,0 +1,46 @@
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 Star class is meant to help with cacluating star positions relative to
7
+ * satellites and earth based sensors.
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, LlaVec3, RaeVec3, SpaceObjectType } from '../types/types';
24
+ import { SpaceObject } from './space-object';
25
+ interface ObjectInfo {
26
+ name?: string;
27
+ type?: SpaceObjectType;
28
+ vmag?: number;
29
+ ra: number;
30
+ dec: number;
31
+ pname?: string;
32
+ bf?: string;
33
+ h?: string;
34
+ }
35
+ export declare class Star extends SpaceObject {
36
+ pname: string;
37
+ bf: string;
38
+ h: string;
39
+ dec: number;
40
+ ra: number;
41
+ constructor(info: ObjectInfo);
42
+ getEci(lla?: LlaVec3, date?: Date): EciVec3;
43
+ getRae(lla?: LlaVec3, date?: Date): RaeVec3;
44
+ private static calculateTimeVariables;
45
+ }
46
+ export {};
@@ -0,0 +1,82 @@
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 Sgp4 module contains a TypeScript port of the 2020 version of
7
+ * sgp4unit.cpp from "Fundamentals of Astrodynamics and Applications" by David
8
+ * Vallado. All of the original comments and notes are inserted in the code below
9
+ * in order provide context to the functions and clarify any adjustments made for
10
+ * TypeScript/JavaScript compatibility.
11
+ *
12
+ * @license AGPL-3.0-or-later
13
+ * @Copyright (c) 2020-2022 Theodore Kruczek
14
+ *
15
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
16
+ * terms of the GNU Affero General Public License as published by the Free Software
17
+ * Foundation, either version 3 of the License, or (at your option) any later version.
18
+ *
19
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
20
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21
+ * See the GNU Affero General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU Affero General Public License along with
24
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
25
+ */
26
+ import { SatelliteRecord, StateVector, Vec3Flat } from '../types/types';
27
+ declare class Sgp4 {
28
+ private static dpper;
29
+ private static dscom;
30
+ private static dsinit;
31
+ private static dspace;
32
+ private static initl;
33
+ private static sgp4init;
34
+ static propagate(satrec: SatelliteRecord, tsince: number): StateVector;
35
+ private static getgravconst;
36
+ static createSatrec(tleLine1: string, tleLine2: string, whichconst?: string, opsmode?: string): SatelliteRecord;
37
+ static gstime(jdut1: number): number;
38
+ static sgn(x: number): number;
39
+ static mag(x: Vec3Flat): number;
40
+ static cross(vec1: Vec3Flat, vec2: Vec3Flat): Vec3Flat;
41
+ static dot(x: Vec3Flat, y: Vec3Flat): number;
42
+ static angle(vec1: Vec3Flat, vec2: Vec3Flat): number;
43
+ static asinh(xval: number): number;
44
+ static newtonnu(ecc: number, nu: number): {
45
+ e0: number;
46
+ m: number;
47
+ };
48
+ static sinh(x: number): number;
49
+ static rv2coe(r: Vec3Flat, v: Vec3Flat, mus: number): {
50
+ p: number;
51
+ a: number;
52
+ ecc: number;
53
+ incl: number;
54
+ omega: number;
55
+ argp: number;
56
+ nu: number;
57
+ m: number;
58
+ arglat: number;
59
+ truelon: number;
60
+ lonper: number;
61
+ };
62
+ static jday(year: number | Date, mon?: number, day?: number, hr?: number, min?: number, sec?: number, ms?: number): {
63
+ jd: number;
64
+ jdFrac: number;
65
+ };
66
+ static days2mdhms(year: number, days: number): {
67
+ mon: number;
68
+ day: number;
69
+ hr: number;
70
+ min: number;
71
+ sec: number;
72
+ };
73
+ static invjday(jd: number, jdfrac: number): {
74
+ year: number;
75
+ mon: number;
76
+ day: number;
77
+ hr: number;
78
+ min: number;
79
+ sec: number;
80
+ };
81
+ }
82
+ export { Sgp4 };
@@ -0,0 +1,6 @@
1
+ export declare class TleFormatData {
2
+ start: number;
3
+ stop: number;
4
+ length: number;
5
+ constructor(start: number, end: number);
6
+ }