ootk 7.0.0 → 7.0.2
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.
- package/dist/main.cjs +18894 -18843
- package/dist/main.d.cts +1780 -1847
- package/dist/main.d.ts +1780 -1847
- package/dist/main.js +18893 -18842
- package/package.json +13 -4
package/dist/main.d.cts
CHANGED
|
@@ -1181,83 +1181,6 @@ declare class EquinoctialElements {
|
|
|
1181
1181
|
toPositionVelocity(): PositionVelocity;
|
|
1182
1182
|
}
|
|
1183
1183
|
|
|
1184
|
-
/**
|
|
1185
|
-
* @author Theodore Kruczek
|
|
1186
|
-
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
1187
|
-
* with satellites and other orbital objects.
|
|
1188
|
-
* @license AGPL-3.0-or-later
|
|
1189
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
1190
|
-
*
|
|
1191
|
-
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
1192
|
-
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
1193
|
-
* is licensed under the MIT license.
|
|
1194
|
-
*
|
|
1195
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
1196
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
1197
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
1198
|
-
*
|
|
1199
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
1200
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
1201
|
-
* See the GNU Affero General Public License for more details.
|
|
1202
|
-
*
|
|
1203
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
1204
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
1205
|
-
*/
|
|
1206
|
-
|
|
1207
|
-
/**
|
|
1208
|
-
* A state vector is a set of coordinates used to specify the position and
|
|
1209
|
-
* velocity of an object in a particular reference frame.
|
|
1210
|
-
*/
|
|
1211
|
-
declare abstract class StateVector {
|
|
1212
|
-
epoch: EpochUTC;
|
|
1213
|
-
position: Vector3D<Kilometers>;
|
|
1214
|
-
velocity: Vector3D<KilometersPerSecond>;
|
|
1215
|
-
constructor(epoch: EpochUTC, position: Vector3D<Kilometers>, velocity: Vector3D<KilometersPerSecond>);
|
|
1216
|
-
/**
|
|
1217
|
-
* The name of the reference frame in which the state vector is defined.
|
|
1218
|
-
* @returns The name of the reference frame.
|
|
1219
|
-
*/
|
|
1220
|
-
abstract get name(): string;
|
|
1221
|
-
/**
|
|
1222
|
-
* Whether the state vector is defined in an inertial reference frame.
|
|
1223
|
-
* @returns True if the state vector is defined in an inertial reference
|
|
1224
|
-
*/
|
|
1225
|
-
abstract get inertial(): boolean;
|
|
1226
|
-
/**
|
|
1227
|
-
* Returns a string representation of the StateVector object. The string includes the name, epoch, position, and
|
|
1228
|
-
* velocity.
|
|
1229
|
-
* @returns A string representation of the StateVector object.
|
|
1230
|
-
*/
|
|
1231
|
-
toString(): string;
|
|
1232
|
-
/**
|
|
1233
|
-
* Calculates the mechanical energy of the state vector.
|
|
1234
|
-
* @returns The mechanical energy value.
|
|
1235
|
-
*/
|
|
1236
|
-
get mechanicalEnergy(): number;
|
|
1237
|
-
/**
|
|
1238
|
-
* Calculates the semimajor axis of the state vector.
|
|
1239
|
-
* @returns The semimajor axis in kilometers.
|
|
1240
|
-
*/
|
|
1241
|
-
get semimajorAxis(): Kilometers;
|
|
1242
|
-
/**
|
|
1243
|
-
* Gets the period of the state vector in minutes.
|
|
1244
|
-
* @returns The period in minutes.
|
|
1245
|
-
*/
|
|
1246
|
-
get period(): Minutes;
|
|
1247
|
-
/**
|
|
1248
|
-
* Gets the angular rate of the state vector.
|
|
1249
|
-
* @returns The angular rate.
|
|
1250
|
-
*/
|
|
1251
|
-
get angularRate(): number;
|
|
1252
|
-
/**
|
|
1253
|
-
* Converts the state vector to classical elements.
|
|
1254
|
-
* @param mu The gravitational parameter of the celestial body. Defaults to Earth's gravitational parameter.
|
|
1255
|
-
* @returns The classical elements corresponding to the state vector.
|
|
1256
|
-
* @throws Error if classical elements are undefined for fixed frames.
|
|
1257
|
-
*/
|
|
1258
|
-
toClassicalElements(mu?: number): ClassicalElements;
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
1184
|
/**
|
|
1262
1185
|
* @author Theodore Kruczek
|
|
1263
1186
|
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
@@ -1448,281 +1371,243 @@ declare class ClassicalElements {
|
|
|
1448
1371
|
*/
|
|
1449
1372
|
|
|
1450
1373
|
/**
|
|
1451
|
-
*
|
|
1452
|
-
* is a reference frame that defines the position and orientation of an object relative to the Earth's equator and
|
|
1453
|
-
* equinox.
|
|
1454
|
-
*
|
|
1455
|
-
* By using the True Equator Mean Equinox (TEME) coordinate system, we can accurately describe the position and motion
|
|
1456
|
-
* of satellites relative to the Earth's equator and equinox. This is particularly useful for tracking and predicting
|
|
1457
|
-
* satellite orbits in various applications, such as satellite communication, navigation, and remote sensing.
|
|
1374
|
+
* A Vector is a mathematical object that has both magnitude and direction.
|
|
1458
1375
|
*/
|
|
1459
|
-
declare class
|
|
1376
|
+
declare class Vector<T extends number = number> {
|
|
1377
|
+
elements: T[] | Float64Array;
|
|
1460
1378
|
/**
|
|
1461
|
-
*
|
|
1462
|
-
* @returns The name of the coordinate system.
|
|
1379
|
+
* The length of the vector.
|
|
1463
1380
|
*/
|
|
1464
|
-
|
|
1381
|
+
readonly length: number;
|
|
1465
1382
|
/**
|
|
1466
|
-
*
|
|
1467
|
-
* @returns A boolean value indicating whether the coordinate is inertial.
|
|
1383
|
+
* Represents a 3-dimensional vector.
|
|
1468
1384
|
*/
|
|
1469
|
-
|
|
1385
|
+
static readonly origin3: Vector<0>;
|
|
1470
1386
|
/**
|
|
1471
|
-
*
|
|
1472
|
-
* @param elements - The classical orbital elements.
|
|
1473
|
-
* @returns A new TEME object.
|
|
1387
|
+
* Represents a vector with all elements set to zero.
|
|
1474
1388
|
*/
|
|
1475
|
-
static
|
|
1389
|
+
static readonly origin6: Vector<0>;
|
|
1476
1390
|
/**
|
|
1477
|
-
*
|
|
1478
|
-
* @returns The J2000 coordinates.
|
|
1391
|
+
* Represents the x-axis vector.
|
|
1479
1392
|
*/
|
|
1480
|
-
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
/**
|
|
1484
|
-
* @author Theodore Kruczek
|
|
1485
|
-
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
1486
|
-
* with satellites and other orbital objects.
|
|
1487
|
-
* @license AGPL-3.0-or-later
|
|
1488
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
1489
|
-
*
|
|
1490
|
-
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
1491
|
-
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
1492
|
-
* is licensed under the MIT license.
|
|
1493
|
-
*
|
|
1494
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
1495
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
1496
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
1497
|
-
*
|
|
1498
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
1499
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
1500
|
-
* See the GNU Affero General Public License for more details.
|
|
1501
|
-
*
|
|
1502
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
1503
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
1504
|
-
*/
|
|
1505
|
-
|
|
1506
|
-
/**
|
|
1507
|
-
* Represents a position and velocity in the J2000 coordinate system. This is an Earth-centered inertial (ECI)
|
|
1508
|
-
* coordinate system.
|
|
1509
|
-
*
|
|
1510
|
-
* Commonly used ECI frame is defined with the Earth's Mean Equator and Mean Equinox (MEME) at 12:00 Terrestrial Time on
|
|
1511
|
-
* 1 January 2000. It can be referred to as J2K, J2000 or EME2000. The x-axis is aligned with the mean vernal equinox.
|
|
1512
|
-
* The z-axis is aligned with the Earth's rotation axis (or equivalently, the celestial North Pole) as it was at that
|
|
1513
|
-
* time. The y-axis is rotated by 90° East about the celestial equator.
|
|
1514
|
-
* @see https://en.wikipedia.org/wiki/Earth-centered_inertial
|
|
1515
|
-
*/
|
|
1516
|
-
declare class J2000 extends StateVector {
|
|
1393
|
+
static readonly xAxis: Vector<0 | 1>;
|
|
1517
1394
|
/**
|
|
1518
|
-
*
|
|
1519
|
-
* @param elements The classical elements.
|
|
1520
|
-
* @returns The J2000 coordinate.
|
|
1395
|
+
* Represents the y-axis vector.
|
|
1521
1396
|
*/
|
|
1522
|
-
static
|
|
1397
|
+
static readonly yAxis: Vector<0 | 1>;
|
|
1523
1398
|
/**
|
|
1524
|
-
*
|
|
1525
|
-
* @returns The name of the coordinate system.
|
|
1399
|
+
* Represents the z-axis vector.
|
|
1526
1400
|
*/
|
|
1527
|
-
|
|
1401
|
+
static readonly zAxis: Vector<0 | 1>;
|
|
1528
1402
|
/**
|
|
1529
|
-
*
|
|
1530
|
-
* @returns A boolean value indicating whether the coordinate system is inertial.
|
|
1403
|
+
* Represents a vector pointing along the negative x-axis.
|
|
1531
1404
|
*/
|
|
1532
|
-
|
|
1405
|
+
static readonly xAxisNeg: Vector<0 | -1>;
|
|
1533
1406
|
/**
|
|
1534
|
-
*
|
|
1535
|
-
* This is an ECI to ECEF transformation.
|
|
1536
|
-
* @returns The ITRF coordinates.
|
|
1407
|
+
* Represents a vector pointing along the negative y-axis.
|
|
1537
1408
|
*/
|
|
1538
|
-
|
|
1409
|
+
static readonly yAxisNeg: Vector<0 | -1>;
|
|
1539
1410
|
/**
|
|
1540
|
-
*
|
|
1541
|
-
* @returns The TEME coordinate.
|
|
1411
|
+
* Represents a vector pointing along the negative z-axis.
|
|
1542
1412
|
*/
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* @author Theodore Kruczek
|
|
1548
|
-
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
1549
|
-
* with satellites and other orbital objects.
|
|
1550
|
-
* @license AGPL-3.0-or-later
|
|
1551
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
1552
|
-
*
|
|
1553
|
-
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
1554
|
-
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
1555
|
-
* is licensed under the MIT license.
|
|
1556
|
-
*
|
|
1557
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
1558
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
1559
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
1560
|
-
*
|
|
1561
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
1562
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
1563
|
-
* See the GNU Affero General Public License for more details.
|
|
1564
|
-
*
|
|
1565
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
1566
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
1567
|
-
*/
|
|
1568
|
-
|
|
1569
|
-
/**
|
|
1570
|
-
* The International Terrestrial Reference Frame (ITRF) is a geocentric reference frame for the Earth. It is the
|
|
1571
|
-
* successor to the International Terrestrial Reference System (ITRS). The ITRF definition is maintained by the
|
|
1572
|
-
* International Earth Rotation and Reference Systems Service (IERS). Several versions of ITRF exist, each with a
|
|
1573
|
-
* different epoch, to address the issue of crustal motion. The latest version is ITRF2014, based on data collected from
|
|
1574
|
-
* 1980 to 2014.
|
|
1575
|
-
* @see https://en.wikipedia.org/wiki/International_Terrestrial_Reference_Frame
|
|
1576
|
-
*
|
|
1577
|
-
* This is a geocentric coordinate system, also referenced as ECF/ECEF (Earth Centered Earth Fixed). It is a Cartesian
|
|
1578
|
-
* coordinate system with the origin at the center of the Earth. The x-axis intersects the sphere of the Earth at 0°
|
|
1579
|
-
* latitude (the equator) and 0° longitude (the Prime Meridian). The z-axis goes through the North Pole. The y-axis goes
|
|
1580
|
-
* through 90° East longitude.
|
|
1581
|
-
* @see https://en.wikipedia.org/wiki/Earth-centered,_Earth-fixed_coordinate_system
|
|
1582
|
-
*/
|
|
1583
|
-
declare class ITRF extends StateVector {
|
|
1413
|
+
static readonly zAxisNeg: Vector<0 | -1>;
|
|
1414
|
+
constructor(elements: T[] | Float64Array);
|
|
1584
1415
|
/**
|
|
1585
|
-
*
|
|
1586
|
-
* @
|
|
1416
|
+
* Creates a zero vector of the specified length.
|
|
1417
|
+
* @param length The length of the vector.
|
|
1418
|
+
* @returns A new Vector object representing the zero vector.
|
|
1587
1419
|
*/
|
|
1588
|
-
|
|
1420
|
+
static zero(length: number): Vector;
|
|
1589
1421
|
/**
|
|
1590
|
-
*
|
|
1591
|
-
*
|
|
1422
|
+
* Creates a new Vector with the specified length, filled with the specified
|
|
1423
|
+
* value.
|
|
1424
|
+
* @param length The length of the new Vector.
|
|
1425
|
+
* @param value The value to fill the Vector with.
|
|
1426
|
+
* @returns A new Vector filled with the specified value.
|
|
1592
1427
|
*/
|
|
1593
|
-
|
|
1428
|
+
static filled(length: number, value: number): Vector;
|
|
1594
1429
|
/**
|
|
1595
|
-
*
|
|
1596
|
-
* @
|
|
1430
|
+
* Creates a new Vector instance from an array of elements.
|
|
1431
|
+
* @param elements - The array of elements to create the Vector from.
|
|
1432
|
+
* @returns A new Vector instance.
|
|
1597
1433
|
*/
|
|
1598
|
-
|
|
1434
|
+
static fromList(elements: number[]): Vector;
|
|
1599
1435
|
/**
|
|
1600
|
-
*
|
|
1601
|
-
* @
|
|
1436
|
+
* Returns a string representation of the vector.
|
|
1437
|
+
* @param fixed - The number of digits to appear after the decimal point.
|
|
1438
|
+
* Defaults to -1.
|
|
1439
|
+
* @returns A string representation of the vector.
|
|
1602
1440
|
*/
|
|
1603
|
-
|
|
1441
|
+
toString(fixed?: number): string;
|
|
1604
1442
|
/**
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
1607
|
-
* @see https://en.wikipedia.org/wiki/Epoch_(astronomy)#Julian_years_and_J2000
|
|
1608
|
-
* @returns The coordinate in the J2000 coordinate system.
|
|
1443
|
+
* Returns a string representation of the x value of the vector.
|
|
1444
|
+
* @returns A string representation of the x value of the vector.
|
|
1609
1445
|
*/
|
|
1610
|
-
|
|
1446
|
+
get x(): number;
|
|
1611
1447
|
/**
|
|
1612
|
-
*
|
|
1613
|
-
*
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
toGeodetic(): Geodetic;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
/**
|
|
1620
|
-
* @author Theodore Kruczek
|
|
1621
|
-
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
1622
|
-
* with satellites and other orbital objects.
|
|
1623
|
-
* @license AGPL-3.0-or-later
|
|
1624
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
1625
|
-
*
|
|
1626
|
-
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
1627
|
-
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
1628
|
-
* is licensed under the MIT license.
|
|
1629
|
-
*
|
|
1630
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
1631
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
1632
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
1633
|
-
*
|
|
1634
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
1635
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
1636
|
-
* See the GNU Affero General Public License for more details.
|
|
1637
|
-
*
|
|
1638
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
1639
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
1640
|
-
*/
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* This Geodetic class represents a geodetic coordinate in three-dimensional
|
|
1644
|
-
* space, consisting of latitude, longitude, and altitude. It provides various
|
|
1645
|
-
* methods to perform calculations and operations related to geodetic
|
|
1646
|
-
* coordinates.
|
|
1647
|
-
*
|
|
1648
|
-
* This is a class for geodetic coordinates. This is related to the GroundObject
|
|
1649
|
-
* class, which is used to represent an object on the surface of the Earth.
|
|
1650
|
-
*/
|
|
1651
|
-
declare class Geodetic {
|
|
1652
|
-
readonly lat: Radians;
|
|
1653
|
-
readonly lon: Radians;
|
|
1654
|
-
readonly alt: Kilometers;
|
|
1655
|
-
constructor(latitude: Radians, longitude: Radians, altitude: Kilometers);
|
|
1448
|
+
* Returns a string representation of the y value of the vector.
|
|
1449
|
+
* @returns A string representation of the y value of the vector.
|
|
1450
|
+
*/
|
|
1451
|
+
get y(): number;
|
|
1656
1452
|
/**
|
|
1657
|
-
*
|
|
1658
|
-
*
|
|
1659
|
-
* @param latitude The latitude value in degrees.
|
|
1660
|
-
* @param longitude The longitude value in degrees.
|
|
1661
|
-
* @param altitude The altitude value in kilometers.
|
|
1662
|
-
* @returns A Geodetic object representing the specified latitude, longitude,
|
|
1663
|
-
* and altitude.
|
|
1453
|
+
* Returns a string representation of the z value of the vector.
|
|
1454
|
+
* @returns A string representation of the z value of the vector.
|
|
1664
1455
|
*/
|
|
1665
|
-
|
|
1456
|
+
get z(): number;
|
|
1666
1457
|
/**
|
|
1667
|
-
*
|
|
1668
|
-
* @returns
|
|
1458
|
+
* Converts the vector elements to an array.
|
|
1459
|
+
* @returns An array containing the vector elements.
|
|
1669
1460
|
*/
|
|
1670
|
-
|
|
1461
|
+
toList(): number[];
|
|
1671
1462
|
/**
|
|
1672
|
-
*
|
|
1673
|
-
* @returns The
|
|
1463
|
+
* Converts the vector to a Float64Array.
|
|
1464
|
+
* @returns The vector as a Float64Array.
|
|
1674
1465
|
*/
|
|
1675
|
-
|
|
1466
|
+
toArray(): Float64Array;
|
|
1676
1467
|
/**
|
|
1677
|
-
*
|
|
1678
|
-
* @returns The
|
|
1468
|
+
* Calculates the magnitude of the vector.
|
|
1469
|
+
* @returns The magnitude of the vector.
|
|
1679
1470
|
*/
|
|
1680
|
-
|
|
1471
|
+
magnitude(): number;
|
|
1681
1472
|
/**
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
1473
|
+
* Adds the elements of another vector to this vector and returns a new
|
|
1474
|
+
* vector.
|
|
1475
|
+
* @param v - The vector to add.
|
|
1476
|
+
* @returns A new vector containing the sum of the elements.
|
|
1684
1477
|
*/
|
|
1685
|
-
|
|
1478
|
+
add(v: Vector): Vector;
|
|
1686
1479
|
/**
|
|
1687
|
-
*
|
|
1688
|
-
*
|
|
1689
|
-
* @
|
|
1690
|
-
* @returns The ITRF coordinates.
|
|
1480
|
+
* Subtracts a vector from the current vector.
|
|
1481
|
+
* @param v The vector to subtract.
|
|
1482
|
+
* @returns A new vector representing the result of the subtraction.
|
|
1691
1483
|
*/
|
|
1692
|
-
|
|
1484
|
+
subtract(v: Vector): Vector;
|
|
1693
1485
|
/**
|
|
1694
|
-
*
|
|
1695
|
-
* @param
|
|
1696
|
-
* @
|
|
1697
|
-
* @returns The angle between the two geodetic coordinates in radians.
|
|
1486
|
+
* Scales the vector by a given factor.
|
|
1487
|
+
* @param n The scaling factor.
|
|
1488
|
+
* @returns A new Vector object representing the scaled vector.
|
|
1698
1489
|
*/
|
|
1699
|
-
|
|
1490
|
+
scale(n: number): Vector;
|
|
1700
1491
|
/**
|
|
1701
|
-
*
|
|
1702
|
-
* @
|
|
1703
|
-
* @param method The method to use for calculating the angular distance (optional, default is Haversine).
|
|
1704
|
-
* @returns The angle in degrees.
|
|
1492
|
+
* Negates the vector by scaling it by -1.
|
|
1493
|
+
* @returns A new Vector object representing the negated vector.
|
|
1705
1494
|
*/
|
|
1706
|
-
|
|
1495
|
+
negate(): Vector;
|
|
1707
1496
|
/**
|
|
1708
|
-
*
|
|
1709
|
-
* @param
|
|
1710
|
-
* @
|
|
1711
|
-
* @returns The distance between the two geodetic coordinates in kilometers.
|
|
1497
|
+
* Return the Euclidean distance between this and another Vector.
|
|
1498
|
+
* @param v The vector to calculate the distance to.
|
|
1499
|
+
* @returns The distance between the two vectors.
|
|
1712
1500
|
*/
|
|
1713
|
-
distance(
|
|
1501
|
+
distance(v: Vector): number;
|
|
1714
1502
|
/**
|
|
1715
|
-
*
|
|
1716
|
-
*
|
|
1503
|
+
* Normalizes the vector, making it a unit vector with the same direction but
|
|
1504
|
+
* a magnitude of 1. If the vector has a magnitude of 0, it returns a zero
|
|
1505
|
+
* vector of the same length.
|
|
1506
|
+
* @returns The normalized vector.
|
|
1717
1507
|
*/
|
|
1718
|
-
|
|
1508
|
+
normalize(): Vector;
|
|
1719
1509
|
/**
|
|
1720
|
-
*
|
|
1721
|
-
* @param
|
|
1722
|
-
* @
|
|
1723
|
-
* @returns A boolean indicating if the current coordinate can see the other coordinate.
|
|
1510
|
+
* Calculates the dot product of this vector and another vector.
|
|
1511
|
+
* @param v - The vector to calculate the dot product with.
|
|
1512
|
+
* @returns The dot product of the two vectors.
|
|
1724
1513
|
*/
|
|
1725
|
-
|
|
1514
|
+
dot(v: Vector): number;
|
|
1515
|
+
/**
|
|
1516
|
+
* Calculates the outer product of this vector with another vector.
|
|
1517
|
+
* @param v The vector to calculate the outer product with.
|
|
1518
|
+
* @returns A matrix representing the outer product of the two vectors.
|
|
1519
|
+
*/
|
|
1520
|
+
outer(v: Vector): Matrix;
|
|
1521
|
+
/**
|
|
1522
|
+
* Calculates the cross product of this vector and the given vector.
|
|
1523
|
+
* @param v - The vector to calculate the cross product with.
|
|
1524
|
+
* @returns The resulting vector.
|
|
1525
|
+
*/
|
|
1526
|
+
cross(v: Vector): Vector;
|
|
1527
|
+
/**
|
|
1528
|
+
* Calculate the skew-symmetric matrix for this [Vector].
|
|
1529
|
+
* @returns The skew-symmetric matrix.
|
|
1530
|
+
* @throws [Error] if the vector is not of length 3.
|
|
1531
|
+
*/
|
|
1532
|
+
skewSymmetric(): Matrix;
|
|
1533
|
+
/**
|
|
1534
|
+
* Rotates the vector around the X-axis by the specified angle.
|
|
1535
|
+
* @param theta The angle in radians.
|
|
1536
|
+
* @returns The rotated vector.
|
|
1537
|
+
*/
|
|
1538
|
+
rotX(theta: Radians): Vector;
|
|
1539
|
+
/**
|
|
1540
|
+
* Rotates the vector around the Y-axis by the specified angle.
|
|
1541
|
+
* @param theta The angle of rotation in radians.
|
|
1542
|
+
* @returns A new Vector representing the rotated vector.
|
|
1543
|
+
*/
|
|
1544
|
+
rotY(theta: Radians): Vector;
|
|
1545
|
+
/**
|
|
1546
|
+
* Rotates the vector around the Z-axis by the specified angle.
|
|
1547
|
+
* @param theta The angle of rotation in radians.
|
|
1548
|
+
* @returns A new Vector representing the rotated vector.
|
|
1549
|
+
*/
|
|
1550
|
+
rotZ(theta: Radians): Vector;
|
|
1551
|
+
/**
|
|
1552
|
+
* Calculates the angle between this vector and another vector.
|
|
1553
|
+
* @param v The other vector.
|
|
1554
|
+
* @returns The angle between the two vectors in radians.
|
|
1555
|
+
*/
|
|
1556
|
+
angle(v: Vector): Radians;
|
|
1557
|
+
/**
|
|
1558
|
+
* Calculates the angle between this vector and another vector in degrees.
|
|
1559
|
+
* @param v The other vector.
|
|
1560
|
+
* @returns The angle between the two vectors in degrees.
|
|
1561
|
+
*/
|
|
1562
|
+
angleDegrees(v: Vector): Degrees;
|
|
1563
|
+
/**
|
|
1564
|
+
* Determines if there is line of sight between this vector and another vector
|
|
1565
|
+
* within a given radius.
|
|
1566
|
+
* @param v - The vector to check line of sight with.
|
|
1567
|
+
* @param radius - The radius within which line of sight is considered.
|
|
1568
|
+
* @returns True if there is line of sight, false otherwise.
|
|
1569
|
+
*/
|
|
1570
|
+
sight(v: Vector, radius: number): boolean;
|
|
1571
|
+
/**
|
|
1572
|
+
* Returns the bisect vector between this vector and the given vector. The
|
|
1573
|
+
* bisect vector is calculated by scaling this vector's magnitude by the
|
|
1574
|
+
* magnitude of the given vector, adding the result to the product of scaling
|
|
1575
|
+
* the given vector's magnitude by this vector's magnitude, and then
|
|
1576
|
+
* normalizing the resulting vector.
|
|
1577
|
+
* @param v - The vector to calculate the bisect with.
|
|
1578
|
+
* @returns The bisect vector.
|
|
1579
|
+
*/
|
|
1580
|
+
bisect(v: Vector): Vector;
|
|
1581
|
+
/**
|
|
1582
|
+
* Joins the current vector with another vector.
|
|
1583
|
+
* @param v The vector to join with.
|
|
1584
|
+
* @returns A new vector that contains the elements of both vectors.
|
|
1585
|
+
*/
|
|
1586
|
+
join(v: Vector): Vector;
|
|
1587
|
+
/**
|
|
1588
|
+
* Returns a new Vector containing a portion of the elements from the
|
|
1589
|
+
* specified start index to the specified end index
|
|
1590
|
+
* @param start The start index of the slice (inclusive).
|
|
1591
|
+
* @param end The end index of the slice (exclusive).
|
|
1592
|
+
* @returns A new Vector containing the sliced elements.
|
|
1593
|
+
*/
|
|
1594
|
+
slice(start: number, end: number): Vector;
|
|
1595
|
+
/**
|
|
1596
|
+
* Returns a new Matrix object representing the row vector.
|
|
1597
|
+
* @returns The row vector as a Matrix object.
|
|
1598
|
+
*/
|
|
1599
|
+
row(): Matrix;
|
|
1600
|
+
/**
|
|
1601
|
+
* Returns a new Matrix object representing the column vector of this Vector.
|
|
1602
|
+
* @returns The column vector as a Matrix object.
|
|
1603
|
+
*/
|
|
1604
|
+
column(): Matrix;
|
|
1605
|
+
/**
|
|
1606
|
+
* Converts the elements at the specified index to a Vector3D object.
|
|
1607
|
+
* @param index - The index of the elements to convert.
|
|
1608
|
+
* @returns A new Vector3D object containing the converted elements.
|
|
1609
|
+
*/
|
|
1610
|
+
toVector3D(index: number): Vector3D;
|
|
1726
1611
|
}
|
|
1727
1612
|
|
|
1728
1613
|
/**
|
|
@@ -1749,104 +1634,164 @@ declare class Geodetic {
|
|
|
1749
1634
|
*/
|
|
1750
1635
|
|
|
1751
1636
|
/**
|
|
1752
|
-
* A
|
|
1637
|
+
* A matrix is a rectangular array of numbers or other mathematical objects for
|
|
1638
|
+
* which operations such as addition and multiplication are defined.
|
|
1753
1639
|
*/
|
|
1754
|
-
declare
|
|
1755
|
-
|
|
1640
|
+
declare class Matrix {
|
|
1641
|
+
elements: number[][];
|
|
1642
|
+
readonly rows: number;
|
|
1643
|
+
readonly columns: number;
|
|
1644
|
+
constructor(elements: number[][]);
|
|
1756
1645
|
/**
|
|
1757
|
-
* Creates a
|
|
1758
|
-
* @param
|
|
1759
|
-
* @
|
|
1646
|
+
* Creates a matrix with all elements set to zero.
|
|
1647
|
+
* @param rows - The number of rows in the matrix.
|
|
1648
|
+
* @param columns - The number of columns in the matrix.
|
|
1649
|
+
* @returns A matrix with all elements set to zero.
|
|
1760
1650
|
*/
|
|
1761
|
-
static
|
|
1762
|
-
tle1: TleLine1;
|
|
1763
|
-
tle2: TleLine2;
|
|
1764
|
-
};
|
|
1651
|
+
static allZeros(rows: number, columns: number): Matrix;
|
|
1765
1652
|
/**
|
|
1766
|
-
*
|
|
1767
|
-
*
|
|
1768
|
-
* @
|
|
1769
|
-
* @
|
|
1770
|
-
|
|
1771
|
-
|
|
1653
|
+
* Creates a new Matrix with the specified number of rows and columns, filled
|
|
1654
|
+
* with the specified value.
|
|
1655
|
+
* @param rows The number of rows in the matrix.
|
|
1656
|
+
* @param columns The number of columns in the matrix.
|
|
1657
|
+
* @param value The value to fill the matrix with. Default is 0.0.
|
|
1658
|
+
* @returns A new Matrix filled with the specified value.
|
|
1659
|
+
*/
|
|
1660
|
+
static fill(rows: number, columns: number, value?: number): Matrix;
|
|
1772
1661
|
/**
|
|
1773
|
-
*
|
|
1774
|
-
* @param
|
|
1775
|
-
* @returns The
|
|
1776
|
-
* @throws Error if the length of the eccentricity string is not 7.
|
|
1662
|
+
* Creates a rotation matrix around the X-axis.
|
|
1663
|
+
* @param theta - The angle of rotation in radians.
|
|
1664
|
+
* @returns The rotation matrix.
|
|
1777
1665
|
*/
|
|
1778
|
-
static
|
|
1666
|
+
static rotX(theta: Radians): Matrix;
|
|
1779
1667
|
/**
|
|
1780
|
-
*
|
|
1781
|
-
* @param
|
|
1782
|
-
* @returns The
|
|
1783
|
-
* @throws Error if the length of the converted value is not 8.
|
|
1668
|
+
* Creates a rotation matrix around the y-axis.
|
|
1669
|
+
* @param theta - The angle of rotation in radians.
|
|
1670
|
+
* @returns The rotation matrix.
|
|
1784
1671
|
*/
|
|
1785
|
-
static
|
|
1672
|
+
static rotY(theta: Radians): Matrix;
|
|
1786
1673
|
/**
|
|
1787
|
-
*
|
|
1788
|
-
* @param
|
|
1789
|
-
* @returns The
|
|
1790
|
-
* @throws Error if the length of the mean anomaly is not 8.
|
|
1674
|
+
* Creates a rotation matrix around the Z-axis.
|
|
1675
|
+
* @param theta The angle of rotation in radians.
|
|
1676
|
+
* @returns The rotation matrix.
|
|
1791
1677
|
*/
|
|
1792
|
-
static
|
|
1678
|
+
static rotZ(theta: Radians): Matrix;
|
|
1793
1679
|
/**
|
|
1794
|
-
*
|
|
1795
|
-
*
|
|
1796
|
-
*
|
|
1797
|
-
*
|
|
1798
|
-
* ensure a length of 11 characters. Throws an error if the resulting string
|
|
1799
|
-
* does not have a length of 11 characters.
|
|
1800
|
-
* @param meanmo - The mean motion value to be converted.
|
|
1801
|
-
* @returns The string representation of the mean motion value with 8 decimal
|
|
1802
|
-
* places and padded with leading zeros.
|
|
1803
|
-
* @throws Error if the resulting string does not have a length of 11
|
|
1804
|
-
* characters.
|
|
1680
|
+
* Creates a zero matrix with the specified number of rows and columns.
|
|
1681
|
+
* @param rows The number of rows in the matrix.
|
|
1682
|
+
* @param columns The number of columns in the matrix.
|
|
1683
|
+
* @returns A new Matrix object representing the zero matrix.
|
|
1805
1684
|
*/
|
|
1806
|
-
static
|
|
1685
|
+
static zero(rows: number, columns: number): Matrix;
|
|
1807
1686
|
/**
|
|
1808
|
-
*
|
|
1809
|
-
* @param
|
|
1810
|
-
* @returns The
|
|
1811
|
-
* @throws Error if the length of the converted right ascension is not 8.
|
|
1687
|
+
* Creates an identity matrix of the specified dimension.
|
|
1688
|
+
* @param dimension The dimension of the identity matrix.
|
|
1689
|
+
* @returns The identity matrix.
|
|
1812
1690
|
*/
|
|
1813
|
-
static
|
|
1691
|
+
static identity(dimension: number): Matrix;
|
|
1814
1692
|
/**
|
|
1815
|
-
*
|
|
1816
|
-
* @param
|
|
1817
|
-
* @
|
|
1818
|
-
* @param chr - The character to set at the specified index.
|
|
1819
|
-
* @returns The modified string with the character set at the specified index.
|
|
1693
|
+
* Creates a diagonal matrix with the given diagonal elements.
|
|
1694
|
+
* @param d - An array of diagonal elements.
|
|
1695
|
+
* @returns A new Matrix object representing the diagonal matrix.
|
|
1820
1696
|
*/
|
|
1821
|
-
static
|
|
1697
|
+
static diagonal(d: number[]): Matrix;
|
|
1822
1698
|
/**
|
|
1823
|
-
*
|
|
1824
|
-
*
|
|
1825
|
-
* @
|
|
1826
|
-
* @returns Formatted 10-character string
|
|
1699
|
+
* Adds the elements of another matrix to this matrix and returns the result.
|
|
1700
|
+
* @param m - The matrix to be added.
|
|
1701
|
+
* @returns The resulting matrix after addition.
|
|
1827
1702
|
*/
|
|
1828
|
-
|
|
1703
|
+
add(m: Matrix): Matrix;
|
|
1829
1704
|
/**
|
|
1830
|
-
*
|
|
1831
|
-
*
|
|
1832
|
-
*
|
|
1833
|
-
* @param value - The value to format
|
|
1834
|
-
* @returns Formatted 8-character string
|
|
1705
|
+
* Subtracts the elements of another matrix from this matrix.
|
|
1706
|
+
* @param m - The matrix to subtract.
|
|
1707
|
+
* @returns A new matrix containing the result of the subtraction.
|
|
1835
1708
|
*/
|
|
1836
|
-
|
|
1709
|
+
subtract(m: Matrix): Matrix;
|
|
1837
1710
|
/**
|
|
1838
|
-
*
|
|
1839
|
-
* @param
|
|
1840
|
-
* @returns
|
|
1711
|
+
* Scales the matrix by multiplying each element by a scalar value.
|
|
1712
|
+
* @param n - The scalar value to multiply each element by.
|
|
1713
|
+
* @returns A new Matrix object representing the scaled matrix.
|
|
1841
1714
|
*/
|
|
1842
|
-
|
|
1715
|
+
scale(n: number): Matrix;
|
|
1716
|
+
/**
|
|
1717
|
+
* Negates the matrix by scaling it by -1.
|
|
1718
|
+
* @returns The negated matrix.
|
|
1719
|
+
*/
|
|
1720
|
+
negate(): Matrix;
|
|
1721
|
+
/**
|
|
1722
|
+
* Multiplies this matrix with another matrix.
|
|
1723
|
+
* @param m The matrix to multiply with.
|
|
1724
|
+
* @returns The resulting matrix.
|
|
1725
|
+
*/
|
|
1726
|
+
multiply(m: Matrix): Matrix;
|
|
1727
|
+
/**
|
|
1728
|
+
* Computes the outer product of this matrix with another matrix.
|
|
1729
|
+
* @param m - The matrix to compute the outer product with.
|
|
1730
|
+
* @returns The resulting matrix.
|
|
1731
|
+
*/
|
|
1732
|
+
outerProduct(m: Matrix): Matrix;
|
|
1733
|
+
/**
|
|
1734
|
+
* Multiplies the matrix by a vector.
|
|
1735
|
+
* @param v The vector to multiply by.
|
|
1736
|
+
* @returns A new vector representing the result of the multiplication.
|
|
1737
|
+
*/
|
|
1738
|
+
multiplyVector(v: Vector): Vector;
|
|
1739
|
+
/**
|
|
1740
|
+
* Multiplies a 3D vector by the matrix.
|
|
1741
|
+
* @template T - The type of the vector elements.
|
|
1742
|
+
* @param v - The 3D vector to multiply.
|
|
1743
|
+
* @returns The resulting 3D vector after multiplication.
|
|
1744
|
+
*/
|
|
1745
|
+
multiplyVector3D<T extends number>(v: Vector3D<T>): Vector3D<T>;
|
|
1746
|
+
/**
|
|
1747
|
+
* Returns a new Matrix object where each element is the reciprocal of the
|
|
1748
|
+
* corresponding element in the current matrix. If an element in the current
|
|
1749
|
+
* matrix is zero, the corresponding element in the output matrix will also be
|
|
1750
|
+
* zero.
|
|
1751
|
+
* @returns A new Matrix object representing the reciprocal of the current
|
|
1752
|
+
* matrix.
|
|
1753
|
+
*/
|
|
1754
|
+
reciprocal(): Matrix;
|
|
1755
|
+
/**
|
|
1756
|
+
* Transposes the matrix by swapping rows with columns.
|
|
1757
|
+
* @returns A new Matrix object representing the transposed matrix.
|
|
1758
|
+
*/
|
|
1759
|
+
transpose(): Matrix;
|
|
1760
|
+
/**
|
|
1761
|
+
* Performs the Cholesky decomposition on the matrix.
|
|
1762
|
+
* @returns A new Matrix object representing the Cholesky decomposition of the
|
|
1763
|
+
* original matrix.
|
|
1764
|
+
*/
|
|
1765
|
+
cholesky(): Matrix;
|
|
1766
|
+
/**
|
|
1767
|
+
* Swaps two rows in the matrix.
|
|
1768
|
+
* @param i - The index of the first row.
|
|
1769
|
+
* @param j - The index of the second row.
|
|
1770
|
+
*/
|
|
1771
|
+
private _swapRows;
|
|
1772
|
+
/**
|
|
1773
|
+
* Converts the matrix to reduced row echelon form using the Gaussian
|
|
1774
|
+
* elimination method. This method modifies the matrix in-place.
|
|
1775
|
+
*/
|
|
1776
|
+
private toReducedRowEchelonForm_;
|
|
1777
|
+
/**
|
|
1778
|
+
* Calculates the inverse of the matrix.
|
|
1779
|
+
* @returns The inverse of the matrix.
|
|
1780
|
+
*/
|
|
1781
|
+
inverse(): Matrix;
|
|
1843
1782
|
}
|
|
1844
1783
|
|
|
1845
1784
|
/**
|
|
1846
1785
|
* @author Theodore Kruczek
|
|
1786
|
+
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
1787
|
+
* with satellites and other orbital objects.
|
|
1847
1788
|
* @license AGPL-3.0-or-later
|
|
1848
1789
|
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
1849
1790
|
*
|
|
1791
|
+
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
1792
|
+
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
1793
|
+
* is licensed under the MIT license.
|
|
1794
|
+
*
|
|
1850
1795
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
1851
1796
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
1852
1797
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
@@ -1859,21 +1804,73 @@ declare abstract class FormatTle {
|
|
|
1859
1804
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
1860
1805
|
*/
|
|
1861
1806
|
|
|
1862
|
-
declare
|
|
1807
|
+
declare class Vector3D<T extends number = number> {
|
|
1808
|
+
x: T;
|
|
1809
|
+
y: T;
|
|
1810
|
+
z: T;
|
|
1811
|
+
constructor(x: T, y: T, z: T);
|
|
1863
1812
|
/**
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
1866
|
-
* @param
|
|
1867
|
-
* @
|
|
1813
|
+
* Create a new Vector3D object from the first three elements of a Vector
|
|
1814
|
+
* object.
|
|
1815
|
+
* @param v The Vector object to convert.
|
|
1816
|
+
* @returns A new Vector3D object.
|
|
1868
1817
|
*/
|
|
1869
|
-
|
|
1818
|
+
static fromVector<U extends number>(v: Vector<U>): Vector3D<U>;
|
|
1819
|
+
static readonly origin: Vector3D<number>;
|
|
1820
|
+
static readonly xAxis: Vector3D<number>;
|
|
1821
|
+
static readonly yAxis: Vector3D<number>;
|
|
1822
|
+
static readonly zAxis: Vector3D<number>;
|
|
1823
|
+
static readonly xAxisNeg: Vector3D<number>;
|
|
1824
|
+
static readonly yAxisNeg: Vector3D<number>;
|
|
1825
|
+
static readonly zAxisNeg: Vector3D<number>;
|
|
1826
|
+
toList(): T[];
|
|
1827
|
+
toArray(): Float64Array<ArrayBuffer>;
|
|
1828
|
+
toVector(): Vector<T>;
|
|
1829
|
+
toString(fixed?: number): string;
|
|
1830
|
+
magnitude(): T;
|
|
1831
|
+
add(v: Vector3D<T>): Vector3D<T>;
|
|
1832
|
+
subtract(v: Vector3D<T>): Vector3D<T>;
|
|
1833
|
+
scale<U extends number>(n: U): Vector3D<U>;
|
|
1834
|
+
negate(): Vector3D<T>;
|
|
1835
|
+
/**
|
|
1836
|
+
* Return the Euclidean distance between this and another Vector3D.
|
|
1837
|
+
* @param v The other Vector3D.
|
|
1838
|
+
* @returns The distance between this and the other Vector3D.
|
|
1839
|
+
*/
|
|
1840
|
+
distance(v: Vector3D<T>): T;
|
|
1841
|
+
/**
|
|
1842
|
+
* Convert this to a unit Vector3D.
|
|
1843
|
+
* @returns A unit Vector3D.
|
|
1844
|
+
*/
|
|
1845
|
+
normalize(): Vector3D<T>;
|
|
1846
|
+
dot<T extends number>(v: Vector3D<T>): T;
|
|
1847
|
+
outer(v: Vector3D): Matrix;
|
|
1848
|
+
cross<U extends number>(v: Vector3D<U>): Vector3D<U>;
|
|
1849
|
+
skewSymmetric(): Matrix;
|
|
1850
|
+
rotX(theta: number): Vector3D;
|
|
1851
|
+
rotY(theta: Radians): Vector3D<T>;
|
|
1852
|
+
rotZ(theta: Radians): Vector3D<T>;
|
|
1853
|
+
angle<U extends number>(v: Vector3D<U>): Radians;
|
|
1854
|
+
angleDegrees(v: Vector3D<T>): number;
|
|
1855
|
+
sight(v: Vector3D<KilometersPerSecond>, radius: Kilometers): boolean;
|
|
1856
|
+
bisect(v: Vector3D<T>): Vector3D<T>;
|
|
1857
|
+
row(): Matrix;
|
|
1858
|
+
column(): Matrix;
|
|
1859
|
+
join(v: Vector3D): Vector;
|
|
1860
|
+
static readonly zero: Vector3D<number>;
|
|
1870
1861
|
}
|
|
1871
1862
|
|
|
1872
1863
|
/**
|
|
1873
1864
|
* @author Theodore Kruczek
|
|
1865
|
+
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
1866
|
+
* with satellites and other orbital objects.
|
|
1874
1867
|
* @license AGPL-3.0-or-later
|
|
1875
1868
|
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
1876
1869
|
*
|
|
1870
|
+
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
1871
|
+
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
1872
|
+
* is licensed under the MIT license.
|
|
1873
|
+
*
|
|
1877
1874
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
1878
1875
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
1879
1876
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
@@ -1886,78 +1883,191 @@ declare abstract class Force {
|
|
|
1886
1883
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
1887
1884
|
*/
|
|
1888
1885
|
|
|
1889
|
-
declare class Thrust implements Force {
|
|
1890
|
-
center: EpochUTC;
|
|
1891
|
-
radial: MetersPerSecond;
|
|
1892
|
-
intrack: MetersPerSecond;
|
|
1893
|
-
crosstrack: MetersPerSecond;
|
|
1894
|
-
durationRate: SecondsPerMeterPerSecond;
|
|
1895
|
-
constructor(center: EpochUTC, radial: MetersPerSecond, intrack: MetersPerSecond, crosstrack: MetersPerSecond, durationRate?: SecondsPerMeterPerSecond);
|
|
1896
|
-
deltaV: Vector3D<KilometersPerSecond>;
|
|
1897
|
-
get magnitude(): MetersPerSecond;
|
|
1898
|
-
get duration(): Seconds;
|
|
1899
|
-
get start(): EpochUTC;
|
|
1900
|
-
get stop(): EpochUTC;
|
|
1901
|
-
acceleration(state: J2000): Vector3D;
|
|
1902
|
-
apply(state: J2000): J2000;
|
|
1903
|
-
get isImpulsive(): boolean;
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
1886
|
/**
|
|
1907
|
-
*
|
|
1908
|
-
*
|
|
1909
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
1910
|
-
*
|
|
1911
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
1912
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
1913
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
1914
|
-
*
|
|
1915
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
1916
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
1917
|
-
* See the GNU Affero General Public License for more details.
|
|
1918
|
-
*
|
|
1919
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
1920
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
1887
|
+
* A state vector is a set of coordinates used to specify the position and
|
|
1888
|
+
* velocity of an object in a particular reference frame.
|
|
1921
1889
|
*/
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1890
|
+
declare abstract class StateVector {
|
|
1891
|
+
epoch: EpochUTC;
|
|
1892
|
+
position: Vector3D<Kilometers>;
|
|
1893
|
+
velocity: Vector3D<KilometersPerSecond>;
|
|
1894
|
+
constructor(epoch: EpochUTC, position: Vector3D<Kilometers>, velocity: Vector3D<KilometersPerSecond>);
|
|
1895
|
+
/**
|
|
1896
|
+
* The name of the reference frame in which the state vector is defined.
|
|
1897
|
+
* @returns The name of the reference frame.
|
|
1898
|
+
*/
|
|
1899
|
+
abstract get name(): string;
|
|
1900
|
+
/**
|
|
1901
|
+
* Whether the state vector is defined in an inertial reference frame.
|
|
1902
|
+
* @returns True if the state vector is defined in an inertial reference
|
|
1903
|
+
*/
|
|
1904
|
+
abstract get inertial(): boolean;
|
|
1905
|
+
/**
|
|
1906
|
+
* Returns a string representation of the StateVector object. The string includes the name, epoch, position, and
|
|
1907
|
+
* velocity.
|
|
1908
|
+
* @returns A string representation of the StateVector object.
|
|
1909
|
+
*/
|
|
1910
|
+
toString(): string;
|
|
1911
|
+
/**
|
|
1912
|
+
* Calculates the mechanical energy of the state vector.
|
|
1913
|
+
* @returns The mechanical energy value.
|
|
1914
|
+
*/
|
|
1915
|
+
get mechanicalEnergy(): number;
|
|
1916
|
+
/**
|
|
1917
|
+
* Calculates the semimajor axis of the state vector.
|
|
1918
|
+
* @returns The semimajor axis in kilometers.
|
|
1919
|
+
*/
|
|
1920
|
+
get semimajorAxis(): Kilometers;
|
|
1921
|
+
/**
|
|
1922
|
+
* Gets the period of the state vector in minutes.
|
|
1923
|
+
* @returns The period in minutes.
|
|
1924
|
+
*/
|
|
1925
|
+
get period(): Minutes;
|
|
1926
|
+
/**
|
|
1927
|
+
* Gets the angular rate of the state vector.
|
|
1928
|
+
* @returns The angular rate.
|
|
1929
|
+
*/
|
|
1930
|
+
get angularRate(): number;
|
|
1931
|
+
/**
|
|
1932
|
+
* Converts the state vector to classical elements.
|
|
1933
|
+
* @param mu The gravitational parameter of the celestial body. Defaults to Earth's gravitational parameter.
|
|
1934
|
+
* @returns The classical elements corresponding to the state vector.
|
|
1935
|
+
* @throws Error if classical elements are undefined for fixed frames.
|
|
1936
|
+
*/
|
|
1937
|
+
toClassicalElements(mu?: number): ClassicalElements;
|
|
1927
1938
|
}
|
|
1928
|
-
|
|
1929
1939
|
/**
|
|
1930
|
-
*
|
|
1931
|
-
*
|
|
1932
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
1940
|
+
* Represents a position and velocity in the J2000 coordinate system. This is an Earth-centered inertial (ECI)
|
|
1941
|
+
* coordinate system.
|
|
1933
1942
|
*
|
|
1934
|
-
*
|
|
1935
|
-
*
|
|
1936
|
-
*
|
|
1943
|
+
* Commonly used ECI frame is defined with the Earth's Mean Equator and Mean Equinox (MEME) at 12:00 Terrestrial Time on
|
|
1944
|
+
* 1 January 2000. It can be referred to as J2K, J2000 or EME2000. The x-axis is aligned with the mean vernal equinox.
|
|
1945
|
+
* The z-axis is aligned with the Earth's rotation axis (or equivalently, the celestial North Pole) as it was at that
|
|
1946
|
+
* time. The y-axis is rotated by 90° East about the celestial equator.
|
|
1947
|
+
* @see https://en.wikipedia.org/wiki/Earth-centered_inertial
|
|
1948
|
+
*/
|
|
1949
|
+
declare class J2000 extends StateVector {
|
|
1950
|
+
/**
|
|
1951
|
+
* Creates a J2000 coordinate from classical elements.
|
|
1952
|
+
* @param elements The classical elements.
|
|
1953
|
+
* @returns The J2000 coordinate.
|
|
1954
|
+
*/
|
|
1955
|
+
static fromClassicalElements(elements: ClassicalElements): J2000;
|
|
1956
|
+
/**
|
|
1957
|
+
* Gets the name of the coordinate system.
|
|
1958
|
+
* @returns The name of the coordinate system.
|
|
1959
|
+
*/
|
|
1960
|
+
get name(): string;
|
|
1961
|
+
/**
|
|
1962
|
+
* Gets a value indicating whether the coordinate system is inertial.
|
|
1963
|
+
* @returns A boolean value indicating whether the coordinate system is inertial.
|
|
1964
|
+
*/
|
|
1965
|
+
get inertial(): boolean;
|
|
1966
|
+
/**
|
|
1967
|
+
* Converts the coordinates from J2000 to the International Terrestrial Reference Frame (ITRF).
|
|
1968
|
+
* This is an ECI to ECEF transformation.
|
|
1969
|
+
* @returns The ITRF coordinates.
|
|
1970
|
+
*/
|
|
1971
|
+
toITRF(): ITRF;
|
|
1972
|
+
/**
|
|
1973
|
+
* Converts the J2000 coordinate to the TEME coordinate.
|
|
1974
|
+
* @returns The TEME coordinate.
|
|
1975
|
+
*/
|
|
1976
|
+
toTEME(): TEME;
|
|
1977
|
+
}
|
|
1978
|
+
/**
|
|
1979
|
+
* The International Terrestrial Reference Frame (ITRF) is a geocentric reference frame for the Earth. It is the
|
|
1980
|
+
* successor to the International Terrestrial Reference System (ITRS). The ITRF definition is maintained by the
|
|
1981
|
+
* International Earth Rotation and Reference Systems Service (IERS). Several versions of ITRF exist, each with a
|
|
1982
|
+
* different epoch, to address the issue of crustal motion. The latest version is ITRF2014, based on data collected from
|
|
1983
|
+
* 1980 to 2014.
|
|
1984
|
+
* @see https://en.wikipedia.org/wiki/International_Terrestrial_Reference_Frame
|
|
1937
1985
|
*
|
|
1938
|
-
*
|
|
1939
|
-
*
|
|
1940
|
-
*
|
|
1986
|
+
* This is a geocentric coordinate system, also referenced as ECF/ECEF (Earth Centered Earth Fixed). It is a Cartesian
|
|
1987
|
+
* coordinate system with the origin at the center of the Earth. The x-axis intersects the sphere of the Earth at 0°
|
|
1988
|
+
* latitude (the equator) and 0° longitude (the Prime Meridian). The z-axis goes through the North Pole. The y-axis goes
|
|
1989
|
+
* through 90° East longitude.
|
|
1990
|
+
* @see https://en.wikipedia.org/wiki/Earth-centered,_Earth-fixed_coordinate_system
|
|
1991
|
+
*/
|
|
1992
|
+
declare class ITRF extends StateVector {
|
|
1993
|
+
/**
|
|
1994
|
+
* Gets the name of the ITRF coordinate system.
|
|
1995
|
+
* @returns The name of the coordinate system.
|
|
1996
|
+
*/
|
|
1997
|
+
get name(): string;
|
|
1998
|
+
/**
|
|
1999
|
+
* Gets a value indicating whether the coordinate system is inertial.
|
|
2000
|
+
* @returns A boolean value indicating whether the coordinate system is inertial.
|
|
2001
|
+
*/
|
|
2002
|
+
get inertial(): boolean;
|
|
2003
|
+
/**
|
|
2004
|
+
* Gets the height of the ITRF coordinate above the surface of the Earth in kilometers.
|
|
2005
|
+
* @returns The height in kilometers.
|
|
2006
|
+
*/
|
|
2007
|
+
get height(): Kilometers;
|
|
2008
|
+
/**
|
|
2009
|
+
* Gets the altitude in kilometers.
|
|
2010
|
+
* @returns The altitude in kilometers.
|
|
2011
|
+
*/
|
|
2012
|
+
get alt(): Kilometers;
|
|
2013
|
+
/**
|
|
2014
|
+
* Converts the current coordinate to the J2000 coordinate system. This is an Earth-Centered Inertial (ECI) coordinate
|
|
2015
|
+
* system with the origin at the center of the Earth.
|
|
2016
|
+
* @see https://en.wikipedia.org/wiki/Epoch_(astronomy)#Julian_years_and_J2000
|
|
2017
|
+
* @returns The coordinate in the J2000 coordinate system.
|
|
2018
|
+
*/
|
|
2019
|
+
toJ2000(): J2000;
|
|
2020
|
+
/**
|
|
2021
|
+
* Converts the current ITRF coordinate to Geodetic coordinate. This is a coordinate system for latitude, longitude,
|
|
2022
|
+
* and altitude.
|
|
2023
|
+
* @returns The converted Geodetic coordinate.
|
|
2024
|
+
*/
|
|
2025
|
+
toGeodetic(): Geodetic;
|
|
2026
|
+
}
|
|
2027
|
+
/**
|
|
2028
|
+
* True Equator Mean Equinox (TEME) is a coordinate system commonly used in satellite tracking and orbit prediction. It
|
|
2029
|
+
* is a reference frame that defines the position and orientation of an object relative to the Earth's equator and
|
|
2030
|
+
* equinox.
|
|
1941
2031
|
*
|
|
1942
|
-
*
|
|
1943
|
-
*
|
|
2032
|
+
* By using the True Equator Mean Equinox (TEME) coordinate system, we can accurately describe the position and motion
|
|
2033
|
+
* of satellites relative to the Earth's equator and equinox. This is particularly useful for tracking and predicting
|
|
2034
|
+
* satellite orbits in various applications, such as satellite communication, navigation, and remote sensing.
|
|
1944
2035
|
*/
|
|
1945
|
-
|
|
1946
|
-
declare abstract class StateInterpolator extends Interpolator {
|
|
2036
|
+
declare class TEME extends StateVector {
|
|
1947
2037
|
/**
|
|
1948
|
-
*
|
|
1949
|
-
* @
|
|
1950
|
-
* @throws If the interpolator has not been initialized.
|
|
2038
|
+
* Gets the name of the coordinate system.
|
|
2039
|
+
* @returns The name of the coordinate system.
|
|
1951
2040
|
*/
|
|
1952
|
-
|
|
1953
|
-
|
|
2041
|
+
get name(): string;
|
|
2042
|
+
/**
|
|
2043
|
+
* Gets a value indicating whether the coordinate is inertial.
|
|
2044
|
+
* @returns A boolean value indicating whether the coordinate is inertial.
|
|
2045
|
+
*/
|
|
2046
|
+
get inertial(): boolean;
|
|
2047
|
+
/**
|
|
2048
|
+
* Creates a TEME (True Equator Mean Equinox) object from classical orbital elements.
|
|
2049
|
+
* @param elements - The classical orbital elements.
|
|
2050
|
+
* @returns A new TEME object.
|
|
2051
|
+
*/
|
|
2052
|
+
static fromClassicalElements(elements: ClassicalElements): TEME;
|
|
2053
|
+
/**
|
|
2054
|
+
* Converts the TEME (True Equator Mean Equinox) coordinates to J2000 coordinates.
|
|
2055
|
+
* @returns The J2000 coordinates.
|
|
2056
|
+
*/
|
|
2057
|
+
toJ2000(): J2000;
|
|
1954
2058
|
}
|
|
1955
2059
|
|
|
1956
2060
|
/**
|
|
1957
2061
|
* @author Theodore Kruczek
|
|
2062
|
+
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
2063
|
+
* with satellites and other orbital objects.
|
|
1958
2064
|
* @license AGPL-3.0-or-later
|
|
1959
2065
|
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
1960
2066
|
*
|
|
2067
|
+
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
2068
|
+
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
2069
|
+
* is licensed under the MIT license.
|
|
2070
|
+
*
|
|
1961
2071
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
1962
2072
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
1963
2073
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
@@ -1970,32 +2080,12 @@ declare abstract class StateInterpolator extends Interpolator {
|
|
|
1970
2080
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
1971
2081
|
*/
|
|
1972
2082
|
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
setGravity(mu?: number): this;
|
|
1980
|
-
setEarthGravity(degree: number, order: number): void;
|
|
1981
|
-
setThirdBodyGravity({ moon, sun }: {
|
|
1982
|
-
moon?: boolean | undefined;
|
|
1983
|
-
sun?: boolean | undefined;
|
|
1984
|
-
}): void;
|
|
1985
|
-
setSolarRadiationPressure(mass: number, area: number, coeff?: number): void;
|
|
1986
|
-
/**
|
|
1987
|
-
* Sets the atmospheric drag for the force model.
|
|
1988
|
-
* @deprecated This is still a work in progress!
|
|
1989
|
-
* @param mass - The mass of the object.
|
|
1990
|
-
* @param area - The cross-sectional area of the object.
|
|
1991
|
-
* @param coeff - The drag coefficient. Default value is 2.2.
|
|
1992
|
-
* @param cosine - The cosine of the angle between the object's velocity vector and the drag force vector.
|
|
1993
|
-
*/
|
|
1994
|
-
setAtmosphericDrag(mass: number, area: number, coeff?: number, cosine?: number): void;
|
|
1995
|
-
loadManeuver(maneuver: Thrust): void;
|
|
1996
|
-
clearManeuver(): void;
|
|
1997
|
-
acceleration(state: J2000): Vector3D;
|
|
1998
|
-
derivative(state: J2000): Vector;
|
|
2083
|
+
interface BaseObjectParams {
|
|
2084
|
+
id?: number;
|
|
2085
|
+
name?: string;
|
|
2086
|
+
type?: SpaceObjectType;
|
|
2087
|
+
active?: boolean;
|
|
2088
|
+
metadata?: Record<string, unknown>;
|
|
1999
2089
|
}
|
|
2000
2090
|
|
|
2001
2091
|
/**
|
|
@@ -2014,77 +2104,90 @@ declare class ForceModel {
|
|
|
2014
2104
|
* You should have received a copy of the GNU Affero General Public License along with
|
|
2015
2105
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2016
2106
|
*/
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
*
|
|
2046
|
-
*
|
|
2047
|
-
* @
|
|
2107
|
+
/**
|
|
2108
|
+
* Configuration options for history tracking.
|
|
2109
|
+
*/
|
|
2110
|
+
interface HistoryConfig {
|
|
2111
|
+
/** Maximum number of entries to store. Undefined means unlimited. */
|
|
2112
|
+
maxLength?: number;
|
|
2113
|
+
/** Minimum time between samples in milliseconds. */
|
|
2114
|
+
samplingInterval?: number;
|
|
2115
|
+
/** If true, automatically removes oldest entries when maxLength is reached. */
|
|
2116
|
+
autoClean?: boolean;
|
|
2117
|
+
}
|
|
2118
|
+
/**
|
|
2119
|
+
* A single entry in the history.
|
|
2120
|
+
*/
|
|
2121
|
+
interface HistoryEntry<T> {
|
|
2122
|
+
time: Date;
|
|
2123
|
+
data: T;
|
|
2124
|
+
}
|
|
2125
|
+
/**
|
|
2126
|
+
* Generic history tracking class for storing time-stamped data.
|
|
2127
|
+
* Used to track object state over time for visualization and analysis.
|
|
2128
|
+
*/
|
|
2129
|
+
declare class History<T> {
|
|
2130
|
+
private entries_;
|
|
2131
|
+
private config_;
|
|
2132
|
+
private lastSampleTime_;
|
|
2133
|
+
constructor(config?: HistoryConfig);
|
|
2134
|
+
/**
|
|
2135
|
+
* Adds a new entry to the history.
|
|
2136
|
+
* Respects sampling interval and max length constraints.
|
|
2137
|
+
* @param time - The timestamp for this entry
|
|
2138
|
+
* @param data - The data to store
|
|
2048
2139
|
*/
|
|
2049
|
-
|
|
2140
|
+
add(time: Date, data: T): void;
|
|
2050
2141
|
/**
|
|
2051
|
-
*
|
|
2052
|
-
* [interceptor] state, [pivot] epoch for the first burn to arrive at the
|
|
2053
|
-
* first waypoint, and [target] ephemeris interpolator.
|
|
2054
|
-
*
|
|
2055
|
-
* Optional arguments are as follows:
|
|
2056
|
-
* - `preManeuvers`: maneuvers to execute before the pivot burn
|
|
2057
|
-
* - `postManeuvers`: maneuvers to execute after the last pivot burn
|
|
2058
|
-
* - `durationRate`: thruster duration rate _(s/m/s)_
|
|
2059
|
-
* - `forceModel`: interceptor force model, defaults to two-body
|
|
2060
|
-
* - `refine`: refine maneuvers to account for perturbations if `true`
|
|
2061
|
-
* - `maxIter`: maximum refinement iterations per maneuver
|
|
2062
|
-
* - `printIter`: print debug information on each refinement iteration
|
|
2063
|
-
* @param interceptor The interceptor state.
|
|
2064
|
-
* @param pivot The epoch of the first burn.
|
|
2065
|
-
* @param waypoints The waypoints to target.
|
|
2066
|
-
* @param target The target interpolator.
|
|
2067
|
-
* @param preManeuvers The maneuvers to execute before the pivot burn.
|
|
2068
|
-
* @param postManeuvers The maneuvers to execute after the last pivot burn.
|
|
2069
|
-
* @param root0 The optional arguments.
|
|
2070
|
-
* @param root0.durationRate The thruster duration rate.
|
|
2071
|
-
* @param root0.forceModel The interceptor force model.
|
|
2072
|
-
* @param root0.refine Whether to refine maneuvers to account for perturbations.
|
|
2073
|
-
* @param root0.maxIter The maximum refinement iterations per maneuver.
|
|
2074
|
-
* @param root0.printIter Whether to print debug information on each refinement iteration.
|
|
2075
|
-
* @returns An array of maneuvers.
|
|
2142
|
+
* Returns all history entries.
|
|
2076
2143
|
*/
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2144
|
+
getAll(): HistoryEntry<T>[];
|
|
2145
|
+
/**
|
|
2146
|
+
* Returns entries within a time range (inclusive).
|
|
2147
|
+
* @param start - Start of the time range
|
|
2148
|
+
* @param end - End of the time range
|
|
2149
|
+
*/
|
|
2150
|
+
getRange(start: Date, end: Date): HistoryEntry<T>[];
|
|
2151
|
+
/**
|
|
2152
|
+
* Returns the last n entries.
|
|
2153
|
+
* @param n - Number of entries to return
|
|
2154
|
+
*/
|
|
2155
|
+
getLast(n: number): HistoryEntry<T>[];
|
|
2156
|
+
/**
|
|
2157
|
+
* Returns the first entry, or undefined if empty.
|
|
2158
|
+
*/
|
|
2159
|
+
getFirst(): HistoryEntry<T> | undefined;
|
|
2160
|
+
/**
|
|
2161
|
+
* Returns the most recent entry, or undefined if empty.
|
|
2162
|
+
*/
|
|
2163
|
+
getLatest(): HistoryEntry<T> | undefined;
|
|
2164
|
+
/**
|
|
2165
|
+
* Clears all history entries.
|
|
2166
|
+
*/
|
|
2167
|
+
clear(): void;
|
|
2168
|
+
/**
|
|
2169
|
+
* Creates a deep copy of this history.
|
|
2170
|
+
* @returns A new History instance with cloned entries
|
|
2171
|
+
*/
|
|
2172
|
+
clone(): History<T>;
|
|
2173
|
+
/**
|
|
2174
|
+
* Returns the number of entries in the history.
|
|
2175
|
+
*/
|
|
2176
|
+
get length(): number;
|
|
2177
|
+
/**
|
|
2178
|
+
* Returns the current configuration.
|
|
2179
|
+
*/
|
|
2180
|
+
get config(): HistoryConfig;
|
|
2181
|
+
/**
|
|
2182
|
+
* Returns true if the history is empty.
|
|
2183
|
+
*/
|
|
2184
|
+
get isEmpty(): boolean;
|
|
2185
|
+
/**
|
|
2186
|
+
* Returns the time span covered by the history in milliseconds.
|
|
2187
|
+
* Returns 0 if there are fewer than 2 entries.
|
|
2188
|
+
*/
|
|
2189
|
+
get timeSpan(): number;
|
|
2190
|
+
toString(): string;
|
|
2088
2191
|
}
|
|
2089
2192
|
|
|
2090
2193
|
/**
|
|
@@ -2104,35 +2207,44 @@ declare class Waypoint {
|
|
|
2104
2207
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2105
2208
|
*/
|
|
2106
2209
|
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2210
|
+
/**
|
|
2211
|
+
* State data that can be recorded in history.
|
|
2212
|
+
*/
|
|
2213
|
+
interface HistoricalState {
|
|
2214
|
+
position: TemeVec3;
|
|
2215
|
+
velocity: TemeVec3<KilometersPerSecond>;
|
|
2216
|
+
}
|
|
2217
|
+
/**
|
|
2218
|
+
* Serialized representation of a BaseObject.
|
|
2219
|
+
* Used for persistence and data transfer.
|
|
2220
|
+
*/
|
|
2221
|
+
interface SerializedObject {
|
|
2222
|
+
/** The class name of the object */
|
|
2223
|
+
type: string;
|
|
2224
|
+
/** Unique identifier */
|
|
2225
|
+
id: number;
|
|
2226
|
+
/** Human-readable name */
|
|
2227
|
+
name: string;
|
|
2228
|
+
/** Additional type-specific data */
|
|
2229
|
+
[key: string]: unknown;
|
|
2230
|
+
}
|
|
2231
|
+
/**
|
|
2232
|
+
* Placeholder interface for sensors (will be defined in Phase 2).
|
|
2233
|
+
* This allows SpaceObject and GroundObject to reference sensors
|
|
2234
|
+
* without creating circular dependencies.
|
|
2235
|
+
*/
|
|
2236
|
+
interface SensorInterface {
|
|
2237
|
+
id: number;
|
|
2238
|
+
name: string;
|
|
2239
|
+
}
|
|
2240
|
+
/**
|
|
2241
|
+
* Placeholder interface for communication devices (will be defined in Phase 3).
|
|
2242
|
+
* This allows SpaceObject and GroundObject to reference comm devices
|
|
2243
|
+
* without creating circular dependencies.
|
|
2244
|
+
*/
|
|
2245
|
+
interface CommunicationDeviceInterface {
|
|
2246
|
+
id: number;
|
|
2247
|
+
name: string;
|
|
2136
2248
|
}
|
|
2137
2249
|
|
|
2138
2250
|
/**
|
|
@@ -2158,60 +2270,97 @@ declare class Hill {
|
|
|
2158
2270
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2159
2271
|
*/
|
|
2160
2272
|
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2273
|
+
/**
|
|
2274
|
+
* Abstract base class for all objects in the ootk system.
|
|
2275
|
+
* Provides common functionality for identification, type checking,
|
|
2276
|
+
* history tracking, and serialization.
|
|
2277
|
+
*/
|
|
2278
|
+
declare abstract class BaseObject {
|
|
2279
|
+
/** Unique identifier for the object */
|
|
2280
|
+
id: number;
|
|
2281
|
+
/** Human-readable name */
|
|
2282
|
+
name: string;
|
|
2283
|
+
/** Type classification of the object */
|
|
2284
|
+
type: SpaceObjectType;
|
|
2285
|
+
/** Whether the object is currently active */
|
|
2286
|
+
active: boolean;
|
|
2287
|
+
/** Additional metadata for the object */
|
|
2288
|
+
metadata?: Record<string, unknown>;
|
|
2289
|
+
/** History tracking (null until enabled) */
|
|
2290
|
+
private history_;
|
|
2291
|
+
constructor(info: BaseObjectParams);
|
|
2166
2292
|
/**
|
|
2167
|
-
*
|
|
2168
|
-
*
|
|
2169
|
-
* @param v The Vector object to convert.
|
|
2170
|
-
* @returns A new Vector3D object.
|
|
2293
|
+
* Enables history tracking for this object.
|
|
2294
|
+
* @param config - Optional configuration for history behavior
|
|
2171
2295
|
*/
|
|
2172
|
-
|
|
2173
|
-
static readonly origin: Vector3D<number>;
|
|
2174
|
-
static readonly xAxis: Vector3D<number>;
|
|
2175
|
-
static readonly yAxis: Vector3D<number>;
|
|
2176
|
-
static readonly zAxis: Vector3D<number>;
|
|
2177
|
-
static readonly xAxisNeg: Vector3D<number>;
|
|
2178
|
-
static readonly yAxisNeg: Vector3D<number>;
|
|
2179
|
-
static readonly zAxisNeg: Vector3D<number>;
|
|
2180
|
-
toList(): T[];
|
|
2181
|
-
toArray(): Float64Array<ArrayBuffer>;
|
|
2182
|
-
toVector(): Vector<T>;
|
|
2183
|
-
toString(fixed?: number): string;
|
|
2184
|
-
magnitude(): T;
|
|
2185
|
-
add(v: Vector3D<T>): Vector3D<T>;
|
|
2186
|
-
subtract(v: Vector3D<T>): Vector3D<T>;
|
|
2187
|
-
scale<U extends number>(n: U): Vector3D<U>;
|
|
2188
|
-
negate(): Vector3D<T>;
|
|
2296
|
+
enableHistory(config?: HistoryConfig): void;
|
|
2189
2297
|
/**
|
|
2190
|
-
*
|
|
2191
|
-
* @param v The other Vector3D.
|
|
2192
|
-
* @returns The distance between this and the other Vector3D.
|
|
2298
|
+
* Disables history tracking and clears existing history.
|
|
2193
2299
|
*/
|
|
2194
|
-
|
|
2300
|
+
disableHistory(): void;
|
|
2195
2301
|
/**
|
|
2196
|
-
*
|
|
2197
|
-
* @returns A unit Vector3D.
|
|
2302
|
+
* Returns the history object if enabled, null otherwise.
|
|
2198
2303
|
*/
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2304
|
+
get history(): History<HistoricalState> | null;
|
|
2305
|
+
/**
|
|
2306
|
+
* Returns true if history tracking is enabled.
|
|
2307
|
+
*/
|
|
2308
|
+
get isHistoryEnabled(): boolean;
|
|
2309
|
+
/**
|
|
2310
|
+
* Records a state to history if history tracking is enabled.
|
|
2311
|
+
* @param time - The timestamp for this state
|
|
2312
|
+
* @param state - The state to record
|
|
2313
|
+
*/
|
|
2314
|
+
protected recordToHistory(time: Date, state: HistoricalState): void;
|
|
2315
|
+
/**
|
|
2316
|
+
* Serializes the object to a plain object for persistence.
|
|
2317
|
+
*/
|
|
2318
|
+
serialize(): SerializedObject;
|
|
2319
|
+
/**
|
|
2320
|
+
* Returns type-specific serialization data.
|
|
2321
|
+
* Subclasses must implement this to add their specific properties.
|
|
2322
|
+
*/
|
|
2323
|
+
protected abstract serializeSpecific(): Record<string, unknown>;
|
|
2324
|
+
/**
|
|
2325
|
+
* Checks if the object is a satellite.
|
|
2326
|
+
* @returns True if the object is a satellite, false otherwise.
|
|
2327
|
+
*/
|
|
2328
|
+
isSatellite(): boolean;
|
|
2329
|
+
/**
|
|
2330
|
+
* Checks if the object is a ground object.
|
|
2331
|
+
* @returns True if the object is a ground object, false otherwise.
|
|
2332
|
+
*/
|
|
2333
|
+
isGroundObject(): boolean;
|
|
2334
|
+
/**
|
|
2335
|
+
* Returns whether the object is a sensor.
|
|
2336
|
+
* @returns True if the object is a sensor, false otherwise.
|
|
2337
|
+
*/
|
|
2338
|
+
isSensor(): boolean;
|
|
2339
|
+
/**
|
|
2340
|
+
* Checks if the object is a marker.
|
|
2341
|
+
* @returns True if the object is a marker, false otherwise.
|
|
2342
|
+
*/
|
|
2343
|
+
isMarker(): boolean;
|
|
2344
|
+
/**
|
|
2345
|
+
* Returns whether the object's position is static.
|
|
2346
|
+
* @returns True if the object is static, false otherwise.
|
|
2347
|
+
*/
|
|
2348
|
+
isStatic(): boolean;
|
|
2349
|
+
isPayload(): boolean;
|
|
2350
|
+
isRocketBody(): boolean;
|
|
2351
|
+
isDebris(): boolean;
|
|
2352
|
+
isStar(): boolean;
|
|
2353
|
+
isMissile(): boolean;
|
|
2354
|
+
isNotional(): boolean;
|
|
2355
|
+
getTypeString(): string;
|
|
2356
|
+
/**
|
|
2357
|
+
* Validates a parameter value against a minimum and maximum value.
|
|
2358
|
+
* @param value - The value to be validated.
|
|
2359
|
+
* @param minValue - The minimum allowed value.
|
|
2360
|
+
* @param maxValue - The maximum allowed value.
|
|
2361
|
+
* @param errorMessage - The error message to be thrown if the value is invalid.
|
|
2362
|
+
*/
|
|
2363
|
+
validateParameter<T>(value: T, minValue: T | null, maxValue: T | null, errorMessage: string): void;
|
|
2215
2364
|
}
|
|
2216
2365
|
|
|
2217
2366
|
/**
|
|
@@ -2238,243 +2387,268 @@ declare class Vector3D<T extends number = number> {
|
|
|
2238
2387
|
*/
|
|
2239
2388
|
|
|
2240
2389
|
/**
|
|
2241
|
-
*
|
|
2390
|
+
* Parameters for constructing a GroundObject.
|
|
2242
2391
|
*/
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2392
|
+
interface GroundObjectParams extends BaseObjectParams {
|
|
2393
|
+
lat: Degrees;
|
|
2394
|
+
lon: Degrees;
|
|
2395
|
+
alt: Kilometers;
|
|
2396
|
+
}
|
|
2397
|
+
/**
|
|
2398
|
+
* Abstract base class for all objects on Earth's surface.
|
|
2399
|
+
* Provides coordinate conversion methods and component attachment capabilities.
|
|
2400
|
+
*/
|
|
2401
|
+
declare abstract class GroundObject extends BaseObject {
|
|
2402
|
+
name: string;
|
|
2403
|
+
readonly lat: Degrees;
|
|
2404
|
+
readonly lon: Degrees;
|
|
2405
|
+
readonly alt: Kilometers;
|
|
2406
|
+
/** Sensors attached to this ground object */
|
|
2407
|
+
sensors: SensorInterface[];
|
|
2408
|
+
/** Communication devices attached to this ground object */
|
|
2409
|
+
commDevices: CommunicationDeviceInterface[];
|
|
2410
|
+
constructor(info: GroundObjectParams);
|
|
2257
2411
|
/**
|
|
2258
|
-
*
|
|
2412
|
+
* Calculates the relative azimuth, elevation, and range between this GroundObject and a Satellite.
|
|
2413
|
+
* @param satellite The Satellite object.
|
|
2414
|
+
* @param date The date for which to calculate the RAE values. Defaults to the current date.
|
|
2415
|
+
* @returns The relative azimuth, elevation, and range values in kilometers and degrees.
|
|
2259
2416
|
*/
|
|
2260
|
-
|
|
2417
|
+
rae(satellite: Satellite, date?: Date): RaeVec3<Kilometers, Degrees> | null;
|
|
2261
2418
|
/**
|
|
2262
|
-
*
|
|
2419
|
+
* Calculates ECEF position at a given time.
|
|
2420
|
+
* @variation optimized version of this.toGeodetic().toITRF().position;
|
|
2421
|
+
* @returns The ECEF position vector of the ground object.
|
|
2263
2422
|
*/
|
|
2264
|
-
|
|
2423
|
+
ecef(): EcefVec3<Kilometers>;
|
|
2265
2424
|
/**
|
|
2266
|
-
*
|
|
2425
|
+
* Calculates the Earth-Centered Inertial (ECI) position vector of the ground object at a given date.
|
|
2426
|
+
* @variation optimized version of this.toGeodetic().toITRF().toJ2000().position;
|
|
2427
|
+
* @param date The date for which to calculate the ECI position vector. Defaults to the current date.
|
|
2428
|
+
* @returns The ECI position vector of the ground object.
|
|
2267
2429
|
*/
|
|
2268
|
-
|
|
2430
|
+
eci(date?: Date): TemeVec3<Kilometers>;
|
|
2269
2431
|
/**
|
|
2270
|
-
*
|
|
2432
|
+
* Returns the latitude, longitude, and altitude of the GroundObject.
|
|
2433
|
+
* @returns The latitude, longitude, and altitude as an LlaVec3 object.
|
|
2271
2434
|
*/
|
|
2272
|
-
|
|
2435
|
+
lla(): LlaVec3<Degrees, Kilometers>;
|
|
2273
2436
|
/**
|
|
2274
|
-
*
|
|
2437
|
+
* Converts the latitude, longitude, and altitude of the GroundObject to radians and kilometers.
|
|
2438
|
+
* @variation optimized version of this.toGeodetic() without class instantiation for better performance and
|
|
2439
|
+
* serialization.
|
|
2440
|
+
* @returns An object containing the latitude, longitude, and altitude in radians and kilometers.
|
|
2275
2441
|
*/
|
|
2276
|
-
|
|
2442
|
+
llaRad(): LlaVec3<Radians, Kilometers>;
|
|
2443
|
+
get latRad(): Radians;
|
|
2444
|
+
get lonRad(): Radians;
|
|
2277
2445
|
/**
|
|
2278
|
-
*
|
|
2446
|
+
* Converts the ground position to geodetic coordinates.
|
|
2447
|
+
* @returns The geodetic coordinates.
|
|
2279
2448
|
*/
|
|
2280
|
-
|
|
2281
|
-
constructor(elements: T[] | Float64Array);
|
|
2449
|
+
toGeodetic(): Geodetic;
|
|
2282
2450
|
/**
|
|
2283
|
-
*
|
|
2284
|
-
*
|
|
2285
|
-
* @
|
|
2451
|
+
* Converts the ground position to J2000 inertial coordinates.
|
|
2452
|
+
* Ground objects have zero velocity in the inertial frame (ignoring Earth rotation).
|
|
2453
|
+
* @param date - The date for the conversion (defaults to now)
|
|
2454
|
+
* @returns J2000 state vector
|
|
2286
2455
|
*/
|
|
2287
|
-
|
|
2456
|
+
toJ2000(date?: Date): J2000;
|
|
2288
2457
|
/**
|
|
2289
|
-
*
|
|
2290
|
-
*
|
|
2291
|
-
* @param length The length of the new Vector.
|
|
2292
|
-
* @param value The value to fill the Vector with.
|
|
2293
|
-
* @returns A new Vector filled with the specified value.
|
|
2458
|
+
* Adds a sensor to this ground object.
|
|
2459
|
+
* @param sensor - The sensor to add
|
|
2294
2460
|
*/
|
|
2295
|
-
|
|
2461
|
+
addSensor(sensor: SensorInterface): void;
|
|
2296
2462
|
/**
|
|
2297
|
-
*
|
|
2298
|
-
* @param
|
|
2299
|
-
* @returns A new Vector instance.
|
|
2463
|
+
* Removes a sensor from this ground object.
|
|
2464
|
+
* @param sensorId - The ID of the sensor to remove
|
|
2300
2465
|
*/
|
|
2301
|
-
|
|
2466
|
+
removeSensor(sensorId: number): void;
|
|
2302
2467
|
/**
|
|
2303
|
-
*
|
|
2304
|
-
* @param
|
|
2305
|
-
* Defaults to -1.
|
|
2306
|
-
* @returns A string representation of the vector.
|
|
2468
|
+
* Adds a communication device to this ground object.
|
|
2469
|
+
* @param device - The device to add
|
|
2307
2470
|
*/
|
|
2308
|
-
|
|
2471
|
+
addCommDevice(device: CommunicationDeviceInterface): void;
|
|
2309
2472
|
/**
|
|
2310
|
-
*
|
|
2311
|
-
* @
|
|
2473
|
+
* Removes a communication device from this ground object.
|
|
2474
|
+
* @param deviceId - The ID of the device to remove
|
|
2312
2475
|
*/
|
|
2313
|
-
|
|
2476
|
+
removeCommDevice(deviceId: number): void;
|
|
2477
|
+
isGroundObject(): boolean;
|
|
2314
2478
|
/**
|
|
2315
|
-
*
|
|
2316
|
-
* @
|
|
2479
|
+
* Validates the input data for the GroundObject.
|
|
2480
|
+
* @param info - The GroundPositionParams object containing the latitude,
|
|
2481
|
+
* longitude, and altitude.
|
|
2317
2482
|
*/
|
|
2318
|
-
|
|
2483
|
+
private validateGroundObjectInputData_;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
/**
|
|
2487
|
+
* @author Theodore Kruczek
|
|
2488
|
+
* @license AGPL-3.0-or-later
|
|
2489
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
2490
|
+
*
|
|
2491
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
2492
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
2493
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
2494
|
+
*
|
|
2495
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
2496
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
2497
|
+
* See the GNU Affero General Public License for more details.
|
|
2498
|
+
*
|
|
2499
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
2500
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2501
|
+
*/
|
|
2502
|
+
|
|
2503
|
+
/**
|
|
2504
|
+
* Parameters for constructing a GroundStation.
|
|
2505
|
+
*/
|
|
2506
|
+
interface GroundStationParams extends GroundObjectParams {
|
|
2507
|
+
}
|
|
2508
|
+
/**
|
|
2509
|
+
* A concrete ground station that can host sensors and communication devices.
|
|
2510
|
+
* Use this class for fixed ground locations like tracking stations, observatories, etc.
|
|
2511
|
+
*/
|
|
2512
|
+
declare class GroundStation extends GroundObject {
|
|
2513
|
+
constructor(info: GroundStationParams);
|
|
2319
2514
|
/**
|
|
2320
|
-
*
|
|
2321
|
-
* @
|
|
2515
|
+
* Creates a GroundStation from a Geodetic position.
|
|
2516
|
+
* @param geodetic - The geodetic coordinates
|
|
2517
|
+
* @param name - Optional name for the station
|
|
2518
|
+
* @param id - Optional unique identifier
|
|
2322
2519
|
*/
|
|
2323
|
-
|
|
2520
|
+
static fromGeodetic(geodetic: Geodetic, name?: string, id?: number): GroundStation;
|
|
2324
2521
|
/**
|
|
2325
|
-
*
|
|
2326
|
-
* @returns An array containing the vector elements.
|
|
2522
|
+
* Creates a deep copy of this ground station.
|
|
2327
2523
|
*/
|
|
2328
|
-
|
|
2524
|
+
clone(): GroundStation;
|
|
2329
2525
|
/**
|
|
2330
|
-
*
|
|
2331
|
-
*
|
|
2526
|
+
* Creates a new GroundStation at a different position.
|
|
2527
|
+
* The original instance remains unchanged.
|
|
2528
|
+
* @param lat - New latitude in degrees
|
|
2529
|
+
* @param lon - New longitude in degrees
|
|
2530
|
+
* @param alt - Optional new altitude in kilometers (defaults to current altitude)
|
|
2531
|
+
* @returns A new GroundStation at the specified position
|
|
2332
2532
|
*/
|
|
2333
|
-
|
|
2533
|
+
moveTo(lat: Degrees, lon: Degrees, alt?: Kilometers): GroundStation;
|
|
2334
2534
|
/**
|
|
2335
|
-
*
|
|
2336
|
-
* @returns The magnitude of the vector.
|
|
2535
|
+
* Returns true since GroundStation is always a ground object.
|
|
2337
2536
|
*/
|
|
2338
|
-
|
|
2537
|
+
isGroundObject(): boolean;
|
|
2339
2538
|
/**
|
|
2340
|
-
*
|
|
2341
|
-
* vector.
|
|
2342
|
-
* @param v - The vector to add.
|
|
2343
|
-
* @returns A new vector containing the sum of the elements.
|
|
2539
|
+
* Returns type-specific serialization data.
|
|
2344
2540
|
*/
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
*/
|
|
2387
|
-
outer(v: Vector): Matrix;
|
|
2388
|
-
/**
|
|
2389
|
-
* Calculates the cross product of this vector and the given vector.
|
|
2390
|
-
* @param v - The vector to calculate the cross product with.
|
|
2391
|
-
* @returns The resulting vector.
|
|
2392
|
-
*/
|
|
2393
|
-
cross(v: Vector): Vector;
|
|
2394
|
-
/**
|
|
2395
|
-
* Calculate the skew-symmetric matrix for this [Vector].
|
|
2396
|
-
* @returns The skew-symmetric matrix.
|
|
2397
|
-
* @throws [Error] if the vector is not of length 3.
|
|
2398
|
-
*/
|
|
2399
|
-
skewSymmetric(): Matrix;
|
|
2400
|
-
/**
|
|
2401
|
-
* Rotates the vector around the X-axis by the specified angle.
|
|
2402
|
-
* @param theta The angle in radians.
|
|
2403
|
-
* @returns The rotated vector.
|
|
2404
|
-
*/
|
|
2405
|
-
rotX(theta: Radians): Vector;
|
|
2541
|
+
protected serializeSpecific(): Record<string, unknown>;
|
|
2542
|
+
toString(): string;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
/**
|
|
2546
|
+
* @author Theodore Kruczek
|
|
2547
|
+
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
2548
|
+
* with satellites and other orbital objects.
|
|
2549
|
+
* @license AGPL-3.0-or-later
|
|
2550
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
2551
|
+
*
|
|
2552
|
+
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
2553
|
+
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
2554
|
+
* is licensed under the MIT license.
|
|
2555
|
+
*
|
|
2556
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
2557
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
2558
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
2559
|
+
*
|
|
2560
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
2561
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
2562
|
+
* See the GNU Affero General Public License for more details.
|
|
2563
|
+
*
|
|
2564
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
2565
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2566
|
+
*/
|
|
2567
|
+
|
|
2568
|
+
/**
|
|
2569
|
+
* This Geodetic class represents a geodetic coordinate in three-dimensional
|
|
2570
|
+
* space, consisting of latitude, longitude, and altitude. It provides various
|
|
2571
|
+
* methods to perform calculations and operations related to geodetic
|
|
2572
|
+
* coordinates.
|
|
2573
|
+
*
|
|
2574
|
+
* This is a class for geodetic coordinates. This is related to the GroundObject
|
|
2575
|
+
* class, which is used to represent an object on the surface of the Earth.
|
|
2576
|
+
*/
|
|
2577
|
+
declare class Geodetic {
|
|
2578
|
+
readonly lat: Radians;
|
|
2579
|
+
readonly lon: Radians;
|
|
2580
|
+
readonly alt: Kilometers;
|
|
2581
|
+
constructor(latitude: Radians, longitude: Radians, altitude: Kilometers);
|
|
2406
2582
|
/**
|
|
2407
|
-
*
|
|
2408
|
-
*
|
|
2409
|
-
* @
|
|
2583
|
+
* Creates a Geodetic object from latitude, longitude, and altitude values in
|
|
2584
|
+
* degrees.
|
|
2585
|
+
* @param latitude The latitude value in degrees.
|
|
2586
|
+
* @param longitude The longitude value in degrees.
|
|
2587
|
+
* @param altitude The altitude value in kilometers.
|
|
2588
|
+
* @returns A Geodetic object representing the specified latitude, longitude,
|
|
2589
|
+
* and altitude.
|
|
2410
2590
|
*/
|
|
2411
|
-
|
|
2591
|
+
static fromDegrees(latitude: Degrees, longitude: Degrees, altitude: Kilometers): Geodetic;
|
|
2412
2592
|
/**
|
|
2413
|
-
*
|
|
2414
|
-
* @
|
|
2415
|
-
* @returns A new Vector representing the rotated vector.
|
|
2593
|
+
* Returns a string representation of the Geodetic object.
|
|
2594
|
+
* @returns A string containing the latitude, longitude, and altitude of the Geodetic object.
|
|
2416
2595
|
*/
|
|
2417
|
-
|
|
2596
|
+
toString(): string;
|
|
2418
2597
|
/**
|
|
2419
|
-
*
|
|
2420
|
-
* @
|
|
2421
|
-
* @returns The angle between the two vectors in radians.
|
|
2598
|
+
* Gets the latitude in degrees.
|
|
2599
|
+
* @returns The latitude in degrees.
|
|
2422
2600
|
*/
|
|
2423
|
-
|
|
2601
|
+
get latDeg(): number;
|
|
2424
2602
|
/**
|
|
2425
|
-
*
|
|
2426
|
-
* @
|
|
2427
|
-
* @returns The angle between the two vectors in degrees.
|
|
2603
|
+
* Gets the longitude in degrees.
|
|
2604
|
+
* @returns The longitude in degrees.
|
|
2428
2605
|
*/
|
|
2429
|
-
|
|
2606
|
+
get lonDeg(): number;
|
|
2430
2607
|
/**
|
|
2431
|
-
*
|
|
2432
|
-
*
|
|
2433
|
-
* @param v - The vector to check line of sight with.
|
|
2434
|
-
* @param radius - The radius within which line of sight is considered.
|
|
2435
|
-
* @returns True if there is line of sight, false otherwise.
|
|
2608
|
+
* Converts the geodetic coordinates to a ground station.
|
|
2609
|
+
* @returns The ground station object.
|
|
2436
2610
|
*/
|
|
2437
|
-
|
|
2611
|
+
toGroundStation(): GroundStation;
|
|
2438
2612
|
/**
|
|
2439
|
-
*
|
|
2440
|
-
*
|
|
2441
|
-
*
|
|
2442
|
-
*
|
|
2443
|
-
* normalizing the resulting vector.
|
|
2444
|
-
* @param v - The vector to calculate the bisect with.
|
|
2445
|
-
* @returns The bisect vector.
|
|
2613
|
+
* Converts the geodetic coordinates to the International Terrestrial
|
|
2614
|
+
* Reference Frame (ITRF) coordinates.
|
|
2615
|
+
* @param epoch The epoch in UTC.
|
|
2616
|
+
* @returns The ITRF coordinates.
|
|
2446
2617
|
*/
|
|
2447
|
-
|
|
2618
|
+
toITRF(epoch: EpochUTC): ITRF;
|
|
2448
2619
|
/**
|
|
2449
|
-
*
|
|
2450
|
-
* @param
|
|
2451
|
-
* @
|
|
2620
|
+
* Calculates the angle between two geodetic coordinates.
|
|
2621
|
+
* @param g The geodetic coordinate to calculate the angle to.
|
|
2622
|
+
* @param method The method to use for calculating the angular distance (optional, default is Haversine).
|
|
2623
|
+
* @returns The angle between the two geodetic coordinates in radians.
|
|
2452
2624
|
*/
|
|
2453
|
-
|
|
2625
|
+
angle(g: Geodetic, method?: AngularDistanceMethod): Radians;
|
|
2454
2626
|
/**
|
|
2455
|
-
*
|
|
2456
|
-
*
|
|
2457
|
-
* @param
|
|
2458
|
-
* @
|
|
2459
|
-
* @returns A new Vector containing the sliced elements.
|
|
2627
|
+
* Calculates the angle in degrees between two Geodetic coordinates.
|
|
2628
|
+
* @param g The Geodetic coordinate to calculate the angle with.
|
|
2629
|
+
* @param method The method to use for calculating the angular distance (optional, default is Haversine).
|
|
2630
|
+
* @returns The angle in degrees.
|
|
2460
2631
|
*/
|
|
2461
|
-
|
|
2632
|
+
angleDeg(g: Geodetic, method?: AngularDistanceMethod): Degrees;
|
|
2462
2633
|
/**
|
|
2463
|
-
*
|
|
2464
|
-
* @
|
|
2634
|
+
* Calculates the distance between two geodetic coordinates.
|
|
2635
|
+
* @param g The geodetic coordinates to calculate the distance to.
|
|
2636
|
+
* @param method The method to use for calculating the angular distance. Default is Haversine.
|
|
2637
|
+
* @returns The distance between the two geodetic coordinates in kilometers.
|
|
2465
2638
|
*/
|
|
2466
|
-
|
|
2639
|
+
distance(g: Geodetic, method?: AngularDistanceMethod): Kilometers;
|
|
2467
2640
|
/**
|
|
2468
|
-
*
|
|
2469
|
-
* @returns The
|
|
2641
|
+
* Calculates the field of view based on the altitude of the Geodetic object.
|
|
2642
|
+
* @returns The field of view in radians.
|
|
2470
2643
|
*/
|
|
2471
|
-
|
|
2644
|
+
fieldOfView(): Radians;
|
|
2472
2645
|
/**
|
|
2473
|
-
*
|
|
2474
|
-
* @param
|
|
2475
|
-
* @
|
|
2646
|
+
* Determines if the current geodetic coordinate can see another geodetic coordinate.
|
|
2647
|
+
* @param g The geodetic coordinate to check for visibility.
|
|
2648
|
+
* @param method The method to use for calculating the angular distance (optional, default is Haversine).
|
|
2649
|
+
* @returns A boolean indicating if the current coordinate can see the other coordinate.
|
|
2476
2650
|
*/
|
|
2477
|
-
|
|
2651
|
+
isInView(g: Geodetic, method?: AngularDistanceMethod): boolean;
|
|
2478
2652
|
}
|
|
2479
2653
|
|
|
2480
2654
|
/**
|
|
@@ -2501,151 +2675,419 @@ declare class Vector<T extends number = number> {
|
|
|
2501
2675
|
*/
|
|
2502
2676
|
|
|
2503
2677
|
/**
|
|
2504
|
-
* A
|
|
2505
|
-
* which operations such as addition and multiplication are defined.
|
|
2678
|
+
* A class containing static methods for formatting TLEs (Two-Line Elements).
|
|
2506
2679
|
*/
|
|
2507
|
-
declare class
|
|
2508
|
-
|
|
2509
|
-
readonly rows: number;
|
|
2510
|
-
readonly columns: number;
|
|
2511
|
-
constructor(elements: number[][]);
|
|
2680
|
+
declare abstract class FormatTle {
|
|
2681
|
+
private constructor();
|
|
2512
2682
|
/**
|
|
2513
|
-
* Creates a
|
|
2514
|
-
* @param
|
|
2515
|
-
* @
|
|
2516
|
-
* @returns A matrix with all elements set to zero.
|
|
2683
|
+
* Creates a TLE (Two-Line Element) string based on the provided TleParams.
|
|
2684
|
+
* @param tleParams - The parameters used to generate the TLE.
|
|
2685
|
+
* @returns An object containing the TLE strings tle1 and tle2.
|
|
2517
2686
|
*/
|
|
2518
|
-
static
|
|
2687
|
+
static createTle(tleParams: TleParams): {
|
|
2688
|
+
tle1: TleLine1;
|
|
2689
|
+
tle2: TleLine2;
|
|
2690
|
+
};
|
|
2519
2691
|
/**
|
|
2520
|
-
*
|
|
2521
|
-
*
|
|
2522
|
-
* @
|
|
2523
|
-
* @
|
|
2524
|
-
* @param value The value to fill the matrix with. Default is 0.0.
|
|
2525
|
-
* @returns A new Matrix filled with the specified value.
|
|
2692
|
+
* Converts the argument of perigee to a stringified number.
|
|
2693
|
+
* @param argPe - The argument of perigee to be converted. Can be either a number or a string.
|
|
2694
|
+
* @returns The argument of perigee as a stringified number.
|
|
2695
|
+
* @throws Error if the length of the argument of perigee is not 8.
|
|
2526
2696
|
*/
|
|
2527
|
-
static
|
|
2697
|
+
static argumentOfPerigee(argPe: number | string): StringifiedNumber;
|
|
2528
2698
|
/**
|
|
2529
|
-
*
|
|
2530
|
-
* @param
|
|
2531
|
-
* @returns The
|
|
2699
|
+
* Returns the eccentricity value formatted for TLE.
|
|
2700
|
+
* @param ecen - The eccentricity value (string or number).
|
|
2701
|
+
* @returns The eccentricity value formatted as 7 digits without leading "0.".
|
|
2702
|
+
* @throws Error if the length of the eccentricity string is not 7.
|
|
2532
2703
|
*/
|
|
2533
|
-
static
|
|
2704
|
+
static eccentricity(ecen: string | number): string;
|
|
2534
2705
|
/**
|
|
2535
|
-
*
|
|
2536
|
-
* @param
|
|
2537
|
-
* @returns The
|
|
2706
|
+
* Converts the inclination value to a string representation.
|
|
2707
|
+
* @param inc - The inclination value to be converted.
|
|
2708
|
+
* @returns The string representation of the inclination value.
|
|
2709
|
+
* @throws Error if the length of the converted value is not 8.
|
|
2538
2710
|
*/
|
|
2539
|
-
static
|
|
2711
|
+
static inclination(inc: number | string): StringifiedNumber;
|
|
2540
2712
|
/**
|
|
2541
|
-
*
|
|
2542
|
-
* @param
|
|
2543
|
-
* @returns The
|
|
2544
|
-
|
|
2545
|
-
static rotZ(theta: Radians): Matrix;
|
|
2546
|
-
/**
|
|
2547
|
-
* Creates a zero matrix with the specified number of rows and columns.
|
|
2548
|
-
* @param rows The number of rows in the matrix.
|
|
2549
|
-
* @param columns The number of columns in the matrix.
|
|
2550
|
-
* @returns A new Matrix object representing the zero matrix.
|
|
2551
|
-
*/
|
|
2552
|
-
static zero(rows: number, columns: number): Matrix;
|
|
2553
|
-
/**
|
|
2554
|
-
* Creates an identity matrix of the specified dimension.
|
|
2555
|
-
* @param dimension The dimension of the identity matrix.
|
|
2556
|
-
* @returns The identity matrix.
|
|
2557
|
-
*/
|
|
2558
|
-
static identity(dimension: number): Matrix;
|
|
2559
|
-
/**
|
|
2560
|
-
* Creates a diagonal matrix with the given diagonal elements.
|
|
2561
|
-
* @param d - An array of diagonal elements.
|
|
2562
|
-
* @returns A new Matrix object representing the diagonal matrix.
|
|
2563
|
-
*/
|
|
2564
|
-
static diagonal(d: number[]): Matrix;
|
|
2565
|
-
/**
|
|
2566
|
-
* Adds the elements of another matrix to this matrix and returns the result.
|
|
2567
|
-
* @param m - The matrix to be added.
|
|
2568
|
-
* @returns The resulting matrix after addition.
|
|
2569
|
-
*/
|
|
2570
|
-
add(m: Matrix): Matrix;
|
|
2571
|
-
/**
|
|
2572
|
-
* Subtracts the elements of another matrix from this matrix.
|
|
2573
|
-
* @param m - The matrix to subtract.
|
|
2574
|
-
* @returns A new matrix containing the result of the subtraction.
|
|
2713
|
+
* Converts the mean anomaly to a string representation with 8 digits, padded with leading zeros.
|
|
2714
|
+
* @param meana - The mean anomaly to be converted. Can be either a number or a string.
|
|
2715
|
+
* @returns The mean anomaly as a string with 8 digits, padded with leading zeros.
|
|
2716
|
+
* @throws Error if the length of the mean anomaly is not 8.
|
|
2575
2717
|
*/
|
|
2576
|
-
|
|
2718
|
+
static meanAnomaly(meana: number | string): StringifiedNumber;
|
|
2577
2719
|
/**
|
|
2578
|
-
*
|
|
2579
|
-
*
|
|
2580
|
-
*
|
|
2720
|
+
* Converts the mean motion value to a string representation with 8 decimal
|
|
2721
|
+
* places. If the input is a number, it is converted to a string. If the input
|
|
2722
|
+
* is already a string, it is parsed as a float and then converted to a string
|
|
2723
|
+
* with 8 decimal places. The resulting string is padded with leading zeros to
|
|
2724
|
+
* ensure a length of 11 characters. Throws an error if the resulting string
|
|
2725
|
+
* does not have a length of 11 characters.
|
|
2726
|
+
* @param meanmo - The mean motion value to be converted.
|
|
2727
|
+
* @returns The string representation of the mean motion value with 8 decimal
|
|
2728
|
+
* places and padded with leading zeros.
|
|
2729
|
+
* @throws Error if the resulting string does not have a length of 11
|
|
2730
|
+
* characters.
|
|
2581
2731
|
*/
|
|
2582
|
-
|
|
2732
|
+
static meanMotion(meanmo: number | string): StringifiedNumber;
|
|
2583
2733
|
/**
|
|
2584
|
-
*
|
|
2585
|
-
* @
|
|
2734
|
+
* Converts the right ascension value to a stringified number.
|
|
2735
|
+
* @param rasc - The right ascension value to convert.
|
|
2736
|
+
* @returns The stringified number representation of the right ascension.
|
|
2737
|
+
* @throws Error if the length of the converted right ascension is not 8.
|
|
2586
2738
|
*/
|
|
2587
|
-
|
|
2739
|
+
static rightAscension(rasc: number | string): StringifiedNumber;
|
|
2588
2740
|
/**
|
|
2589
|
-
*
|
|
2590
|
-
* @param
|
|
2591
|
-
* @
|
|
2741
|
+
* Sets a character at a specific index in a string. If the index is out of range, the original string is returned.
|
|
2742
|
+
* @param str - The input string.
|
|
2743
|
+
* @param index - The index at which to set the character.
|
|
2744
|
+
* @param chr - The character to set at the specified index.
|
|
2745
|
+
* @returns The modified string with the character set at the specified index.
|
|
2592
2746
|
*/
|
|
2593
|
-
|
|
2747
|
+
static setCharAt(str: string, index: number, chr: string): string;
|
|
2594
2748
|
/**
|
|
2595
|
-
*
|
|
2596
|
-
*
|
|
2597
|
-
* @
|
|
2749
|
+
* Format mean motion dot (first derivative / 2) for TLE line 1.
|
|
2750
|
+
* Format: sign + ".NNNNNNNN" = 10 chars total.
|
|
2751
|
+
* @param value - Mean motion dot value (rev/day^2)
|
|
2752
|
+
* @returns Formatted 10-character string
|
|
2598
2753
|
*/
|
|
2599
|
-
|
|
2754
|
+
static formatMeanMotionDot(value: number): string;
|
|
2600
2755
|
/**
|
|
2601
|
-
*
|
|
2602
|
-
*
|
|
2603
|
-
*
|
|
2756
|
+
* Format a value in TLE exponential notation for BSTAR or mean motion ddot.
|
|
2757
|
+
* Format: "sNNNNN±N" (8 chars) where mantissa has implied leading decimal point.
|
|
2758
|
+
* Example: 0.00017507 → " 17507-3" (i.e., .17507 × 10^-3)
|
|
2759
|
+
* @param value - The value to format
|
|
2760
|
+
* @returns Formatted 8-character string
|
|
2604
2761
|
*/
|
|
2605
|
-
|
|
2762
|
+
static formatTleExponential(value: number): string;
|
|
2606
2763
|
/**
|
|
2607
|
-
*
|
|
2608
|
-
* @
|
|
2609
|
-
* @
|
|
2610
|
-
* @returns The resulting 3D vector after multiplication.
|
|
2764
|
+
* Compute TLE line checksum (modulo 10 sum of digits, '-' counts as 1).
|
|
2765
|
+
* @param line - TLE line (first 68 characters are summed)
|
|
2766
|
+
* @returns Checksum digit (0-9)
|
|
2611
2767
|
*/
|
|
2612
|
-
|
|
2768
|
+
static tleChecksum(line: string): number;
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* @author Theodore Kruczek
|
|
2773
|
+
* @license AGPL-3.0-or-later
|
|
2774
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
2775
|
+
*
|
|
2776
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
2777
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
2778
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
2779
|
+
*
|
|
2780
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
2781
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
2782
|
+
* See the GNU Affero General Public License for more details.
|
|
2783
|
+
*
|
|
2784
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
2785
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2786
|
+
*/
|
|
2787
|
+
|
|
2788
|
+
declare abstract class Force {
|
|
2613
2789
|
/**
|
|
2614
|
-
*
|
|
2615
|
-
*
|
|
2616
|
-
*
|
|
2617
|
-
*
|
|
2618
|
-
* @returns A new Matrix object representing the reciprocal of the current
|
|
2619
|
-
* matrix.
|
|
2790
|
+
* Calculate the acceleration due to the perturbing force on a given
|
|
2791
|
+
* state vector.
|
|
2792
|
+
* @param state The state vector.
|
|
2793
|
+
* @throws If the force cannot be calculated.
|
|
2620
2794
|
*/
|
|
2621
|
-
|
|
2795
|
+
abstract acceleration(state: J2000): Vector3D;
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
/**
|
|
2799
|
+
* @author Theodore Kruczek
|
|
2800
|
+
* @license AGPL-3.0-or-later
|
|
2801
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
2802
|
+
*
|
|
2803
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
2804
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
2805
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
2806
|
+
*
|
|
2807
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
2808
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
2809
|
+
* See the GNU Affero General Public License for more details.
|
|
2810
|
+
*
|
|
2811
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
2812
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2813
|
+
*/
|
|
2814
|
+
|
|
2815
|
+
declare class Thrust implements Force {
|
|
2816
|
+
center: EpochUTC;
|
|
2817
|
+
radial: MetersPerSecond;
|
|
2818
|
+
intrack: MetersPerSecond;
|
|
2819
|
+
crosstrack: MetersPerSecond;
|
|
2820
|
+
durationRate: SecondsPerMeterPerSecond;
|
|
2821
|
+
constructor(center: EpochUTC, radial: MetersPerSecond, intrack: MetersPerSecond, crosstrack: MetersPerSecond, durationRate?: SecondsPerMeterPerSecond);
|
|
2822
|
+
deltaV: Vector3D<KilometersPerSecond>;
|
|
2823
|
+
get magnitude(): MetersPerSecond;
|
|
2824
|
+
get duration(): Seconds;
|
|
2825
|
+
get start(): EpochUTC;
|
|
2826
|
+
get stop(): EpochUTC;
|
|
2827
|
+
acceleration(state: J2000): Vector3D;
|
|
2828
|
+
apply(state: J2000): J2000;
|
|
2829
|
+
get isImpulsive(): boolean;
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
/**
|
|
2833
|
+
* @author Theodore Kruczek
|
|
2834
|
+
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
2835
|
+
* with satellites and other orbital objects.
|
|
2836
|
+
* @license AGPL-3.0-or-later
|
|
2837
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
2838
|
+
*
|
|
2839
|
+
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
2840
|
+
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
2841
|
+
* is licensed under the MIT license.
|
|
2842
|
+
*
|
|
2843
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
2844
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
2845
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
2846
|
+
*
|
|
2847
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
2848
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
2849
|
+
* See the GNU Affero General Public License for more details.
|
|
2850
|
+
*
|
|
2851
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
2852
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2853
|
+
*/
|
|
2854
|
+
|
|
2855
|
+
declare class EpochWindow {
|
|
2856
|
+
start: EpochUTC;
|
|
2857
|
+
end: EpochUTC;
|
|
2858
|
+
constructor(start: EpochUTC, end: EpochUTC);
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
/**
|
|
2862
|
+
* @author Theodore Kruczek
|
|
2863
|
+
* @license AGPL-3.0-or-later
|
|
2864
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
2865
|
+
*
|
|
2866
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
2867
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
2868
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
2869
|
+
*
|
|
2870
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
2871
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
2872
|
+
* See the GNU Affero General Public License for more details.
|
|
2873
|
+
*
|
|
2874
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
2875
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2876
|
+
*/
|
|
2877
|
+
|
|
2878
|
+
declare abstract class Interpolator {
|
|
2879
|
+
abstract window(): EpochWindow;
|
|
2880
|
+
inWindow(epoch: EpochUTC): boolean;
|
|
2881
|
+
overlap(interpolator: Interpolator): EpochWindow | null;
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
/**
|
|
2885
|
+
* @author Theodore Kruczek
|
|
2886
|
+
* @license AGPL-3.0-or-later
|
|
2887
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
2888
|
+
*
|
|
2889
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
2890
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
2891
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
2892
|
+
*
|
|
2893
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
2894
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
2895
|
+
* See the GNU Affero General Public License for more details.
|
|
2896
|
+
*
|
|
2897
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
2898
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2899
|
+
*/
|
|
2900
|
+
|
|
2901
|
+
declare abstract class StateInterpolator extends Interpolator {
|
|
2622
2902
|
/**
|
|
2623
|
-
*
|
|
2624
|
-
* @
|
|
2903
|
+
* Interpolates the state at the given epoch.
|
|
2904
|
+
* @param epoch The epoch in UTC format.
|
|
2905
|
+
* @throws If the interpolator has not been initialized.
|
|
2625
2906
|
*/
|
|
2626
|
-
|
|
2907
|
+
abstract interpolate(epoch: EpochUTC): J2000 | null;
|
|
2908
|
+
get sizeBytes(): number;
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
/**
|
|
2912
|
+
* @author Theodore Kruczek
|
|
2913
|
+
* @license AGPL-3.0-or-later
|
|
2914
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
2915
|
+
*
|
|
2916
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
2917
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
2918
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
2919
|
+
*
|
|
2920
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
2921
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
2922
|
+
* See the GNU Affero General Public License for more details.
|
|
2923
|
+
*
|
|
2924
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
2925
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2926
|
+
*/
|
|
2927
|
+
|
|
2928
|
+
declare class ForceModel {
|
|
2929
|
+
private centralGravity_?;
|
|
2930
|
+
private thirdBodyGravity_?;
|
|
2931
|
+
private solarRadiationPressure_?;
|
|
2932
|
+
private atmosphericDrag_?;
|
|
2933
|
+
private maneuverThrust_;
|
|
2934
|
+
setGravity(mu?: number): this;
|
|
2935
|
+
setEarthGravity(degree: number, order: number): void;
|
|
2936
|
+
setThirdBodyGravity({ moon, sun }: {
|
|
2937
|
+
moon?: boolean | undefined;
|
|
2938
|
+
sun?: boolean | undefined;
|
|
2939
|
+
}): void;
|
|
2940
|
+
setSolarRadiationPressure(mass: number, area: number, coeff?: number): void;
|
|
2627
2941
|
/**
|
|
2628
|
-
*
|
|
2629
|
-
* @
|
|
2630
|
-
*
|
|
2942
|
+
* Sets the atmospheric drag for the force model.
|
|
2943
|
+
* @deprecated This is still a work in progress!
|
|
2944
|
+
* @param mass - The mass of the object.
|
|
2945
|
+
* @param area - The cross-sectional area of the object.
|
|
2946
|
+
* @param coeff - The drag coefficient. Default value is 2.2.
|
|
2947
|
+
* @param cosine - The cosine of the angle between the object's velocity vector and the drag force vector.
|
|
2631
2948
|
*/
|
|
2632
|
-
|
|
2949
|
+
setAtmosphericDrag(mass: number, area: number, coeff?: number, cosine?: number): void;
|
|
2950
|
+
loadManeuver(maneuver: Thrust): void;
|
|
2951
|
+
clearManeuver(): void;
|
|
2952
|
+
acceleration(state: J2000): Vector3D;
|
|
2953
|
+
derivative(state: J2000): Vector;
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
/**
|
|
2957
|
+
* @author Theodore Kruczek
|
|
2958
|
+
* @license AGPL-3.0-or-later
|
|
2959
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
2960
|
+
*
|
|
2961
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
2962
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
2963
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
2964
|
+
*
|
|
2965
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
2966
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
2967
|
+
* See the GNU Affero General Public License for more details.
|
|
2968
|
+
*
|
|
2969
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
2970
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
2971
|
+
*/
|
|
2972
|
+
|
|
2973
|
+
declare class Waypoint {
|
|
2974
|
+
epoch: EpochUTC;
|
|
2975
|
+
relativePosition: Vector3D<Kilometers>;
|
|
2976
|
+
constructor(epoch: EpochUTC, relativePosition: Vector3D<Kilometers>);
|
|
2633
2977
|
/**
|
|
2634
|
-
*
|
|
2635
|
-
*
|
|
2636
|
-
*
|
|
2978
|
+
* Return the perturbed error in a [maneuver] when compared against the
|
|
2979
|
+
* target [waypoint] given an initial [state], [forceModel],
|
|
2980
|
+
* [target] interpolator, and speculative relative maneuver
|
|
2981
|
+
* [components] _(m/s)_.
|
|
2982
|
+
* @param waypoint The waypoint to target.
|
|
2983
|
+
* @param maneuver The maneuver to perturb.
|
|
2984
|
+
* @param state The initial state of the interceptor.
|
|
2985
|
+
* @param forceModel The force model to use for propagation.
|
|
2986
|
+
* @param target The target interpolator.
|
|
2987
|
+
* @param components The speculative maneuver components.
|
|
2988
|
+
* @returns The perturbed error in the maneuver.
|
|
2637
2989
|
*/
|
|
2638
|
-
|
|
2990
|
+
static _error(waypoint: Waypoint, maneuver: Thrust, state: J2000, forceModel: ForceModel, target: StateInterpolator, components: Float64Array): number;
|
|
2639
2991
|
/**
|
|
2640
|
-
*
|
|
2641
|
-
*
|
|
2992
|
+
* Generate a score function for refining perturbed [waypoint] maneuvers.
|
|
2993
|
+
*
|
|
2994
|
+
* The score function takes an array of speculative radial, intrack, and
|
|
2995
|
+
* crosstrack components _(m/s)_ and returns the propagated error from the
|
|
2996
|
+
* desired waypoint target.
|
|
2997
|
+
* @param waypoint The waypoint to target.
|
|
2998
|
+
* @param maneuver The maneuver to perturb.
|
|
2999
|
+
* @param state The initial state of the interceptor.
|
|
3000
|
+
* @param forceModel The force model to use for propagation.
|
|
3001
|
+
* @param target The target interpolator.
|
|
3002
|
+
* @returns A score function for refining maneuvers.
|
|
2642
3003
|
*/
|
|
2643
|
-
|
|
3004
|
+
static _refineManeuverScore(waypoint: Waypoint, maneuver: Thrust, state: J2000, forceModel: ForceModel, target: StateInterpolator): (components: Float64Array) => number;
|
|
2644
3005
|
/**
|
|
2645
|
-
*
|
|
2646
|
-
*
|
|
3006
|
+
* Convert an array of [waypoints] into a maneuver sequence given an
|
|
3007
|
+
* [interceptor] state, [pivot] epoch for the first burn to arrive at the
|
|
3008
|
+
* first waypoint, and [target] ephemeris interpolator.
|
|
3009
|
+
*
|
|
3010
|
+
* Optional arguments are as follows:
|
|
3011
|
+
* - `preManeuvers`: maneuvers to execute before the pivot burn
|
|
3012
|
+
* - `postManeuvers`: maneuvers to execute after the last pivot burn
|
|
3013
|
+
* - `durationRate`: thruster duration rate _(s/m/s)_
|
|
3014
|
+
* - `forceModel`: interceptor force model, defaults to two-body
|
|
3015
|
+
* - `refine`: refine maneuvers to account for perturbations if `true`
|
|
3016
|
+
* - `maxIter`: maximum refinement iterations per maneuver
|
|
3017
|
+
* - `printIter`: print debug information on each refinement iteration
|
|
3018
|
+
* @param interceptor The interceptor state.
|
|
3019
|
+
* @param pivot The epoch of the first burn.
|
|
3020
|
+
* @param waypoints The waypoints to target.
|
|
3021
|
+
* @param target The target interpolator.
|
|
3022
|
+
* @param preManeuvers The maneuvers to execute before the pivot burn.
|
|
3023
|
+
* @param postManeuvers The maneuvers to execute after the last pivot burn.
|
|
3024
|
+
* @param root0 The optional arguments.
|
|
3025
|
+
* @param root0.durationRate The thruster duration rate.
|
|
3026
|
+
* @param root0.forceModel The interceptor force model.
|
|
3027
|
+
* @param root0.refine Whether to refine maneuvers to account for perturbations.
|
|
3028
|
+
* @param root0.maxIter The maximum refinement iterations per maneuver.
|
|
3029
|
+
* @param root0.printIter Whether to print debug information on each refinement iteration.
|
|
3030
|
+
* @returns An array of maneuvers.
|
|
2647
3031
|
*/
|
|
2648
|
-
|
|
3032
|
+
static toManeuvers(interceptor: J2000, pivot: EpochUTC, waypoints: Waypoint[], target: StateInterpolator, preManeuvers: Thrust[] | null, postManeuvers: Thrust[] | null, { durationRate, forceModel, refine, maxIter, printIter, }?: {
|
|
3033
|
+
durationRate?: number;
|
|
3034
|
+
forceModel?: ForceModel;
|
|
3035
|
+
refine?: boolean;
|
|
3036
|
+
maxIter?: number;
|
|
3037
|
+
printIter?: boolean;
|
|
3038
|
+
}): Thrust[];
|
|
3039
|
+
static _refineManeuvers(waypoints: Waypoint[], maneuvers: Thrust[], interceptor: J2000, forceModel: ForceModel, target: StateInterpolator, { maxIter, printIter, }?: {
|
|
3040
|
+
maxIter?: number;
|
|
3041
|
+
printIter?: boolean;
|
|
3042
|
+
}): Thrust[];
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3045
|
+
/**
|
|
3046
|
+
* @author Theodore Kruczek
|
|
3047
|
+
* @license AGPL-3.0-or-later
|
|
3048
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
3049
|
+
*
|
|
3050
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
3051
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
3052
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
3053
|
+
*
|
|
3054
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
3055
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
3056
|
+
* See the GNU Affero General Public License for more details.
|
|
3057
|
+
*
|
|
3058
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
3059
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
3060
|
+
*/
|
|
3061
|
+
|
|
3062
|
+
declare class Hill {
|
|
3063
|
+
epoch: EpochUTC;
|
|
3064
|
+
position: Vector3D<Kilometers>;
|
|
3065
|
+
velocity: Vector3D<KilometersPerSecond>;
|
|
3066
|
+
private semimajorAxis_;
|
|
3067
|
+
private meanMotion_;
|
|
3068
|
+
constructor(epoch: EpochUTC, position: Vector3D<Kilometers>, velocity: Vector3D<KilometersPerSecond>, semimajorAxis: Kilometers);
|
|
3069
|
+
static fromState(origin: J2000, radialPosition: Kilometers, intrackPosition: Kilometers, nodeVelocity: KilometersPerSecond, nodeOffsetTime: Seconds): Hill;
|
|
3070
|
+
static fromNmc(origin: J2000, majorAxisRange: Kilometers, nodeVelocity: KilometersPerSecond, nodeOffsetTime: Seconds, translation?: number): Hill;
|
|
3071
|
+
static fromPerch(origin: J2000, perchRange: Kilometers, nodeVelocity: KilometersPerSecond, nodeOffsetTime: Seconds): Hill;
|
|
3072
|
+
get semimajorAxis(): Kilometers;
|
|
3073
|
+
set semimajorAxis(sma: Kilometers);
|
|
3074
|
+
get meanMotion(): RadiansPerSecond;
|
|
3075
|
+
toJ2000Matrix(origin: J2000, transform: Matrix): J2000;
|
|
3076
|
+
toJ2000(origin: J2000): J2000;
|
|
3077
|
+
static transitionMatrix(t: number, meanMotion: number): Matrix;
|
|
3078
|
+
transition(t: Seconds): Hill;
|
|
3079
|
+
transitionWithMatrix(stm: Matrix, t: Seconds): Hill;
|
|
3080
|
+
propagate(newEpoch: EpochUTC): Hill;
|
|
3081
|
+
propagateWithMatrix(stm: Matrix, newEpoch: EpochUTC): Hill;
|
|
3082
|
+
maneuver(maneuver: Thrust): Hill;
|
|
3083
|
+
ephemeris(start: EpochUTC, stop: EpochUTC, step?: Seconds): Hill[];
|
|
3084
|
+
get period(): Seconds;
|
|
3085
|
+
nextRadialTangent(): Hill;
|
|
3086
|
+
solveManeuver(waypoint: Waypoint, ignoreCrosstrack?: boolean): Thrust;
|
|
3087
|
+
maneuverSequence(pivot: EpochUTC, waypoints: Waypoint[], preManeuvers?: Thrust[], postManeuvers?: Thrust[]): Thrust[];
|
|
3088
|
+
maneuverOrigin(maneuver: Thrust): Hill;
|
|
3089
|
+
get name(): string;
|
|
3090
|
+
toString(): string;
|
|
2649
3091
|
}
|
|
2650
3092
|
|
|
2651
3093
|
/**
|
|
@@ -3002,7 +3444,8 @@ declare class Tle {
|
|
|
3002
3444
|
satnum: number;
|
|
3003
3445
|
private readonly satrec_;
|
|
3004
3446
|
/**
|
|
3005
|
-
* Mapping of
|
|
3447
|
+
* Mapping of alpha-5 leading letters to their numeric values. Sourced from the
|
|
3448
|
+
* leaf `alpha5` module so TLE format helpers can share it without importing Tle.
|
|
3006
3449
|
*/
|
|
3007
3450
|
private static readonly alpha5_;
|
|
3008
3451
|
/** The argument of perigee field. */
|
|
@@ -3435,140 +3878,38 @@ declare class Tle {
|
|
|
3435
3878
|
* You should have received a copy of the GNU Affero General Public License along with
|
|
3436
3879
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
3437
3880
|
*/
|
|
3438
|
-
|
|
3439
|
-
/**
|
|
3440
|
-
* Options for creating a propagator from a Satellite via `createPropagator()`.
|
|
3441
|
-
*/
|
|
3442
|
-
interface NumericalPropagatorOptions {
|
|
3443
|
-
/**
|
|
3444
|
-
* The propagator type to create. Defaults to PropagatorType.RK89.
|
|
3445
|
-
*/
|
|
3446
|
-
type?: PropagatorType;
|
|
3447
|
-
/**
|
|
3448
|
-
* The force model for numerical propagators (RK4, DP54, RK89).
|
|
3449
|
-
* If not provided, defaults to point-mass gravity.
|
|
3450
|
-
* Ignored for SGP4 and KEPLER types.
|
|
3451
|
-
*/
|
|
3452
|
-
forceModel?: ForceModel;
|
|
3453
|
-
/**
|
|
3454
|
-
* Tolerance for adaptive propagators (DP54, RK89).
|
|
3455
|
-
* Smaller values = more accurate but slower.
|
|
3456
|
-
* Defaults to 1e-9.
|
|
3457
|
-
* Ignored for SGP4, KEPLER, and RK4.
|
|
3458
|
-
*/
|
|
3459
|
-
tolerance?: number;
|
|
3460
|
-
/**
|
|
3461
|
-
* Fixed step size in seconds for RK4 propagator.
|
|
3462
|
-
* Defaults to 15.0 seconds.
|
|
3463
|
-
* Ignored for other propagator types.
|
|
3464
|
-
*/
|
|
3465
|
-
stepSize?: number;
|
|
3466
|
-
}
|
|
3467
|
-
|
|
3468
|
-
interface OptionsParams {
|
|
3469
|
-
notes: string;
|
|
3470
|
-
}
|
|
3471
|
-
|
|
3472
|
-
/**
|
|
3473
|
-
* @author Theodore Kruczek
|
|
3474
|
-
* @license AGPL-3.0-or-later
|
|
3475
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
3476
|
-
*
|
|
3477
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
3478
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
3479
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
3480
|
-
*
|
|
3481
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
3482
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
3483
|
-
* See the GNU Affero General Public License for more details.
|
|
3484
|
-
*
|
|
3485
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
3486
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
3487
|
-
*/
|
|
3488
|
-
/**
|
|
3489
|
-
* Configuration options for history tracking.
|
|
3490
|
-
*/
|
|
3491
|
-
interface HistoryConfig {
|
|
3492
|
-
/** Maximum number of entries to store. Undefined means unlimited. */
|
|
3493
|
-
maxLength?: number;
|
|
3494
|
-
/** Minimum time between samples in milliseconds. */
|
|
3495
|
-
samplingInterval?: number;
|
|
3496
|
-
/** If true, automatically removes oldest entries when maxLength is reached. */
|
|
3497
|
-
autoClean?: boolean;
|
|
3498
|
-
}
|
|
3499
|
-
/**
|
|
3500
|
-
* A single entry in the history.
|
|
3501
|
-
*/
|
|
3502
|
-
interface HistoryEntry<T> {
|
|
3503
|
-
time: Date;
|
|
3504
|
-
data: T;
|
|
3505
|
-
}
|
|
3506
|
-
/**
|
|
3507
|
-
* Generic history tracking class for storing time-stamped data.
|
|
3508
|
-
* Used to track object state over time for visualization and analysis.
|
|
3509
|
-
*/
|
|
3510
|
-
declare class History<T> {
|
|
3511
|
-
private entries_;
|
|
3512
|
-
private config_;
|
|
3513
|
-
private lastSampleTime_;
|
|
3514
|
-
constructor(config?: HistoryConfig);
|
|
3515
|
-
/**
|
|
3516
|
-
* Adds a new entry to the history.
|
|
3517
|
-
* Respects sampling interval and max length constraints.
|
|
3518
|
-
* @param time - The timestamp for this entry
|
|
3519
|
-
* @param data - The data to store
|
|
3520
|
-
*/
|
|
3521
|
-
add(time: Date, data: T): void;
|
|
3522
|
-
/**
|
|
3523
|
-
* Returns all history entries.
|
|
3524
|
-
*/
|
|
3525
|
-
getAll(): HistoryEntry<T>[];
|
|
3526
|
-
/**
|
|
3527
|
-
* Returns entries within a time range (inclusive).
|
|
3528
|
-
* @param start - Start of the time range
|
|
3529
|
-
* @param end - End of the time range
|
|
3530
|
-
*/
|
|
3531
|
-
getRange(start: Date, end: Date): HistoryEntry<T>[];
|
|
3532
|
-
/**
|
|
3533
|
-
* Returns the last n entries.
|
|
3534
|
-
* @param n - Number of entries to return
|
|
3535
|
-
*/
|
|
3536
|
-
getLast(n: number): HistoryEntry<T>[];
|
|
3537
|
-
/**
|
|
3538
|
-
* Returns the first entry, or undefined if empty.
|
|
3539
|
-
*/
|
|
3540
|
-
getFirst(): HistoryEntry<T> | undefined;
|
|
3541
|
-
/**
|
|
3542
|
-
* Returns the most recent entry, or undefined if empty.
|
|
3543
|
-
*/
|
|
3544
|
-
getLatest(): HistoryEntry<T> | undefined;
|
|
3545
|
-
/**
|
|
3546
|
-
* Clears all history entries.
|
|
3547
|
-
*/
|
|
3548
|
-
clear(): void;
|
|
3549
|
-
/**
|
|
3550
|
-
* Creates a deep copy of this history.
|
|
3551
|
-
* @returns A new History instance with cloned entries
|
|
3552
|
-
*/
|
|
3553
|
-
clone(): History<T>;
|
|
3881
|
+
|
|
3882
|
+
/**
|
|
3883
|
+
* Options for creating a propagator from a Satellite via `createPropagator()`.
|
|
3884
|
+
*/
|
|
3885
|
+
interface NumericalPropagatorOptions {
|
|
3554
3886
|
/**
|
|
3555
|
-
*
|
|
3887
|
+
* The propagator type to create. Defaults to PropagatorType.RK89.
|
|
3556
3888
|
*/
|
|
3557
|
-
|
|
3889
|
+
type?: PropagatorType;
|
|
3558
3890
|
/**
|
|
3559
|
-
*
|
|
3891
|
+
* The force model for numerical propagators (RK4, DP54, RK89).
|
|
3892
|
+
* If not provided, defaults to point-mass gravity.
|
|
3893
|
+
* Ignored for SGP4 and KEPLER types.
|
|
3560
3894
|
*/
|
|
3561
|
-
|
|
3895
|
+
forceModel?: ForceModel;
|
|
3562
3896
|
/**
|
|
3563
|
-
*
|
|
3897
|
+
* Tolerance for adaptive propagators (DP54, RK89).
|
|
3898
|
+
* Smaller values = more accurate but slower.
|
|
3899
|
+
* Defaults to 1e-9.
|
|
3900
|
+
* Ignored for SGP4, KEPLER, and RK4.
|
|
3564
3901
|
*/
|
|
3565
|
-
|
|
3902
|
+
tolerance?: number;
|
|
3566
3903
|
/**
|
|
3567
|
-
*
|
|
3568
|
-
*
|
|
3904
|
+
* Fixed step size in seconds for RK4 propagator.
|
|
3905
|
+
* Defaults to 15.0 seconds.
|
|
3906
|
+
* Ignored for other propagator types.
|
|
3569
3907
|
*/
|
|
3570
|
-
|
|
3571
|
-
|
|
3908
|
+
stepSize?: number;
|
|
3909
|
+
}
|
|
3910
|
+
|
|
3911
|
+
interface OptionsParams {
|
|
3912
|
+
notes: string;
|
|
3572
3913
|
}
|
|
3573
3914
|
|
|
3574
3915
|
/**
|
|
@@ -3917,241 +4258,44 @@ declare abstract class Propagator {
|
|
|
3917
4258
|
*/
|
|
3918
4259
|
|
|
3919
4260
|
declare abstract class RungeKuttaAdaptive extends Propagator {
|
|
3920
|
-
private readonly initState_;
|
|
3921
|
-
private forceModel_;
|
|
3922
|
-
private readonly tolerance_;
|
|
3923
|
-
/**
|
|
3924
|
-
* Create a new [RungeKuttaAdaptive] object from an initial state vector
|
|
3925
|
-
* along with an optional [ForceModel] and [tolerance].
|
|
3926
|
-
* @param initState_ Initial state vector.
|
|
3927
|
-
* @param forceModel_ Numerical integration force model.
|
|
3928
|
-
* @param tolerance_ Minimum allowable local error tolerance.
|
|
3929
|
-
*/
|
|
3930
|
-
constructor(initState_: J2000, forceModel_?: ForceModel, tolerance_?: number);
|
|
3931
|
-
private _cacheState;
|
|
3932
|
-
private readonly _checkpoints;
|
|
3933
|
-
private _stepSize;
|
|
3934
|
-
private static readonly _minTolerance;
|
|
3935
|
-
protected abstract get a(): Float64Array;
|
|
3936
|
-
protected abstract get b(): Float64Array[];
|
|
3937
|
-
protected abstract get ch(): Float64Array;
|
|
3938
|
-
protected abstract get c(): Float64Array;
|
|
3939
|
-
protected abstract get order(): number;
|
|
3940
|
-
get state(): J2000;
|
|
3941
|
-
reset(): void;
|
|
3942
|
-
setForceModel(forceModel: ForceModel): void;
|
|
3943
|
-
private kfn_;
|
|
3944
|
-
private integrate_;
|
|
3945
|
-
propagate(epoch: EpochUTC): J2000;
|
|
3946
|
-
maneuver(maneuver: Thrust, interval?: Seconds): J2000[];
|
|
3947
|
-
ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval?: Seconds): VerletBlendInterpolator;
|
|
3948
|
-
checkpoint(): number;
|
|
3949
|
-
clearCheckpoints(): void;
|
|
3950
|
-
restore(index: number): void;
|
|
3951
|
-
}
|
|
3952
|
-
|
|
3953
|
-
/**
|
|
3954
|
-
* @author Theodore Kruczek
|
|
3955
|
-
* @license AGPL-3.0-or-later
|
|
3956
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
3957
|
-
*
|
|
3958
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
3959
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
3960
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
3961
|
-
*
|
|
3962
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
3963
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
3964
|
-
* See the GNU Affero General Public License for more details.
|
|
3965
|
-
*
|
|
3966
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
3967
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
3968
|
-
*/
|
|
3969
|
-
|
|
3970
|
-
declare class RungeKutta89Propagator extends RungeKuttaAdaptive {
|
|
3971
|
-
private readonly a_;
|
|
3972
|
-
private readonly b_;
|
|
3973
|
-
private readonly ch_;
|
|
3974
|
-
private readonly c_;
|
|
3975
|
-
get a(): Float64Array;
|
|
3976
|
-
get b(): Float64Array[];
|
|
3977
|
-
get ch(): Float64Array;
|
|
3978
|
-
get c(): Float64Array;
|
|
3979
|
-
get order(): number;
|
|
3980
|
-
}
|
|
3981
|
-
|
|
3982
|
-
/**
|
|
3983
|
-
* @author Theodore Kruczek
|
|
3984
|
-
* @license AGPL-3.0-or-later
|
|
3985
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
3986
|
-
*
|
|
3987
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
3988
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
3989
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
3990
|
-
*
|
|
3991
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
3992
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
3993
|
-
* See the GNU Affero General Public License for more details.
|
|
3994
|
-
*
|
|
3995
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
3996
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
3997
|
-
*/
|
|
3998
|
-
|
|
3999
|
-
/**
|
|
4000
|
-
* Sgp4Propagator is a propagator that uses the SGP4 model to propagate the state of an object.
|
|
4001
|
-
* This class is useful for propagating multiple states with the same TLE, since it caches the
|
|
4002
|
-
* state of the TLE at different epochs.
|
|
4003
|
-
*/
|
|
4004
|
-
declare class Sgp4Propagator extends Propagator {
|
|
4005
|
-
private readonly tle_;
|
|
4006
|
-
constructor(tle_: Tle);
|
|
4007
|
-
private cacheState_;
|
|
4008
|
-
private checkpoints_;
|
|
4009
|
-
/**
|
|
4010
|
-
* Gets the state of the propagator in the J2000 coordinate system.
|
|
4011
|
-
* @returns The J2000 state of the propagator.
|
|
4012
|
-
*/
|
|
4013
|
-
get state(): J2000;
|
|
4014
|
-
/**
|
|
4015
|
-
* Calculates the ephemeris maneuver using the SGP4 propagator.
|
|
4016
|
-
* @param start The start epoch in UTC.
|
|
4017
|
-
* @param finish The finish epoch in UTC.
|
|
4018
|
-
* @param maneuvers The array of thrust maneuvers.
|
|
4019
|
-
* @param interval The time interval in seconds.
|
|
4020
|
-
*/
|
|
4021
|
-
ephemerisManeuver(_start: EpochUTC, _finish: EpochUTC, _maneuvers: Thrust[], _interval?: number): VerletBlendInterpolator;
|
|
4022
|
-
/**
|
|
4023
|
-
* Performs a maneuver with the given thrust.
|
|
4024
|
-
* @param maneuver - The thrust maneuver to perform.
|
|
4025
|
-
* @param interval - The time interval for the maneuver (default: 60.0 seconds).
|
|
4026
|
-
* @throws Error if maneuvers cannot be modeled with SGP4.
|
|
4027
|
-
*/
|
|
4028
|
-
maneuver(_maneuver: Thrust, _interval?: number): J2000[];
|
|
4029
|
-
/**
|
|
4030
|
-
* Propagates the state of the Sgp4Propagator to a specified epoch in J2000 coordinates.
|
|
4031
|
-
* @param epoch - The epoch in UTC format.
|
|
4032
|
-
* @returns The propagated state in J2000 coordinates.
|
|
4033
|
-
*/
|
|
4034
|
-
propagate(epoch: EpochUTC): J2000;
|
|
4035
|
-
/**
|
|
4036
|
-
* Resets the state of the Sgp4Propagator by updating the cache state
|
|
4037
|
-
* to the current J2000 state of the TLE.
|
|
4038
|
-
*/
|
|
4039
|
-
reset(): void;
|
|
4040
|
-
/**
|
|
4041
|
-
* Saves the current state of the propagator and returns the index of the checkpoint.
|
|
4042
|
-
* @returns The index of the checkpoint.
|
|
4043
|
-
*/
|
|
4044
|
-
checkpoint(): number;
|
|
4045
|
-
/**
|
|
4046
|
-
* Clears all the checkpoints in the propagator.
|
|
4047
|
-
*/
|
|
4048
|
-
clearCheckpoints(): void;
|
|
4049
|
-
/**
|
|
4050
|
-
* Restores the state of the propagator to a previously saved checkpoint.
|
|
4051
|
-
* @param index - The index of the checkpoint to restore.
|
|
4052
|
-
*/
|
|
4053
|
-
restore(index: number): void;
|
|
4054
|
-
}
|
|
4055
|
-
|
|
4056
|
-
/**
|
|
4057
|
-
* @author Theodore Kruczek
|
|
4058
|
-
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
4059
|
-
* with satellites and other orbital objects.
|
|
4060
|
-
* @license AGPL-3.0-or-later
|
|
4061
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
4062
|
-
*
|
|
4063
|
-
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
4064
|
-
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
4065
|
-
* is licensed under the MIT license.
|
|
4066
|
-
*
|
|
4067
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
4068
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
4069
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
4070
|
-
*
|
|
4071
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
4072
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
4073
|
-
* See the GNU Affero General Public License for more details.
|
|
4074
|
-
*
|
|
4075
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
4076
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
4077
|
-
*/
|
|
4078
|
-
|
|
4079
|
-
interface BaseObjectParams {
|
|
4080
|
-
id?: number;
|
|
4081
|
-
name?: string;
|
|
4082
|
-
type?: SpaceObjectType;
|
|
4083
|
-
active?: boolean;
|
|
4084
|
-
metadata?: Record<string, unknown>;
|
|
4085
|
-
}
|
|
4086
|
-
|
|
4087
|
-
/**
|
|
4088
|
-
* @author Theodore Kruczek
|
|
4089
|
-
* @license AGPL-3.0-or-later
|
|
4090
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
4091
|
-
*
|
|
4092
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
4093
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
4094
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
4095
|
-
*
|
|
4096
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
4097
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
4098
|
-
* See the GNU Affero General Public License for more details.
|
|
4099
|
-
*
|
|
4100
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
4101
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
4102
|
-
*/
|
|
4103
|
-
|
|
4104
|
-
/**
|
|
4105
|
-
* State data that can be recorded in history.
|
|
4106
|
-
*/
|
|
4107
|
-
interface HistoricalState {
|
|
4108
|
-
position: TemeVec3;
|
|
4109
|
-
velocity: TemeVec3<KilometersPerSecond>;
|
|
4110
|
-
}
|
|
4111
|
-
/**
|
|
4112
|
-
* Serialized representation of a BaseObject.
|
|
4113
|
-
* Used for persistence and data transfer.
|
|
4114
|
-
*/
|
|
4115
|
-
interface SerializedObject {
|
|
4116
|
-
/** The class name of the object */
|
|
4117
|
-
type: string;
|
|
4118
|
-
/** Unique identifier */
|
|
4119
|
-
id: number;
|
|
4120
|
-
/** Human-readable name */
|
|
4121
|
-
name: string;
|
|
4122
|
-
/** Additional type-specific data */
|
|
4123
|
-
[key: string]: unknown;
|
|
4124
|
-
}
|
|
4125
|
-
/**
|
|
4126
|
-
* Placeholder interface for sensors (will be defined in Phase 2).
|
|
4127
|
-
* This allows SpaceObject and GroundObject to reference sensors
|
|
4128
|
-
* without creating circular dependencies.
|
|
4129
|
-
*/
|
|
4130
|
-
interface SensorInterface {
|
|
4131
|
-
id: number;
|
|
4132
|
-
name: string;
|
|
4133
|
-
}
|
|
4134
|
-
/**
|
|
4135
|
-
* Placeholder interface for communication devices (will be defined in Phase 3).
|
|
4136
|
-
* This allows SpaceObject and GroundObject to reference comm devices
|
|
4137
|
-
* without creating circular dependencies.
|
|
4138
|
-
*/
|
|
4139
|
-
interface CommunicationDeviceInterface {
|
|
4140
|
-
id: number;
|
|
4141
|
-
name: string;
|
|
4261
|
+
private readonly initState_;
|
|
4262
|
+
private forceModel_;
|
|
4263
|
+
private readonly tolerance_;
|
|
4264
|
+
/**
|
|
4265
|
+
* Create a new [RungeKuttaAdaptive] object from an initial state vector
|
|
4266
|
+
* along with an optional [ForceModel] and [tolerance].
|
|
4267
|
+
* @param initState_ Initial state vector.
|
|
4268
|
+
* @param forceModel_ Numerical integration force model.
|
|
4269
|
+
* @param tolerance_ Minimum allowable local error tolerance.
|
|
4270
|
+
*/
|
|
4271
|
+
constructor(initState_: J2000, forceModel_?: ForceModel, tolerance_?: number);
|
|
4272
|
+
private _cacheState;
|
|
4273
|
+
private readonly _checkpoints;
|
|
4274
|
+
private _stepSize;
|
|
4275
|
+
private static readonly _minTolerance;
|
|
4276
|
+
protected abstract get a(): Float64Array;
|
|
4277
|
+
protected abstract get b(): Float64Array[];
|
|
4278
|
+
protected abstract get ch(): Float64Array;
|
|
4279
|
+
protected abstract get c(): Float64Array;
|
|
4280
|
+
protected abstract get order(): number;
|
|
4281
|
+
get state(): J2000;
|
|
4282
|
+
reset(): void;
|
|
4283
|
+
setForceModel(forceModel: ForceModel): void;
|
|
4284
|
+
private kfn_;
|
|
4285
|
+
private integrate_;
|
|
4286
|
+
propagate(epoch: EpochUTC): J2000;
|
|
4287
|
+
maneuver(maneuver: Thrust, interval?: Seconds): J2000[];
|
|
4288
|
+
ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval?: Seconds): VerletBlendInterpolator;
|
|
4289
|
+
checkpoint(): number;
|
|
4290
|
+
clearCheckpoints(): void;
|
|
4291
|
+
restore(index: number): void;
|
|
4142
4292
|
}
|
|
4143
4293
|
|
|
4144
4294
|
/**
|
|
4145
4295
|
* @author Theodore Kruczek
|
|
4146
|
-
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
4147
|
-
* with satellites and other orbital objects.
|
|
4148
4296
|
* @license AGPL-3.0-or-later
|
|
4149
4297
|
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
4150
4298
|
*
|
|
4151
|
-
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
4152
|
-
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
4153
|
-
* is licensed under the MIT license.
|
|
4154
|
-
*
|
|
4155
4299
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
4156
4300
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
4157
4301
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
@@ -4164,110 +4308,23 @@ interface CommunicationDeviceInterface {
|
|
|
4164
4308
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
4165
4309
|
*/
|
|
4166
4310
|
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
/** Type classification of the object */
|
|
4178
|
-
type: SpaceObjectType;
|
|
4179
|
-
/** Whether the object is currently active */
|
|
4180
|
-
active: boolean;
|
|
4181
|
-
/** Additional metadata for the object */
|
|
4182
|
-
metadata?: Record<string, unknown>;
|
|
4183
|
-
/** History tracking (null until enabled) */
|
|
4184
|
-
private history_;
|
|
4185
|
-
constructor(info: BaseObjectParams);
|
|
4186
|
-
/**
|
|
4187
|
-
* Enables history tracking for this object.
|
|
4188
|
-
* @param config - Optional configuration for history behavior
|
|
4189
|
-
*/
|
|
4190
|
-
enableHistory(config?: HistoryConfig): void;
|
|
4191
|
-
/**
|
|
4192
|
-
* Disables history tracking and clears existing history.
|
|
4193
|
-
*/
|
|
4194
|
-
disableHistory(): void;
|
|
4195
|
-
/**
|
|
4196
|
-
* Returns the history object if enabled, null otherwise.
|
|
4197
|
-
*/
|
|
4198
|
-
get history(): History<HistoricalState> | null;
|
|
4199
|
-
/**
|
|
4200
|
-
* Returns true if history tracking is enabled.
|
|
4201
|
-
*/
|
|
4202
|
-
get isHistoryEnabled(): boolean;
|
|
4203
|
-
/**
|
|
4204
|
-
* Records a state to history if history tracking is enabled.
|
|
4205
|
-
* @param time - The timestamp for this state
|
|
4206
|
-
* @param state - The state to record
|
|
4207
|
-
*/
|
|
4208
|
-
protected recordToHistory(time: Date, state: HistoricalState): void;
|
|
4209
|
-
/**
|
|
4210
|
-
* Serializes the object to a plain object for persistence.
|
|
4211
|
-
*/
|
|
4212
|
-
serialize(): SerializedObject;
|
|
4213
|
-
/**
|
|
4214
|
-
* Returns type-specific serialization data.
|
|
4215
|
-
* Subclasses must implement this to add their specific properties.
|
|
4216
|
-
*/
|
|
4217
|
-
protected abstract serializeSpecific(): Record<string, unknown>;
|
|
4218
|
-
/**
|
|
4219
|
-
* Checks if the object is a satellite.
|
|
4220
|
-
* @returns True if the object is a satellite, false otherwise.
|
|
4221
|
-
*/
|
|
4222
|
-
isSatellite(): boolean;
|
|
4223
|
-
/**
|
|
4224
|
-
* Checks if the object is a ground object.
|
|
4225
|
-
* @returns True if the object is a ground object, false otherwise.
|
|
4226
|
-
*/
|
|
4227
|
-
isGroundObject(): boolean;
|
|
4228
|
-
/**
|
|
4229
|
-
* Returns whether the object is a sensor.
|
|
4230
|
-
* @returns True if the object is a sensor, false otherwise.
|
|
4231
|
-
*/
|
|
4232
|
-
isSensor(): boolean;
|
|
4233
|
-
/**
|
|
4234
|
-
* Checks if the object is a marker.
|
|
4235
|
-
* @returns True if the object is a marker, false otherwise.
|
|
4236
|
-
*/
|
|
4237
|
-
isMarker(): boolean;
|
|
4238
|
-
/**
|
|
4239
|
-
* Returns whether the object's position is static.
|
|
4240
|
-
* @returns True if the object is static, false otherwise.
|
|
4241
|
-
*/
|
|
4242
|
-
isStatic(): boolean;
|
|
4243
|
-
isPayload(): boolean;
|
|
4244
|
-
isRocketBody(): boolean;
|
|
4245
|
-
isDebris(): boolean;
|
|
4246
|
-
isStar(): boolean;
|
|
4247
|
-
isMissile(): boolean;
|
|
4248
|
-
isNotional(): boolean;
|
|
4249
|
-
getTypeString(): string;
|
|
4250
|
-
/**
|
|
4251
|
-
* Validates a parameter value against a minimum and maximum value.
|
|
4252
|
-
* @param value - The value to be validated.
|
|
4253
|
-
* @param minValue - The minimum allowed value.
|
|
4254
|
-
* @param maxValue - The maximum allowed value.
|
|
4255
|
-
* @param errorMessage - The error message to be thrown if the value is invalid.
|
|
4256
|
-
*/
|
|
4257
|
-
validateParameter<T>(value: T, minValue: T | null, maxValue: T | null, errorMessage: string): void;
|
|
4311
|
+
declare class RungeKutta89Propagator extends RungeKuttaAdaptive {
|
|
4312
|
+
private readonly a_;
|
|
4313
|
+
private readonly b_;
|
|
4314
|
+
private readonly ch_;
|
|
4315
|
+
private readonly c_;
|
|
4316
|
+
get a(): Float64Array;
|
|
4317
|
+
get b(): Float64Array[];
|
|
4318
|
+
get ch(): Float64Array;
|
|
4319
|
+
get c(): Float64Array;
|
|
4320
|
+
get order(): number;
|
|
4258
4321
|
}
|
|
4259
4322
|
|
|
4260
4323
|
/**
|
|
4261
4324
|
* @author Theodore Kruczek
|
|
4262
|
-
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
4263
|
-
* with satellites and other orbital objects.
|
|
4264
4325
|
* @license AGPL-3.0-or-later
|
|
4265
4326
|
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
4266
4327
|
*
|
|
4267
|
-
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
4268
|
-
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
4269
|
-
* is licensed under the MIT license.
|
|
4270
|
-
*
|
|
4271
4328
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
4272
4329
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
4273
4330
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
@@ -4281,100 +4338,60 @@ declare abstract class BaseObject {
|
|
|
4281
4338
|
*/
|
|
4282
4339
|
|
|
4283
4340
|
/**
|
|
4284
|
-
*
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
lat: Degrees;
|
|
4288
|
-
lon: Degrees;
|
|
4289
|
-
alt: Kilometers;
|
|
4290
|
-
}
|
|
4291
|
-
/**
|
|
4292
|
-
* Abstract base class for all objects on Earth's surface.
|
|
4293
|
-
* Provides coordinate conversion methods and component attachment capabilities.
|
|
4341
|
+
* Sgp4Propagator is a propagator that uses the SGP4 model to propagate the state of an object.
|
|
4342
|
+
* This class is useful for propagating multiple states with the same TLE, since it caches the
|
|
4343
|
+
* state of the TLE at different epochs.
|
|
4294
4344
|
*/
|
|
4295
|
-
declare
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
/** Sensors attached to this ground object */
|
|
4301
|
-
sensors: SensorInterface[];
|
|
4302
|
-
/** Communication devices attached to this ground object */
|
|
4303
|
-
commDevices: CommunicationDeviceInterface[];
|
|
4304
|
-
constructor(info: GroundObjectParams);
|
|
4305
|
-
/**
|
|
4306
|
-
* Calculates the relative azimuth, elevation, and range between this GroundObject and a Satellite.
|
|
4307
|
-
* @param satellite The Satellite object.
|
|
4308
|
-
* @param date The date for which to calculate the RAE values. Defaults to the current date.
|
|
4309
|
-
* @returns The relative azimuth, elevation, and range values in kilometers and degrees.
|
|
4310
|
-
*/
|
|
4311
|
-
rae(satellite: Satellite, date?: Date): RaeVec3<Kilometers, Degrees> | null;
|
|
4312
|
-
/**
|
|
4313
|
-
* Calculates ECEF position at a given time.
|
|
4314
|
-
* @variation optimized version of this.toGeodetic().toITRF().position;
|
|
4315
|
-
* @returns The ECEF position vector of the ground object.
|
|
4316
|
-
*/
|
|
4317
|
-
ecef(): EcefVec3<Kilometers>;
|
|
4318
|
-
/**
|
|
4319
|
-
* Calculates the Earth-Centered Inertial (ECI) position vector of the ground object at a given date.
|
|
4320
|
-
* @variation optimized version of this.toGeodetic().toITRF().toJ2000().position;
|
|
4321
|
-
* @param date The date for which to calculate the ECI position vector. Defaults to the current date.
|
|
4322
|
-
* @returns The ECI position vector of the ground object.
|
|
4323
|
-
*/
|
|
4324
|
-
eci(date?: Date): TemeVec3<Kilometers>;
|
|
4325
|
-
/**
|
|
4326
|
-
* Returns the latitude, longitude, and altitude of the GroundObject.
|
|
4327
|
-
* @returns The latitude, longitude, and altitude as an LlaVec3 object.
|
|
4328
|
-
*/
|
|
4329
|
-
lla(): LlaVec3<Degrees, Kilometers>;
|
|
4345
|
+
declare class Sgp4Propagator extends Propagator {
|
|
4346
|
+
private readonly tle_;
|
|
4347
|
+
constructor(tle_: Tle);
|
|
4348
|
+
private cacheState_;
|
|
4349
|
+
private checkpoints_;
|
|
4330
4350
|
/**
|
|
4331
|
-
*
|
|
4332
|
-
* @
|
|
4333
|
-
* serialization.
|
|
4334
|
-
* @returns An object containing the latitude, longitude, and altitude in radians and kilometers.
|
|
4351
|
+
* Gets the state of the propagator in the J2000 coordinate system.
|
|
4352
|
+
* @returns The J2000 state of the propagator.
|
|
4335
4353
|
*/
|
|
4336
|
-
|
|
4337
|
-
get latRad(): Radians;
|
|
4338
|
-
get lonRad(): Radians;
|
|
4354
|
+
get state(): J2000;
|
|
4339
4355
|
/**
|
|
4340
|
-
*
|
|
4341
|
-
* @
|
|
4356
|
+
* Calculates the ephemeris maneuver using the SGP4 propagator.
|
|
4357
|
+
* @param start The start epoch in UTC.
|
|
4358
|
+
* @param finish The finish epoch in UTC.
|
|
4359
|
+
* @param maneuvers The array of thrust maneuvers.
|
|
4360
|
+
* @param interval The time interval in seconds.
|
|
4342
4361
|
*/
|
|
4343
|
-
|
|
4362
|
+
ephemerisManeuver(_start: EpochUTC, _finish: EpochUTC, _maneuvers: Thrust[], _interval?: number): VerletBlendInterpolator;
|
|
4344
4363
|
/**
|
|
4345
|
-
*
|
|
4346
|
-
*
|
|
4347
|
-
* @param
|
|
4348
|
-
* @
|
|
4364
|
+
* Performs a maneuver with the given thrust.
|
|
4365
|
+
* @param maneuver - The thrust maneuver to perform.
|
|
4366
|
+
* @param interval - The time interval for the maneuver (default: 60.0 seconds).
|
|
4367
|
+
* @throws Error if maneuvers cannot be modeled with SGP4.
|
|
4349
4368
|
*/
|
|
4350
|
-
|
|
4369
|
+
maneuver(_maneuver: Thrust, _interval?: number): J2000[];
|
|
4351
4370
|
/**
|
|
4352
|
-
*
|
|
4353
|
-
* @param
|
|
4371
|
+
* Propagates the state of the Sgp4Propagator to a specified epoch in J2000 coordinates.
|
|
4372
|
+
* @param epoch - The epoch in UTC format.
|
|
4373
|
+
* @returns The propagated state in J2000 coordinates.
|
|
4354
4374
|
*/
|
|
4355
|
-
|
|
4375
|
+
propagate(epoch: EpochUTC): J2000;
|
|
4356
4376
|
/**
|
|
4357
|
-
*
|
|
4358
|
-
*
|
|
4377
|
+
* Resets the state of the Sgp4Propagator by updating the cache state
|
|
4378
|
+
* to the current J2000 state of the TLE.
|
|
4359
4379
|
*/
|
|
4360
|
-
|
|
4380
|
+
reset(): void;
|
|
4361
4381
|
/**
|
|
4362
|
-
*
|
|
4363
|
-
* @
|
|
4382
|
+
* Saves the current state of the propagator and returns the index of the checkpoint.
|
|
4383
|
+
* @returns The index of the checkpoint.
|
|
4364
4384
|
*/
|
|
4365
|
-
|
|
4385
|
+
checkpoint(): number;
|
|
4366
4386
|
/**
|
|
4367
|
-
*
|
|
4368
|
-
* @param deviceId - The ID of the device to remove
|
|
4387
|
+
* Clears all the checkpoints in the propagator.
|
|
4369
4388
|
*/
|
|
4370
|
-
|
|
4371
|
-
isGroundObject(): boolean;
|
|
4389
|
+
clearCheckpoints(): void;
|
|
4372
4390
|
/**
|
|
4373
|
-
*
|
|
4374
|
-
* @param
|
|
4375
|
-
* longitude, and altitude.
|
|
4391
|
+
* Restores the state of the propagator to a previously saved checkpoint.
|
|
4392
|
+
* @param index - The index of the checkpoint to restore.
|
|
4376
4393
|
*/
|
|
4377
|
-
|
|
4394
|
+
restore(index: number): void;
|
|
4378
4395
|
}
|
|
4379
4396
|
|
|
4380
4397
|
/**
|
|
@@ -5277,6 +5294,10 @@ declare class Satellite extends SpaceObject {
|
|
|
5277
5294
|
* @returns Time variables
|
|
5278
5295
|
*/
|
|
5279
5296
|
private static calculateTimeVariables_;
|
|
5297
|
+
/** Single-entry memo for calculateTimeVariables_, keyed on Date.getTime() */
|
|
5298
|
+
private static timeVariablesCacheMs_;
|
|
5299
|
+
private static timeVariablesCacheJ_;
|
|
5300
|
+
private static timeVariablesCacheGmst_;
|
|
5280
5301
|
}
|
|
5281
5302
|
|
|
5282
5303
|
/**
|
|
@@ -6109,35 +6130,6 @@ interface StarObjectParams extends BaseObjectParams {
|
|
|
6109
6130
|
bayer?: string;
|
|
6110
6131
|
}
|
|
6111
6132
|
|
|
6112
|
-
/**
|
|
6113
|
-
* @author Theodore Kruczek
|
|
6114
|
-
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
6115
|
-
* with satellites and other orbital objects.
|
|
6116
|
-
* @license AGPL-3.0-or-later
|
|
6117
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
6118
|
-
*
|
|
6119
|
-
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
6120
|
-
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
6121
|
-
* is licensed under the MIT license.
|
|
6122
|
-
*
|
|
6123
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
6124
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
6125
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
6126
|
-
*
|
|
6127
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
6128
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
6129
|
-
* See the GNU Affero General Public License for more details.
|
|
6130
|
-
*
|
|
6131
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
6132
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
6133
|
-
*/
|
|
6134
|
-
|
|
6135
|
-
declare class EpochWindow {
|
|
6136
|
-
start: EpochUTC;
|
|
6137
|
-
end: EpochUTC;
|
|
6138
|
-
constructor(start: EpochUTC, end: EpochUTC);
|
|
6139
|
-
}
|
|
6140
|
-
|
|
6141
6133
|
/**
|
|
6142
6134
|
* @author Theodore Kruczek
|
|
6143
6135
|
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
@@ -7545,6 +7537,49 @@ declare const MILLISECONDS_PER_SECOND: Milliseconds;
|
|
|
7545
7537
|
declare const RADIUS_OF_EARTH = 6371;
|
|
7546
7538
|
declare const earthGravityParam = 398600.4415;
|
|
7547
7539
|
|
|
7540
|
+
/**
|
|
7541
|
+
* @author Theodore Kruczek
|
|
7542
|
+
* @license AGPL-3.0-or-later
|
|
7543
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
7544
|
+
*
|
|
7545
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7546
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
7547
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
7548
|
+
*
|
|
7549
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
7550
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
7551
|
+
* See the GNU Affero General Public License for more details.
|
|
7552
|
+
*
|
|
7553
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
7554
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
7555
|
+
*/
|
|
7556
|
+
|
|
7557
|
+
/** Covariance Frame */
|
|
7558
|
+
declare enum CovarianceFrame {
|
|
7559
|
+
/** Earth-centered inertial */
|
|
7560
|
+
ECI = "eci",
|
|
7561
|
+
/** Radial-Intrack-Crosstrack */
|
|
7562
|
+
RIC = "ric"
|
|
7563
|
+
}
|
|
7564
|
+
declare class StateCovariance {
|
|
7565
|
+
matrix: Matrix;
|
|
7566
|
+
frame: CovarianceFrame;
|
|
7567
|
+
/**
|
|
7568
|
+
* Create a new [StateCovariance] object given its covariance [matrix] and
|
|
7569
|
+
* [CovarianceFrame].
|
|
7570
|
+
* @param matrix The covariance matrix.
|
|
7571
|
+
* @param frame The covariance frame.
|
|
7572
|
+
* @returns A new [StateCovariance] object.
|
|
7573
|
+
*/
|
|
7574
|
+
constructor(matrix: Matrix, frame: CovarianceFrame);
|
|
7575
|
+
static fromSigmas(sigmas: number[], frame: CovarianceFrame): StateCovariance;
|
|
7576
|
+
/**
|
|
7577
|
+
* Calculates the standard deviations (sigmas) of each element in the covariance matrix.
|
|
7578
|
+
* @returns A vector containing the standard deviations of each element in the covariance matrix.
|
|
7579
|
+
*/
|
|
7580
|
+
sigmas(): Vector;
|
|
7581
|
+
}
|
|
7582
|
+
|
|
7548
7583
|
/**
|
|
7549
7584
|
* Creates a 6x6 state covariance matrix from a TLE
|
|
7550
7585
|
* @param tleLine1 The first line of the TLE
|
|
@@ -8863,65 +8898,6 @@ declare class EphemerisSatellite extends SpaceObject {
|
|
|
8863
8898
|
private createInterpolator_;
|
|
8864
8899
|
}
|
|
8865
8900
|
|
|
8866
|
-
/**
|
|
8867
|
-
* @author Theodore Kruczek
|
|
8868
|
-
* @license AGPL-3.0-or-later
|
|
8869
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
8870
|
-
*
|
|
8871
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8872
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8873
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
8874
|
-
*
|
|
8875
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
8876
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
8877
|
-
* See the GNU Affero General Public License for more details.
|
|
8878
|
-
*
|
|
8879
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
8880
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
8881
|
-
*/
|
|
8882
|
-
|
|
8883
|
-
/**
|
|
8884
|
-
* Parameters for constructing a GroundStation.
|
|
8885
|
-
*/
|
|
8886
|
-
interface GroundStationParams extends GroundObjectParams {
|
|
8887
|
-
}
|
|
8888
|
-
/**
|
|
8889
|
-
* A concrete ground station that can host sensors and communication devices.
|
|
8890
|
-
* Use this class for fixed ground locations like tracking stations, observatories, etc.
|
|
8891
|
-
*/
|
|
8892
|
-
declare class GroundStation extends GroundObject {
|
|
8893
|
-
constructor(info: GroundStationParams);
|
|
8894
|
-
/**
|
|
8895
|
-
* Creates a GroundStation from a Geodetic position.
|
|
8896
|
-
* @param geodetic - The geodetic coordinates
|
|
8897
|
-
* @param name - Optional name for the station
|
|
8898
|
-
* @param id - Optional unique identifier
|
|
8899
|
-
*/
|
|
8900
|
-
static fromGeodetic(geodetic: Geodetic, name?: string, id?: number): GroundStation;
|
|
8901
|
-
/**
|
|
8902
|
-
* Creates a deep copy of this ground station.
|
|
8903
|
-
*/
|
|
8904
|
-
clone(): GroundStation;
|
|
8905
|
-
/**
|
|
8906
|
-
* Creates a new GroundStation at a different position.
|
|
8907
|
-
* The original instance remains unchanged.
|
|
8908
|
-
* @param lat - New latitude in degrees
|
|
8909
|
-
* @param lon - New longitude in degrees
|
|
8910
|
-
* @param alt - Optional new altitude in kilometers (defaults to current altitude)
|
|
8911
|
-
* @returns A new GroundStation at the specified position
|
|
8912
|
-
*/
|
|
8913
|
-
moveTo(lat: Degrees, lon: Degrees, alt?: Kilometers): GroundStation;
|
|
8914
|
-
/**
|
|
8915
|
-
* Returns true since GroundStation is always a ground object.
|
|
8916
|
-
*/
|
|
8917
|
-
isGroundObject(): boolean;
|
|
8918
|
-
/**
|
|
8919
|
-
* Returns type-specific serialization data.
|
|
8920
|
-
*/
|
|
8921
|
-
protected serializeSpecific(): Record<string, unknown>;
|
|
8922
|
-
toString(): string;
|
|
8923
|
-
}
|
|
8924
|
-
|
|
8925
8901
|
/**
|
|
8926
8902
|
* @author Theodore Kruczek
|
|
8927
8903
|
* @license AGPL-3.0-or-later
|
|
@@ -10383,43 +10359,163 @@ declare class SolarSystem {
|
|
|
10383
10359
|
/** Pluto */
|
|
10384
10360
|
static get pluto(): PlanetBody;
|
|
10385
10361
|
/**
|
|
10386
|
-
* Gets the count of registered bodies.
|
|
10362
|
+
* Gets the count of registered bodies.
|
|
10363
|
+
*/
|
|
10364
|
+
static get count(): number;
|
|
10365
|
+
/**
|
|
10366
|
+
* Clears all registered bodies and resets to uninitialized state.
|
|
10367
|
+
* Primarily for testing purposes.
|
|
10368
|
+
*/
|
|
10369
|
+
static reset(): void;
|
|
10370
|
+
/**
|
|
10371
|
+
* Ensures the registry is initialized before access.
|
|
10372
|
+
*/
|
|
10373
|
+
private static ensureInitialized_;
|
|
10374
|
+
}
|
|
10375
|
+
|
|
10376
|
+
/**
|
|
10377
|
+
* @author Theodore Kruczek
|
|
10378
|
+
* @license AGPL-3.0-or-later
|
|
10379
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
10380
|
+
*
|
|
10381
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
10382
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
10383
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
10384
|
+
*
|
|
10385
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
10386
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
10387
|
+
* See the GNU Affero General Public License for more details.
|
|
10388
|
+
*
|
|
10389
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
10390
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
10391
|
+
*/
|
|
10392
|
+
|
|
10393
|
+
declare const radecToPosition: (ra: Radians, dec: Radians, r: Kilometers) => Vector3D<Kilometers>;
|
|
10394
|
+
declare const radecToVelocity: (ra: Radians, dec: Radians, r: Kilometers, raDot: RadiansPerSecond, decDot: RadiansPerSecond, rDot: KilometersPerSecond) => Vector3D<KilometersPerSecond>;
|
|
10395
|
+
declare const normalizeAngle: (a: number, b: number) => number;
|
|
10396
|
+
declare const observationDerivative: (xh: number, xl: number, step: number, isAngle?: boolean) => number;
|
|
10397
|
+
declare const observationNoiseFromSigmas: (sigmas: number[]) => Matrix;
|
|
10398
|
+
|
|
10399
|
+
/**
|
|
10400
|
+
* @author Theodore Kruczek
|
|
10401
|
+
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
10402
|
+
* with satellites and other orbital objects.
|
|
10403
|
+
* @license AGPL-3.0-or-later
|
|
10404
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
10405
|
+
*
|
|
10406
|
+
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
10407
|
+
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
10408
|
+
* is licensed under the MIT license.
|
|
10409
|
+
*
|
|
10410
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
10411
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
10412
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
10413
|
+
*
|
|
10414
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
10415
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
10416
|
+
* See the GNU Affero General Public License for more details.
|
|
10417
|
+
*
|
|
10418
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
10419
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
10420
|
+
*/
|
|
10421
|
+
|
|
10422
|
+
/**
|
|
10423
|
+
* Represents a topocentric right ascension and declination observation.
|
|
10424
|
+
*
|
|
10425
|
+
* Topocentric coordinates take into account the observer's exact location on the Earth's surface. This model is crucial
|
|
10426
|
+
* for precise measurements of local astronomical events and nearby celestial objects, where the observer's latitude,
|
|
10427
|
+
* longitude, and altitude can significantly affect the observed position due to parallax. Topocentric coordinates are
|
|
10428
|
+
* particularly important for observations of the Moon, planets, and artificial satellites.
|
|
10429
|
+
*/
|
|
10430
|
+
declare class RadecTopocentric {
|
|
10431
|
+
epoch: EpochUTC;
|
|
10432
|
+
rightAscension: Radians;
|
|
10433
|
+
declination: Radians;
|
|
10434
|
+
range?: Kilometers | undefined;
|
|
10435
|
+
rightAscensionRate?: (RadiansPerSecond | null) | undefined;
|
|
10436
|
+
declinationRate?: (RadiansPerSecond | null) | undefined;
|
|
10437
|
+
rangeRate?: (KilometersPerSecond | null) | undefined;
|
|
10438
|
+
constructor(epoch: EpochUTC, rightAscension: Radians, declination: Radians, range?: Kilometers | undefined, rightAscensionRate?: (RadiansPerSecond | null) | undefined, declinationRate?: (RadiansPerSecond | null) | undefined, rangeRate?: (KilometersPerSecond | null) | undefined);
|
|
10439
|
+
/**
|
|
10440
|
+
* Create a new RadecTopocentric object, using degrees for the angular values.
|
|
10441
|
+
* @param epoch UTC epoch.
|
|
10442
|
+
* @param rightAscensionDegrees Right-ascension in degrees.
|
|
10443
|
+
* @param declinationDegrees Declination in degrees.
|
|
10444
|
+
* @param range Range in km.
|
|
10445
|
+
* @param rightAscensionRateDegrees Right-ascension rate in degrees per second.
|
|
10446
|
+
* @param declinationRateDegrees Declination rate in degrees per second.
|
|
10447
|
+
* @param rangeRate Range rate in km/s.
|
|
10448
|
+
* @returns A new RadecTopocentric object.
|
|
10449
|
+
*/
|
|
10450
|
+
static fromDegrees(epoch: EpochUTC, rightAscensionDegrees: Degrees, declinationDegrees: Degrees, range?: Kilometers, rightAscensionRateDegrees?: DegreesPerSecond, declinationRateDegrees?: DegreesPerSecond, rangeRate?: KilometersPerSecond): RadecTopocentric;
|
|
10451
|
+
/**
|
|
10452
|
+
* Create a new RadecTopocentric object from a J2000 state vector.
|
|
10453
|
+
* @param state Inertial state vector.
|
|
10454
|
+
* @param site Site vector.
|
|
10455
|
+
* @returns A new RadecTopocentric object.
|
|
10456
|
+
*/
|
|
10457
|
+
static fromStateVector(state: J2000, site: J2000): RadecTopocentric;
|
|
10458
|
+
/**
|
|
10459
|
+
* Gets the right ascension in degrees.
|
|
10460
|
+
* @returns The right ascension in degrees.
|
|
10461
|
+
*/
|
|
10462
|
+
get rightAscensionDegrees(): Degrees;
|
|
10463
|
+
/**
|
|
10464
|
+
* Gets the declination in degrees.
|
|
10465
|
+
* @returns The declination in degrees.
|
|
10466
|
+
*/
|
|
10467
|
+
get declinationDegrees(): Degrees;
|
|
10468
|
+
/**
|
|
10469
|
+
* Gets the right ascension rate in degrees per second.
|
|
10470
|
+
* @returns The right ascension rate in degrees per second, or null if it is not available.
|
|
10471
|
+
*/
|
|
10472
|
+
get rightAscensionRateDegrees(): DegreesPerSecond | null;
|
|
10473
|
+
/**
|
|
10474
|
+
* Gets the rate of change of declination in degrees per second.
|
|
10475
|
+
* @returns The rate of change of declination in degrees per second, or null if the declination rate is not defined.
|
|
10476
|
+
*/
|
|
10477
|
+
get declinationRateDegrees(): DegreesPerSecond | null;
|
|
10478
|
+
/**
|
|
10479
|
+
* Return the position relative to the observer site.
|
|
10480
|
+
*
|
|
10481
|
+
* An optional range value can be passed to override the value contained in this observation.
|
|
10482
|
+
* @param site Observer site.
|
|
10483
|
+
* @param range Range in km.
|
|
10484
|
+
* @returns A Vector3D object.
|
|
10485
|
+
*/
|
|
10486
|
+
position(site: J2000, range?: Kilometers): Vector3D<Kilometers>;
|
|
10487
|
+
/**
|
|
10488
|
+
* Return the velocity relative to the observer site.
|
|
10489
|
+
*
|
|
10490
|
+
* An optional range and rangeRate value can be passed to override the values contained in this observation.
|
|
10491
|
+
* @param site Observer site.
|
|
10492
|
+
* @param range Range in km.
|
|
10493
|
+
* @param rangeRate Range rate in km/s.
|
|
10494
|
+
* @returns A Vector3D object.
|
|
10387
10495
|
*/
|
|
10388
|
-
|
|
10496
|
+
velocity(site: J2000, range?: Kilometers, rangeRate?: KilometersPerSecond): Vector3D<KilometersPerSecond>;
|
|
10389
10497
|
/**
|
|
10390
|
-
*
|
|
10391
|
-
*
|
|
10498
|
+
* Calculates the line of sight vector in the topocentric coordinate system.
|
|
10499
|
+
* The line of sight vector points from the observer's location towards the celestial object.
|
|
10500
|
+
* @returns The line of sight vector as a Vector3D object.
|
|
10392
10501
|
*/
|
|
10393
|
-
|
|
10502
|
+
lineOfSight(): Vector3D;
|
|
10394
10503
|
/**
|
|
10395
|
-
*
|
|
10504
|
+
* Calculate the angular distance between this and another RadecTopocentric object.
|
|
10505
|
+
* @param radec - The other RadecTopocentric object.
|
|
10506
|
+
* @param method - The angular distance method to use.
|
|
10507
|
+
* @returns The angular distance.
|
|
10396
10508
|
*/
|
|
10397
|
-
|
|
10509
|
+
angle(radec: RadecTopocentric, method?: AngularDistanceMethod): Radians;
|
|
10510
|
+
/**
|
|
10511
|
+
* Calculate the angular distance between this and another RadecTopocentric object.
|
|
10512
|
+
* @param radec - The other RadecTopocentric object.
|
|
10513
|
+
* @param method - The angular distance method to use.
|
|
10514
|
+
* @returns The angular distance
|
|
10515
|
+
*/
|
|
10516
|
+
angleDegrees(radec: RadecTopocentric, method?: AngularDistanceMethod): Degrees;
|
|
10398
10517
|
}
|
|
10399
10518
|
|
|
10400
|
-
/**
|
|
10401
|
-
* @author Theodore Kruczek
|
|
10402
|
-
* @license AGPL-3.0-or-later
|
|
10403
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
10404
|
-
*
|
|
10405
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
10406
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
10407
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
10408
|
-
*
|
|
10409
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
10410
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
10411
|
-
* See the GNU Affero General Public License for more details.
|
|
10412
|
-
*
|
|
10413
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
10414
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
10415
|
-
*/
|
|
10416
|
-
|
|
10417
|
-
declare const radecToPosition: (ra: Radians, dec: Radians, r: Kilometers) => Vector3D<Kilometers>;
|
|
10418
|
-
declare const radecToVelocity: (ra: Radians, dec: Radians, r: Kilometers, raDot: RadiansPerSecond, decDot: RadiansPerSecond, rDot: KilometersPerSecond) => Vector3D<KilometersPerSecond>;
|
|
10419
|
-
declare const normalizeAngle: (a: number, b: number) => number;
|
|
10420
|
-
declare const observationDerivative: (xh: number, xl: number, step: number, isAngle?: boolean) => number;
|
|
10421
|
-
declare const observationNoiseFromSigmas: (sigmas: number[]) => Matrix;
|
|
10422
|
-
|
|
10423
10519
|
/**
|
|
10424
10520
|
* @author Theodore Kruczek
|
|
10425
10521
|
* @license AGPL-3.0-or-later
|
|
@@ -10573,126 +10669,6 @@ declare class RadecGeocentric {
|
|
|
10573
10669
|
angleDegrees(radec: RadecGeocentric, method?: AngularDistanceMethod): Degrees;
|
|
10574
10670
|
}
|
|
10575
10671
|
|
|
10576
|
-
/**
|
|
10577
|
-
* @author Theodore Kruczek
|
|
10578
|
-
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
10579
|
-
* with satellites and other orbital objects.
|
|
10580
|
-
* @license AGPL-3.0-or-later
|
|
10581
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
10582
|
-
*
|
|
10583
|
-
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
10584
|
-
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
|
|
10585
|
-
* is licensed under the MIT license.
|
|
10586
|
-
*
|
|
10587
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
10588
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
10589
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
10590
|
-
*
|
|
10591
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
10592
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
10593
|
-
* See the GNU Affero General Public License for more details.
|
|
10594
|
-
*
|
|
10595
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
10596
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
10597
|
-
*/
|
|
10598
|
-
|
|
10599
|
-
/**
|
|
10600
|
-
* Represents a topocentric right ascension and declination observation.
|
|
10601
|
-
*
|
|
10602
|
-
* Topocentric coordinates take into account the observer's exact location on the Earth's surface. This model is crucial
|
|
10603
|
-
* for precise measurements of local astronomical events and nearby celestial objects, where the observer's latitude,
|
|
10604
|
-
* longitude, and altitude can significantly affect the observed position due to parallax. Topocentric coordinates are
|
|
10605
|
-
* particularly important for observations of the Moon, planets, and artificial satellites.
|
|
10606
|
-
*/
|
|
10607
|
-
declare class RadecTopocentric {
|
|
10608
|
-
epoch: EpochUTC;
|
|
10609
|
-
rightAscension: Radians;
|
|
10610
|
-
declination: Radians;
|
|
10611
|
-
range?: Kilometers | undefined;
|
|
10612
|
-
rightAscensionRate?: (RadiansPerSecond | null) | undefined;
|
|
10613
|
-
declinationRate?: (RadiansPerSecond | null) | undefined;
|
|
10614
|
-
rangeRate?: (KilometersPerSecond | null) | undefined;
|
|
10615
|
-
constructor(epoch: EpochUTC, rightAscension: Radians, declination: Radians, range?: Kilometers | undefined, rightAscensionRate?: (RadiansPerSecond | null) | undefined, declinationRate?: (RadiansPerSecond | null) | undefined, rangeRate?: (KilometersPerSecond | null) | undefined);
|
|
10616
|
-
/**
|
|
10617
|
-
* Create a new RadecTopocentric object, using degrees for the angular values.
|
|
10618
|
-
* @param epoch UTC epoch.
|
|
10619
|
-
* @param rightAscensionDegrees Right-ascension in degrees.
|
|
10620
|
-
* @param declinationDegrees Declination in degrees.
|
|
10621
|
-
* @param range Range in km.
|
|
10622
|
-
* @param rightAscensionRateDegrees Right-ascension rate in degrees per second.
|
|
10623
|
-
* @param declinationRateDegrees Declination rate in degrees per second.
|
|
10624
|
-
* @param rangeRate Range rate in km/s.
|
|
10625
|
-
* @returns A new RadecTopocentric object.
|
|
10626
|
-
*/
|
|
10627
|
-
static fromDegrees(epoch: EpochUTC, rightAscensionDegrees: Degrees, declinationDegrees: Degrees, range?: Kilometers, rightAscensionRateDegrees?: DegreesPerSecond, declinationRateDegrees?: DegreesPerSecond, rangeRate?: KilometersPerSecond): RadecTopocentric;
|
|
10628
|
-
/**
|
|
10629
|
-
* Create a new RadecTopocentric object from a J2000 state vector.
|
|
10630
|
-
* @param state Inertial state vector.
|
|
10631
|
-
* @param site Site vector.
|
|
10632
|
-
* @returns A new RadecTopocentric object.
|
|
10633
|
-
*/
|
|
10634
|
-
static fromStateVector(state: J2000, site: J2000): RadecTopocentric;
|
|
10635
|
-
/**
|
|
10636
|
-
* Gets the right ascension in degrees.
|
|
10637
|
-
* @returns The right ascension in degrees.
|
|
10638
|
-
*/
|
|
10639
|
-
get rightAscensionDegrees(): Degrees;
|
|
10640
|
-
/**
|
|
10641
|
-
* Gets the declination in degrees.
|
|
10642
|
-
* @returns The declination in degrees.
|
|
10643
|
-
*/
|
|
10644
|
-
get declinationDegrees(): Degrees;
|
|
10645
|
-
/**
|
|
10646
|
-
* Gets the right ascension rate in degrees per second.
|
|
10647
|
-
* @returns The right ascension rate in degrees per second, or null if it is not available.
|
|
10648
|
-
*/
|
|
10649
|
-
get rightAscensionRateDegrees(): DegreesPerSecond | null;
|
|
10650
|
-
/**
|
|
10651
|
-
* Gets the rate of change of declination in degrees per second.
|
|
10652
|
-
* @returns The rate of change of declination in degrees per second, or null if the declination rate is not defined.
|
|
10653
|
-
*/
|
|
10654
|
-
get declinationRateDegrees(): DegreesPerSecond | null;
|
|
10655
|
-
/**
|
|
10656
|
-
* Return the position relative to the observer site.
|
|
10657
|
-
*
|
|
10658
|
-
* An optional range value can be passed to override the value contained in this observation.
|
|
10659
|
-
* @param site Observer site.
|
|
10660
|
-
* @param range Range in km.
|
|
10661
|
-
* @returns A Vector3D object.
|
|
10662
|
-
*/
|
|
10663
|
-
position(site: J2000, range?: Kilometers): Vector3D<Kilometers>;
|
|
10664
|
-
/**
|
|
10665
|
-
* Return the velocity relative to the observer site.
|
|
10666
|
-
*
|
|
10667
|
-
* An optional range and rangeRate value can be passed to override the values contained in this observation.
|
|
10668
|
-
* @param site Observer site.
|
|
10669
|
-
* @param range Range in km.
|
|
10670
|
-
* @param rangeRate Range rate in km/s.
|
|
10671
|
-
* @returns A Vector3D object.
|
|
10672
|
-
*/
|
|
10673
|
-
velocity(site: J2000, range?: Kilometers, rangeRate?: KilometersPerSecond): Vector3D<KilometersPerSecond>;
|
|
10674
|
-
/**
|
|
10675
|
-
* Calculates the line of sight vector in the topocentric coordinate system.
|
|
10676
|
-
* The line of sight vector points from the observer's location towards the celestial object.
|
|
10677
|
-
* @returns The line of sight vector as a Vector3D object.
|
|
10678
|
-
*/
|
|
10679
|
-
lineOfSight(): Vector3D;
|
|
10680
|
-
/**
|
|
10681
|
-
* Calculate the angular distance between this and another RadecTopocentric object.
|
|
10682
|
-
* @param radec - The other RadecTopocentric object.
|
|
10683
|
-
* @param method - The angular distance method to use.
|
|
10684
|
-
* @returns The angular distance.
|
|
10685
|
-
*/
|
|
10686
|
-
angle(radec: RadecTopocentric, method?: AngularDistanceMethod): Radians;
|
|
10687
|
-
/**
|
|
10688
|
-
* Calculate the angular distance between this and another RadecTopocentric object.
|
|
10689
|
-
* @param radec - The other RadecTopocentric object.
|
|
10690
|
-
* @param method - The angular distance method to use.
|
|
10691
|
-
* @returns The angular distance
|
|
10692
|
-
*/
|
|
10693
|
-
angleDegrees(radec: RadecTopocentric, method?: AngularDistanceMethod): Degrees;
|
|
10694
|
-
}
|
|
10695
|
-
|
|
10696
10672
|
/**
|
|
10697
10673
|
* @author Theodore Kruczek
|
|
10698
10674
|
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
@@ -11377,90 +11353,47 @@ declare class RkResult {
|
|
|
11377
11353
|
* @author Theodore Kruczek
|
|
11378
11354
|
* @license AGPL-3.0-or-later
|
|
11379
11355
|
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
11380
|
-
*
|
|
11381
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
11382
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
11383
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
11384
|
-
*
|
|
11385
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11386
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
11387
|
-
* See the GNU Affero General Public License for more details.
|
|
11388
|
-
*
|
|
11389
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
11390
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
11391
|
-
*/
|
|
11392
|
-
|
|
11393
|
-
declare class RungeKutta4Propagator extends Propagator {
|
|
11394
|
-
private readonly initState_;
|
|
11395
|
-
private forceModel_;
|
|
11396
|
-
private stepSize_;
|
|
11397
|
-
private cacheState_;
|
|
11398
|
-
private checkpoints_;
|
|
11399
|
-
/**
|
|
11400
|
-
* Create a new [RungeKutta4Propagator] object from an initial state vector and
|
|
11401
|
-
* along with an optional [ForceModel] and [stepSize] in seconds.
|
|
11402
|
-
* @param initState_ Initial state vector.
|
|
11403
|
-
* @param forceModel_ Numerical integration force model.
|
|
11404
|
-
* @param stepSize_ Integration step size _(seconds)_.
|
|
11405
|
-
* @param cacheState_ Cached state vector.
|
|
11406
|
-
* @param checkpoints_ Cached state vector checkpoints.
|
|
11407
|
-
*/
|
|
11408
|
-
constructor(initState_: J2000, forceModel_?: ForceModel, stepSize_?: number, cacheState_?: J2000, checkpoints_?: J2000[]);
|
|
11409
|
-
setStepSize(seconds: number): void;
|
|
11410
|
-
setForceModel(forceModel: ForceModel): void;
|
|
11411
|
-
ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval?: Seconds): VerletBlendInterpolator;
|
|
11412
|
-
maneuver(maneuver: Thrust, interval?: number): J2000[];
|
|
11413
|
-
private _kFn;
|
|
11414
|
-
private _integrate;
|
|
11415
|
-
propagate(epoch: EpochUTC): J2000;
|
|
11416
|
-
reset(): void;
|
|
11417
|
-
get state(): J2000;
|
|
11418
|
-
checkpoint(): number;
|
|
11419
|
-
clearCheckpoints(): void;
|
|
11420
|
-
restore(index: number): void;
|
|
11421
|
-
}
|
|
11422
|
-
|
|
11423
|
-
/**
|
|
11424
|
-
* @author Theodore Kruczek
|
|
11425
|
-
* @license AGPL-3.0-or-later
|
|
11426
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
11427
|
-
*
|
|
11428
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
11429
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
11430
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
11431
|
-
*
|
|
11432
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11433
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
11434
|
-
* See the GNU Affero General Public License for more details.
|
|
11435
|
-
*
|
|
11436
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
11437
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
11438
|
-
*/
|
|
11439
|
-
|
|
11440
|
-
/** Covariance Frame */
|
|
11441
|
-
declare enum CovarianceFrame {
|
|
11442
|
-
/** Earth-centered inertial */
|
|
11443
|
-
ECI = "eci",
|
|
11444
|
-
/** Radial-Intrack-Crosstrack */
|
|
11445
|
-
RIC = "ric"
|
|
11446
|
-
}
|
|
11447
|
-
declare class StateCovariance {
|
|
11448
|
-
matrix: Matrix;
|
|
11449
|
-
frame: CovarianceFrame;
|
|
11450
|
-
/**
|
|
11451
|
-
* Create a new [StateCovariance] object given its covariance [matrix] and
|
|
11452
|
-
* [CovarianceFrame].
|
|
11453
|
-
* @param matrix The covariance matrix.
|
|
11454
|
-
* @param frame The covariance frame.
|
|
11455
|
-
* @returns A new [StateCovariance] object.
|
|
11456
|
-
*/
|
|
11457
|
-
constructor(matrix: Matrix, frame: CovarianceFrame);
|
|
11458
|
-
static fromSigmas(sigmas: number[], frame: CovarianceFrame): StateCovariance;
|
|
11356
|
+
*
|
|
11357
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
11358
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
11359
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
11360
|
+
*
|
|
11361
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11362
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
11363
|
+
* See the GNU Affero General Public License for more details.
|
|
11364
|
+
*
|
|
11365
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
11366
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
11367
|
+
*/
|
|
11368
|
+
|
|
11369
|
+
declare class RungeKutta4Propagator extends Propagator {
|
|
11370
|
+
private readonly initState_;
|
|
11371
|
+
private forceModel_;
|
|
11372
|
+
private stepSize_;
|
|
11373
|
+
private cacheState_;
|
|
11374
|
+
private checkpoints_;
|
|
11459
11375
|
/**
|
|
11460
|
-
*
|
|
11461
|
-
*
|
|
11376
|
+
* Create a new [RungeKutta4Propagator] object from an initial state vector and
|
|
11377
|
+
* along with an optional [ForceModel] and [stepSize] in seconds.
|
|
11378
|
+
* @param initState_ Initial state vector.
|
|
11379
|
+
* @param forceModel_ Numerical integration force model.
|
|
11380
|
+
* @param stepSize_ Integration step size _(seconds)_.
|
|
11381
|
+
* @param cacheState_ Cached state vector.
|
|
11382
|
+
* @param checkpoints_ Cached state vector checkpoints.
|
|
11462
11383
|
*/
|
|
11463
|
-
|
|
11384
|
+
constructor(initState_: J2000, forceModel_?: ForceModel, stepSize_?: number, cacheState_?: J2000, checkpoints_?: J2000[]);
|
|
11385
|
+
setStepSize(seconds: number): void;
|
|
11386
|
+
setForceModel(forceModel: ForceModel): void;
|
|
11387
|
+
ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval?: Seconds): VerletBlendInterpolator;
|
|
11388
|
+
maneuver(maneuver: Thrust, interval?: number): J2000[];
|
|
11389
|
+
private _kFn;
|
|
11390
|
+
private _integrate;
|
|
11391
|
+
propagate(epoch: EpochUTC): J2000;
|
|
11392
|
+
reset(): void;
|
|
11393
|
+
get state(): J2000;
|
|
11394
|
+
checkpoint(): number;
|
|
11395
|
+
clearCheckpoints(): void;
|
|
11396
|
+
restore(index: number): void;
|
|
11464
11397
|
}
|
|
11465
11398
|
|
|
11466
11399
|
/**
|
|
@@ -12142,6 +12075,113 @@ interface RicSigmas {
|
|
|
12142
12075
|
*/
|
|
12143
12076
|
declare function scaleAndClampRicSigmas(sigmas: RicSigmas, confidence: number, caps: RicSigmas): RicSigmas | null;
|
|
12144
12077
|
|
|
12078
|
+
/**
|
|
12079
|
+
* @author Theodore Kruczek
|
|
12080
|
+
* @license AGPL-3.0-or-later
|
|
12081
|
+
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
12082
|
+
*
|
|
12083
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
12084
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
12085
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
12086
|
+
*
|
|
12087
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
12088
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12089
|
+
* See the GNU Affero General Public License for more details.
|
|
12090
|
+
*
|
|
12091
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
12092
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
12093
|
+
*/
|
|
12094
|
+
|
|
12095
|
+
/**
|
|
12096
|
+
* Represents the result of a conjunction assessment between two space objects.
|
|
12097
|
+
* Contains all relevant information about the close approach event.
|
|
12098
|
+
*/
|
|
12099
|
+
declare class ConjunctionEvent {
|
|
12100
|
+
/** Time of Closest Approach (TCA) */
|
|
12101
|
+
readonly tca: EpochUTC;
|
|
12102
|
+
/** Primary object state at TCA in J2000 frame */
|
|
12103
|
+
readonly primaryState: J2000;
|
|
12104
|
+
/** Secondary object state at TCA in J2000 frame */
|
|
12105
|
+
readonly secondaryState: J2000;
|
|
12106
|
+
/** Relative state in RIC frame (relative to primary) */
|
|
12107
|
+
readonly relativeState: RIC;
|
|
12108
|
+
/** Total miss distance at TCA (km) */
|
|
12109
|
+
readonly missDistance: Kilometers;
|
|
12110
|
+
/** Radial component of miss distance (km) */
|
|
12111
|
+
readonly radialDistance: Kilometers;
|
|
12112
|
+
/** Intrack component of miss distance (km) */
|
|
12113
|
+
readonly intrackDistance: Kilometers;
|
|
12114
|
+
/** Crosstrack component of miss distance (km) */
|
|
12115
|
+
readonly crosstrackDistance: Kilometers;
|
|
12116
|
+
/** Relative velocity magnitude at TCA (km/s) */
|
|
12117
|
+
readonly relativeVelocity: KilometersPerSecond;
|
|
12118
|
+
/** Combined position covariance matrix in RIC frame (optional) */
|
|
12119
|
+
readonly combinedCovariance?: StateCovariance;
|
|
12120
|
+
/** Probability of collision (optional, 0-1) */
|
|
12121
|
+
readonly probabilityOfCollision?: number;
|
|
12122
|
+
/** Hard body radius for primary object (km, optional) */
|
|
12123
|
+
readonly primaryRadius?: Kilometers;
|
|
12124
|
+
/** Hard body radius for secondary object (km, optional) */
|
|
12125
|
+
readonly secondaryRadius?: Kilometers;
|
|
12126
|
+
/** Primary object name/identifier (optional, for CDM export) */
|
|
12127
|
+
readonly primaryName?: string;
|
|
12128
|
+
/** Secondary object name/identifier (optional, for CDM export) */
|
|
12129
|
+
readonly secondaryName?: string;
|
|
12130
|
+
/** Primary object catalog designator (optional, for CDM export) */
|
|
12131
|
+
readonly primaryDesignator?: string;
|
|
12132
|
+
/** Secondary object catalog designator (optional, for CDM export) */
|
|
12133
|
+
readonly secondaryDesignator?: string;
|
|
12134
|
+
/** Primary object covariance (optional, for CDM export) */
|
|
12135
|
+
readonly primaryCovariance?: StateCovariance;
|
|
12136
|
+
/** Secondary object covariance (optional, for CDM export) */
|
|
12137
|
+
readonly secondaryCovariance?: StateCovariance;
|
|
12138
|
+
constructor(params: {
|
|
12139
|
+
tca: EpochUTC;
|
|
12140
|
+
primaryState: J2000;
|
|
12141
|
+
secondaryState: J2000;
|
|
12142
|
+
relativeState: RIC;
|
|
12143
|
+
missDistance: Kilometers;
|
|
12144
|
+
radialDistance: Kilometers;
|
|
12145
|
+
intrackDistance: Kilometers;
|
|
12146
|
+
crosstrackDistance: Kilometers;
|
|
12147
|
+
relativeVelocity: KilometersPerSecond;
|
|
12148
|
+
combinedCovariance?: StateCovariance;
|
|
12149
|
+
probabilityOfCollision?: number;
|
|
12150
|
+
primaryRadius?: Kilometers;
|
|
12151
|
+
secondaryRadius?: Kilometers;
|
|
12152
|
+
primaryName?: string;
|
|
12153
|
+
secondaryName?: string;
|
|
12154
|
+
primaryDesignator?: string;
|
|
12155
|
+
secondaryDesignator?: string;
|
|
12156
|
+
primaryCovariance?: StateCovariance;
|
|
12157
|
+
secondaryCovariance?: StateCovariance;
|
|
12158
|
+
});
|
|
12159
|
+
/**
|
|
12160
|
+
* Returns a formatted string representation of the conjunction event.
|
|
12161
|
+
* @returns A multi-line string with conjunction details.
|
|
12162
|
+
*/
|
|
12163
|
+
toString(): string;
|
|
12164
|
+
/**
|
|
12165
|
+
* Checks if this is a high-risk conjunction based on miss distance and Pc.
|
|
12166
|
+
* @param distanceThreshold Miss distance threshold in km (default: 1.0 km)
|
|
12167
|
+
* @param pcThreshold Probability of collision threshold (default: 1e-4)
|
|
12168
|
+
* @returns True if the conjunction exceeds risk thresholds.
|
|
12169
|
+
*/
|
|
12170
|
+
isHighRisk(distanceThreshold?: Kilometers, pcThreshold?: number): boolean;
|
|
12171
|
+
/**
|
|
12172
|
+
* Gets the Mahalanobis distance if covariance is available.
|
|
12173
|
+
* This is the miss distance normalized by the combined covariance.
|
|
12174
|
+
* @returns The Mahalanobis distance (unitless), or undefined if no covariance.
|
|
12175
|
+
*/
|
|
12176
|
+
getMahalanobisDistance(): number | undefined;
|
|
12177
|
+
/**
|
|
12178
|
+
* Extracts the 3x3 position covariance from a 6x6 state covariance matrix.
|
|
12179
|
+
* @param stateCov 6x6 state covariance matrix
|
|
12180
|
+
* @returns 3x3 position covariance matrix
|
|
12181
|
+
*/
|
|
12182
|
+
private extractPositionCovariance;
|
|
12183
|
+
}
|
|
12184
|
+
|
|
12145
12185
|
/**
|
|
12146
12186
|
* @author Theodore Kruczek
|
|
12147
12187
|
* @license AGPL-3.0-or-later
|
|
@@ -12292,113 +12332,6 @@ declare class ConjunctionAssessment {
|
|
|
12292
12332
|
private build6x6Transform;
|
|
12293
12333
|
}
|
|
12294
12334
|
|
|
12295
|
-
/**
|
|
12296
|
-
* @author Theodore Kruczek
|
|
12297
|
-
* @license AGPL-3.0-or-later
|
|
12298
|
-
* @copyright (c) 2025-2026 Kruczek Labs LLC
|
|
12299
|
-
*
|
|
12300
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
12301
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
12302
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
12303
|
-
*
|
|
12304
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
12305
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12306
|
-
* See the GNU Affero General Public License for more details.
|
|
12307
|
-
*
|
|
12308
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
12309
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
12310
|
-
*/
|
|
12311
|
-
|
|
12312
|
-
/**
|
|
12313
|
-
* Represents the result of a conjunction assessment between two space objects.
|
|
12314
|
-
* Contains all relevant information about the close approach event.
|
|
12315
|
-
*/
|
|
12316
|
-
declare class ConjunctionEvent {
|
|
12317
|
-
/** Time of Closest Approach (TCA) */
|
|
12318
|
-
readonly tca: EpochUTC;
|
|
12319
|
-
/** Primary object state at TCA in J2000 frame */
|
|
12320
|
-
readonly primaryState: J2000;
|
|
12321
|
-
/** Secondary object state at TCA in J2000 frame */
|
|
12322
|
-
readonly secondaryState: J2000;
|
|
12323
|
-
/** Relative state in RIC frame (relative to primary) */
|
|
12324
|
-
readonly relativeState: RIC;
|
|
12325
|
-
/** Total miss distance at TCA (km) */
|
|
12326
|
-
readonly missDistance: Kilometers;
|
|
12327
|
-
/** Radial component of miss distance (km) */
|
|
12328
|
-
readonly radialDistance: Kilometers;
|
|
12329
|
-
/** Intrack component of miss distance (km) */
|
|
12330
|
-
readonly intrackDistance: Kilometers;
|
|
12331
|
-
/** Crosstrack component of miss distance (km) */
|
|
12332
|
-
readonly crosstrackDistance: Kilometers;
|
|
12333
|
-
/** Relative velocity magnitude at TCA (km/s) */
|
|
12334
|
-
readonly relativeVelocity: KilometersPerSecond;
|
|
12335
|
-
/** Combined position covariance matrix in RIC frame (optional) */
|
|
12336
|
-
readonly combinedCovariance?: StateCovariance;
|
|
12337
|
-
/** Probability of collision (optional, 0-1) */
|
|
12338
|
-
readonly probabilityOfCollision?: number;
|
|
12339
|
-
/** Hard body radius for primary object (km, optional) */
|
|
12340
|
-
readonly primaryRadius?: Kilometers;
|
|
12341
|
-
/** Hard body radius for secondary object (km, optional) */
|
|
12342
|
-
readonly secondaryRadius?: Kilometers;
|
|
12343
|
-
/** Primary object name/identifier (optional, for CDM export) */
|
|
12344
|
-
readonly primaryName?: string;
|
|
12345
|
-
/** Secondary object name/identifier (optional, for CDM export) */
|
|
12346
|
-
readonly secondaryName?: string;
|
|
12347
|
-
/** Primary object catalog designator (optional, for CDM export) */
|
|
12348
|
-
readonly primaryDesignator?: string;
|
|
12349
|
-
/** Secondary object catalog designator (optional, for CDM export) */
|
|
12350
|
-
readonly secondaryDesignator?: string;
|
|
12351
|
-
/** Primary object covariance (optional, for CDM export) */
|
|
12352
|
-
readonly primaryCovariance?: StateCovariance;
|
|
12353
|
-
/** Secondary object covariance (optional, for CDM export) */
|
|
12354
|
-
readonly secondaryCovariance?: StateCovariance;
|
|
12355
|
-
constructor(params: {
|
|
12356
|
-
tca: EpochUTC;
|
|
12357
|
-
primaryState: J2000;
|
|
12358
|
-
secondaryState: J2000;
|
|
12359
|
-
relativeState: RIC;
|
|
12360
|
-
missDistance: Kilometers;
|
|
12361
|
-
radialDistance: Kilometers;
|
|
12362
|
-
intrackDistance: Kilometers;
|
|
12363
|
-
crosstrackDistance: Kilometers;
|
|
12364
|
-
relativeVelocity: KilometersPerSecond;
|
|
12365
|
-
combinedCovariance?: StateCovariance;
|
|
12366
|
-
probabilityOfCollision?: number;
|
|
12367
|
-
primaryRadius?: Kilometers;
|
|
12368
|
-
secondaryRadius?: Kilometers;
|
|
12369
|
-
primaryName?: string;
|
|
12370
|
-
secondaryName?: string;
|
|
12371
|
-
primaryDesignator?: string;
|
|
12372
|
-
secondaryDesignator?: string;
|
|
12373
|
-
primaryCovariance?: StateCovariance;
|
|
12374
|
-
secondaryCovariance?: StateCovariance;
|
|
12375
|
-
});
|
|
12376
|
-
/**
|
|
12377
|
-
* Returns a formatted string representation of the conjunction event.
|
|
12378
|
-
* @returns A multi-line string with conjunction details.
|
|
12379
|
-
*/
|
|
12380
|
-
toString(): string;
|
|
12381
|
-
/**
|
|
12382
|
-
* Checks if this is a high-risk conjunction based on miss distance and Pc.
|
|
12383
|
-
* @param distanceThreshold Miss distance threshold in km (default: 1.0 km)
|
|
12384
|
-
* @param pcThreshold Probability of collision threshold (default: 1e-4)
|
|
12385
|
-
* @returns True if the conjunction exceeds risk thresholds.
|
|
12386
|
-
*/
|
|
12387
|
-
isHighRisk(distanceThreshold?: Kilometers, pcThreshold?: number): boolean;
|
|
12388
|
-
/**
|
|
12389
|
-
* Gets the Mahalanobis distance if covariance is available.
|
|
12390
|
-
* This is the miss distance normalized by the combined covariance.
|
|
12391
|
-
* @returns The Mahalanobis distance (unitless), or undefined if no covariance.
|
|
12392
|
-
*/
|
|
12393
|
-
getMahalanobisDistance(): number | undefined;
|
|
12394
|
-
/**
|
|
12395
|
-
* Extracts the 3x3 position covariance from a 6x6 state covariance matrix.
|
|
12396
|
-
* @param stateCov 6x6 state covariance matrix
|
|
12397
|
-
* @returns 3x3 position covariance matrix
|
|
12398
|
-
*/
|
|
12399
|
-
private extractPositionCovariance;
|
|
12400
|
-
}
|
|
12401
|
-
|
|
12402
12335
|
/**
|
|
12403
12336
|
* @author Theodore Kruczek
|
|
12404
12337
|
* @license AGPL-3.0-or-later
|