ootk 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/dist/main.cjs +16559 -16524
  2. package/dist/main.d.cts +1776 -1847
  3. package/dist/main.d.ts +1776 -1847
  4. package/dist/main.js +16558 -16523
  5. package/package.json +10 -4
package/dist/main.d.ts 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
- * True Equator Mean Equinox (TEME) is a coordinate system commonly used in satellite tracking and orbit prediction. It
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 TEME extends StateVector {
1376
+ declare class Vector<T extends number = number> {
1377
+ elements: T[] | Float64Array;
1460
1378
  /**
1461
- * Gets the name of the coordinate system.
1462
- * @returns The name of the coordinate system.
1379
+ * The length of the vector.
1463
1380
  */
1464
- get name(): string;
1381
+ readonly length: number;
1465
1382
  /**
1466
- * Gets a value indicating whether the coordinate is inertial.
1467
- * @returns A boolean value indicating whether the coordinate is inertial.
1383
+ * Represents a 3-dimensional vector.
1468
1384
  */
1469
- get inertial(): boolean;
1385
+ static readonly origin3: Vector<0>;
1470
1386
  /**
1471
- * Creates a TEME (True Equator Mean Equinox) object from classical orbital elements.
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 fromClassicalElements(elements: ClassicalElements): TEME;
1389
+ static readonly origin6: Vector<0>;
1476
1390
  /**
1477
- * Converts the TEME (True Equator Mean Equinox) coordinates to J2000 coordinates.
1478
- * @returns The J2000 coordinates.
1391
+ * Represents the x-axis vector.
1479
1392
  */
1480
- toJ2000(): J2000;
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
- * Creates a J2000 coordinate from classical elements.
1519
- * @param elements The classical elements.
1520
- * @returns The J2000 coordinate.
1395
+ * Represents the y-axis vector.
1521
1396
  */
1522
- static fromClassicalElements(elements: ClassicalElements): J2000;
1397
+ static readonly yAxis: Vector<0 | 1>;
1523
1398
  /**
1524
- * Gets the name of the coordinate system.
1525
- * @returns The name of the coordinate system.
1399
+ * Represents the z-axis vector.
1526
1400
  */
1527
- get name(): string;
1401
+ static readonly zAxis: Vector<0 | 1>;
1528
1402
  /**
1529
- * Gets a value indicating whether the coordinate system is inertial.
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
- get inertial(): boolean;
1405
+ static readonly xAxisNeg: Vector<0 | -1>;
1533
1406
  /**
1534
- * Converts the coordinates from J2000 to the International Terrestrial Reference Frame (ITRF).
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
- toITRF(): ITRF;
1409
+ static readonly yAxisNeg: Vector<0 | -1>;
1539
1410
  /**
1540
- * Converts the J2000 coordinate to the TEME coordinate.
1541
- * @returns The TEME coordinate.
1411
+ * Represents a vector pointing along the negative z-axis.
1542
1412
  */
1543
- toTEME(): TEME;
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
- * Gets the name of the ITRF coordinate system.
1586
- * @returns The name of the coordinate system.
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
- get name(): string;
1420
+ static zero(length: number): Vector;
1589
1421
  /**
1590
- * Gets a value indicating whether the coordinate system is inertial.
1591
- * @returns A boolean value indicating whether the coordinate system is inertial.
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
- get inertial(): boolean;
1428
+ static filled(length: number, value: number): Vector;
1594
1429
  /**
1595
- * Gets the height of the ITRF coordinate above the surface of the Earth in kilometers.
1596
- * @returns The height in kilometers.
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
- get height(): Kilometers;
1434
+ static fromList(elements: number[]): Vector;
1599
1435
  /**
1600
- * Gets the altitude in kilometers.
1601
- * @returns The altitude in kilometers.
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
- get alt(): Kilometers;
1441
+ toString(fixed?: number): string;
1604
1442
  /**
1605
- * Converts the current coordinate to the J2000 coordinate system. This is an Earth-Centered Inertial (ECI) coordinate
1606
- * system with the origin at the center of the Earth.
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
- toJ2000(): J2000;
1446
+ get x(): number;
1611
1447
  /**
1612
- * Converts the current ITRF coordinate to Geodetic coordinate. This is a coordinate system for latitude, longitude,
1613
- * and altitude.
1614
- * @returns The converted Geodetic coordinate.
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
- * Creates a Geodetic object from latitude, longitude, and altitude values in
1658
- * degrees.
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
- static fromDegrees(latitude: Degrees, longitude: Degrees, altitude: Kilometers): Geodetic;
1456
+ get z(): number;
1666
1457
  /**
1667
- * Returns a string representation of the Geodetic object.
1668
- * @returns A string containing the latitude, longitude, and altitude of the Geodetic object.
1458
+ * Converts the vector elements to an array.
1459
+ * @returns An array containing the vector elements.
1669
1460
  */
1670
- toString(): string;
1461
+ toList(): number[];
1671
1462
  /**
1672
- * Gets the latitude in degrees.
1673
- * @returns The latitude in degrees.
1463
+ * Converts the vector to a Float64Array.
1464
+ * @returns The vector as a Float64Array.
1674
1465
  */
1675
- get latDeg(): number;
1466
+ toArray(): Float64Array;
1676
1467
  /**
1677
- * Gets the longitude in degrees.
1678
- * @returns The longitude in degrees.
1468
+ * Calculates the magnitude of the vector.
1469
+ * @returns The magnitude of the vector.
1679
1470
  */
1680
- get lonDeg(): number;
1471
+ magnitude(): number;
1681
1472
  /**
1682
- * Converts the geodetic coordinates to a ground station.
1683
- * @returns The ground station object.
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
- toGroundStation(): GroundStation;
1478
+ add(v: Vector): Vector;
1686
1479
  /**
1687
- * Converts the geodetic coordinates to the International Terrestrial
1688
- * Reference Frame (ITRF) coordinates.
1689
- * @param epoch The epoch in UTC.
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
- toITRF(epoch: EpochUTC): ITRF;
1484
+ subtract(v: Vector): Vector;
1693
1485
  /**
1694
- * Calculates the angle between two geodetic coordinates.
1695
- * @param g The geodetic coordinate to calculate the angle to.
1696
- * @param method The method to use for calculating the angular distance (optional, default is Haversine).
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
- angle(g: Geodetic, method?: AngularDistanceMethod): Radians;
1490
+ scale(n: number): Vector;
1700
1491
  /**
1701
- * Calculates the angle in degrees between two Geodetic coordinates.
1702
- * @param g The Geodetic coordinate to calculate the angle with.
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
- angleDeg(g: Geodetic, method?: AngularDistanceMethod): Degrees;
1495
+ negate(): Vector;
1707
1496
  /**
1708
- * Calculates the distance between two geodetic coordinates.
1709
- * @param g The geodetic coordinates to calculate the distance to.
1710
- * @param method The method to use for calculating the angular distance. Default is Haversine.
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(g: Geodetic, method?: AngularDistanceMethod): Kilometers;
1501
+ distance(v: Vector): number;
1714
1502
  /**
1715
- * Calculates the field of view based on the altitude of the Geodetic object.
1716
- * @returns The field of view in radians.
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
- fieldOfView(): Radians;
1508
+ normalize(): Vector;
1719
1509
  /**
1720
- * Determines if the current geodetic coordinate can see another geodetic coordinate.
1721
- * @param g The geodetic coordinate to check for visibility.
1722
- * @param method The method to use for calculating the angular distance (optional, default is Haversine).
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
- isInView(g: Geodetic, method?: AngularDistanceMethod): boolean;
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 class containing static methods for formatting TLEs (Two-Line Elements).
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 abstract class FormatTle {
1755
- private constructor();
1640
+ declare class Matrix {
1641
+ elements: number[][];
1642
+ readonly rows: number;
1643
+ readonly columns: number;
1644
+ constructor(elements: number[][]);
1756
1645
  /**
1757
- * Creates a TLE (Two-Line Element) string based on the provided TleParams.
1758
- * @param tleParams - The parameters used to generate the TLE.
1759
- * @returns An object containing the TLE strings tle1 and tle2.
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 createTle(tleParams: TleParams): {
1762
- tle1: TleLine1;
1763
- tle2: TleLine2;
1764
- };
1651
+ static allZeros(rows: number, columns: number): Matrix;
1765
1652
  /**
1766
- * Converts the argument of perigee to a stringified number.
1767
- * @param argPe - The argument of perigee to be converted. Can be either a number or a string.
1768
- * @returns The argument of perigee as a stringified number.
1769
- * @throws Error if the length of the argument of perigee is not 8.
1770
- */
1771
- static argumentOfPerigee(argPe: number | string): StringifiedNumber;
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
- * Returns the eccentricity value formatted for TLE.
1774
- * @param ecen - The eccentricity value (string or number).
1775
- * @returns The eccentricity value formatted as 7 digits without leading "0.".
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 eccentricity(ecen: string | number): string;
1666
+ static rotX(theta: Radians): Matrix;
1779
1667
  /**
1780
- * Converts the inclination value to a string representation.
1781
- * @param inc - The inclination value to be converted.
1782
- * @returns The string representation of the inclination value.
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 inclination(inc: number | string): StringifiedNumber;
1672
+ static rotY(theta: Radians): Matrix;
1786
1673
  /**
1787
- * Converts the mean anomaly to a string representation with 8 digits, padded with leading zeros.
1788
- * @param meana - The mean anomaly to be converted. Can be either a number or a string.
1789
- * @returns The mean anomaly as a string with 8 digits, padded with leading zeros.
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 meanAnomaly(meana: number | string): StringifiedNumber;
1678
+ static rotZ(theta: Radians): Matrix;
1793
1679
  /**
1794
- * Converts the mean motion value to a string representation with 8 decimal
1795
- * places. If the input is a number, it is converted to a string. If the input
1796
- * is already a string, it is parsed as a float and then converted to a string
1797
- * with 8 decimal places. The resulting string is padded with leading zeros to
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 meanMotion(meanmo: number | string): StringifiedNumber;
1685
+ static zero(rows: number, columns: number): Matrix;
1807
1686
  /**
1808
- * Converts the right ascension value to a stringified number.
1809
- * @param rasc - The right ascension value to convert.
1810
- * @returns The stringified number representation of the right ascension.
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 rightAscension(rasc: number | string): StringifiedNumber;
1691
+ static identity(dimension: number): Matrix;
1814
1692
  /**
1815
- * Sets a character at a specific index in a string. If the index is out of range, the original string is returned.
1816
- * @param str - The input string.
1817
- * @param index - The index at which to set the character.
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 setCharAt(str: string, index: number, chr: string): string;
1697
+ static diagonal(d: number[]): Matrix;
1822
1698
  /**
1823
- * Format mean motion dot (first derivative / 2) for TLE line 1.
1824
- * Format: sign + ".NNNNNNNN" = 10 chars total.
1825
- * @param value - Mean motion dot value (rev/day^2)
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
- static formatMeanMotionDot(value: number): string;
1703
+ add(m: Matrix): Matrix;
1829
1704
  /**
1830
- * Format a value in TLE exponential notation for BSTAR or mean motion ddot.
1831
- * Format: "sNNNNN±N" (8 chars) where mantissa has implied leading decimal point.
1832
- * Example: 0.00017507 → " 17507-3" (i.e., .17507 × 10^-3)
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
- static formatTleExponential(value: number): string;
1709
+ subtract(m: Matrix): Matrix;
1837
1710
  /**
1838
- * Compute TLE line checksum (modulo 10 sum of digits, '-' counts as 1).
1839
- * @param line - TLE line (first 68 characters are summed)
1840
- * @returns Checksum digit (0-9)
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
- static tleChecksum(line: string): number;
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 abstract class Force {
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
- * Calculate the acceleration due to the perturbing force on a given
1865
- * state vector.
1866
- * @param state The state vector.
1867
- * @throws If the force cannot be calculated.
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
- abstract acceleration(state: J2000): Vector3D;
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
- * @author Theodore Kruczek
1908
- * @license AGPL-3.0-or-later
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
- declare abstract class Interpolator {
1924
- abstract window(): EpochWindow;
1925
- inWindow(epoch: EpochUTC): boolean;
1926
- overlap(interpolator: Interpolator): EpochWindow | null;
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
- * @author Theodore Kruczek
1931
- * @license AGPL-3.0-or-later
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
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
1935
- * terms of the GNU Affero General Public License as published by the Free Software
1936
- * Foundation, either version 3 of the License, or (at your option) any later version.
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
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
1939
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1940
- * See the GNU Affero General Public License for more details.
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
- * You should have received a copy of the GNU Affero General Public License along with
1943
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
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
- * Interpolates the state at the given epoch.
1949
- * @param epoch The epoch in UTC format.
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
- abstract interpolate(epoch: EpochUTC): J2000 | null;
1953
- get sizeBytes(): number;
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
- declare class ForceModel {
1974
- private centralGravity_?;
1975
- private thirdBodyGravity_?;
1976
- private solarRadiationPressure_?;
1977
- private atmosphericDrag_?;
1978
- private maneuverThrust_;
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
- declare class Waypoint {
2019
- epoch: EpochUTC;
2020
- relativePosition: Vector3D<Kilometers>;
2021
- constructor(epoch: EpochUTC, relativePosition: Vector3D<Kilometers>);
2022
- /**
2023
- * Return the perturbed error in a [maneuver] when compared against the
2024
- * target [waypoint] given an initial [state], [forceModel],
2025
- * [target] interpolator, and speculative relative maneuver
2026
- * [components] _(m/s)_.
2027
- * @param waypoint The waypoint to target.
2028
- * @param maneuver The maneuver to perturb.
2029
- * @param state The initial state of the interceptor.
2030
- * @param forceModel The force model to use for propagation.
2031
- * @param target The target interpolator.
2032
- * @param components The speculative maneuver components.
2033
- * @returns The perturbed error in the maneuver.
2034
- */
2035
- static _error(waypoint: Waypoint, maneuver: Thrust, state: J2000, forceModel: ForceModel, target: StateInterpolator, components: Float64Array): number;
2036
- /**
2037
- * Generate a score function for refining perturbed [waypoint] maneuvers.
2038
- *
2039
- * The score function takes an array of speculative radial, intrack, and
2040
- * crosstrack components _(m/s)_ and returns the propagated error from the
2041
- * desired waypoint target.
2042
- * @param waypoint The waypoint to target.
2043
- * @param maneuver The maneuver to perturb.
2044
- * @param state The initial state of the interceptor.
2045
- * @param forceModel The force model to use for propagation.
2046
- * @param target The target interpolator.
2047
- * @returns A score function for refining maneuvers.
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
- static _refineManeuverScore(waypoint: Waypoint, maneuver: Thrust, state: J2000, forceModel: ForceModel, target: StateInterpolator): (components: Float64Array) => number;
2140
+ add(time: Date, data: T): void;
2050
2141
  /**
2051
- * Convert an array of [waypoints] into a maneuver sequence given an
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
- static toManeuvers(interceptor: J2000, pivot: EpochUTC, waypoints: Waypoint[], target: StateInterpolator, preManeuvers: Thrust[] | null, postManeuvers: Thrust[] | null, { durationRate, forceModel, refine, maxIter, printIter, }?: {
2078
- durationRate?: number;
2079
- forceModel?: ForceModel;
2080
- refine?: boolean;
2081
- maxIter?: number;
2082
- printIter?: boolean;
2083
- }): Thrust[];
2084
- static _refineManeuvers(waypoints: Waypoint[], maneuvers: Thrust[], interceptor: J2000, forceModel: ForceModel, target: StateInterpolator, { maxIter, printIter, }?: {
2085
- maxIter?: number;
2086
- printIter?: boolean;
2087
- }): Thrust[];
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
- declare class Hill {
2108
- epoch: EpochUTC;
2109
- position: Vector3D<Kilometers>;
2110
- velocity: Vector3D<KilometersPerSecond>;
2111
- private semimajorAxis_;
2112
- private meanMotion_;
2113
- constructor(epoch: EpochUTC, position: Vector3D<Kilometers>, velocity: Vector3D<KilometersPerSecond>, semimajorAxis: Kilometers);
2114
- static fromState(origin: J2000, radialPosition: Kilometers, intrackPosition: Kilometers, nodeVelocity: KilometersPerSecond, nodeOffsetTime: Seconds): Hill;
2115
- static fromNmc(origin: J2000, majorAxisRange: Kilometers, nodeVelocity: KilometersPerSecond, nodeOffsetTime: Seconds, translation?: number): Hill;
2116
- static fromPerch(origin: J2000, perchRange: Kilometers, nodeVelocity: KilometersPerSecond, nodeOffsetTime: Seconds): Hill;
2117
- get semimajorAxis(): Kilometers;
2118
- set semimajorAxis(sma: Kilometers);
2119
- get meanMotion(): RadiansPerSecond;
2120
- toJ2000Matrix(origin: J2000, transform: Matrix): J2000;
2121
- toJ2000(origin: J2000): J2000;
2122
- static transitionMatrix(t: number, meanMotion: number): Matrix;
2123
- transition(t: Seconds): Hill;
2124
- transitionWithMatrix(stm: Matrix, t: Seconds): Hill;
2125
- propagate(newEpoch: EpochUTC): Hill;
2126
- propagateWithMatrix(stm: Matrix, newEpoch: EpochUTC): Hill;
2127
- maneuver(maneuver: Thrust): Hill;
2128
- ephemeris(start: EpochUTC, stop: EpochUTC, step?: Seconds): Hill[];
2129
- get period(): Seconds;
2130
- nextRadialTangent(): Hill;
2131
- solveManeuver(waypoint: Waypoint, ignoreCrosstrack?: boolean): Thrust;
2132
- maneuverSequence(pivot: EpochUTC, waypoints: Waypoint[], preManeuvers?: Thrust[], postManeuvers?: Thrust[]): Thrust[];
2133
- maneuverOrigin(maneuver: Thrust): Hill;
2134
- get name(): string;
2135
- toString(): string;
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
- declare class Vector3D<T extends number = number> {
2162
- x: T;
2163
- y: T;
2164
- z: T;
2165
- constructor(x: T, y: T, z: T);
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
- * Create a new Vector3D object from the first three elements of a Vector
2168
- * object.
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
- static fromVector<U extends number>(v: Vector<U>): Vector3D<U>;
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
- * Return the Euclidean distance between this and another Vector3D.
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
- distance(v: Vector3D<T>): T;
2300
+ disableHistory(): void;
2195
2301
  /**
2196
- * Convert this to a unit Vector3D.
2197
- * @returns A unit Vector3D.
2302
+ * Returns the history object if enabled, null otherwise.
2198
2303
  */
2199
- normalize(): Vector3D<T>;
2200
- dot<T extends number>(v: Vector3D<T>): T;
2201
- outer(v: Vector3D): Matrix;
2202
- cross<U extends number>(v: Vector3D<U>): Vector3D<U>;
2203
- skewSymmetric(): Matrix;
2204
- rotX(theta: number): Vector3D;
2205
- rotY(theta: Radians): Vector3D<T>;
2206
- rotZ(theta: Radians): Vector3D<T>;
2207
- angle<U extends number>(v: Vector3D<U>): Radians;
2208
- angleDegrees(v: Vector3D<T>): number;
2209
- sight(v: Vector3D<KilometersPerSecond>, radius: Kilometers): boolean;
2210
- bisect(v: Vector3D<T>): Vector3D<T>;
2211
- row(): Matrix;
2212
- column(): Matrix;
2213
- join(v: Vector3D): Vector;
2214
- static readonly zero: Vector3D<number>;
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
- * A Vector is a mathematical object that has both magnitude and direction.
2390
+ * Parameters for constructing a GroundObject.
2242
2391
  */
2243
- declare class Vector<T extends number = number> {
2244
- elements: T[] | Float64Array;
2245
- /**
2246
- * The length of the vector.
2247
- */
2248
- readonly length: number;
2249
- /**
2250
- * Represents a 3-dimensional vector.
2251
- */
2252
- static readonly origin3: Vector<0>;
2253
- /**
2254
- * Represents a vector with all elements set to zero.
2255
- */
2256
- static readonly origin6: Vector<0>;
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
- * Represents the x-axis vector.
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
- static readonly xAxis: Vector<0 | 1>;
2417
+ rae(satellite: Satellite, date?: Date): RaeVec3<Kilometers, Degrees> | null;
2261
2418
  /**
2262
- * Represents the y-axis vector.
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
- static readonly yAxis: Vector<0 | 1>;
2423
+ ecef(): EcefVec3<Kilometers>;
2265
2424
  /**
2266
- * Represents the z-axis vector.
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
- static readonly zAxis: Vector<0 | 1>;
2430
+ eci(date?: Date): TemeVec3<Kilometers>;
2269
2431
  /**
2270
- * Represents a vector pointing along the negative x-axis.
2432
+ * Returns the latitude, longitude, and altitude of the GroundObject.
2433
+ * @returns The latitude, longitude, and altitude as an LlaVec3 object.
2271
2434
  */
2272
- static readonly xAxisNeg: Vector<0 | -1>;
2435
+ lla(): LlaVec3<Degrees, Kilometers>;
2273
2436
  /**
2274
- * Represents a vector pointing along the negative y-axis.
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
- static readonly yAxisNeg: Vector<0 | -1>;
2442
+ llaRad(): LlaVec3<Radians, Kilometers>;
2443
+ get latRad(): Radians;
2444
+ get lonRad(): Radians;
2277
2445
  /**
2278
- * Represents a vector pointing along the negative z-axis.
2446
+ * Converts the ground position to geodetic coordinates.
2447
+ * @returns The geodetic coordinates.
2279
2448
  */
2280
- static readonly zAxisNeg: Vector<0 | -1>;
2281
- constructor(elements: T[] | Float64Array);
2449
+ toGeodetic(): Geodetic;
2282
2450
  /**
2283
- * Creates a zero vector of the specified length.
2284
- * @param length The length of the vector.
2285
- * @returns A new Vector object representing the zero vector.
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
- static zero(length: number): Vector;
2456
+ toJ2000(date?: Date): J2000;
2288
2457
  /**
2289
- * Creates a new Vector with the specified length, filled with the specified
2290
- * value.
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
- static filled(length: number, value: number): Vector;
2461
+ addSensor(sensor: SensorInterface): void;
2296
2462
  /**
2297
- * Creates a new Vector instance from an array of elements.
2298
- * @param elements - The array of elements to create the Vector from.
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
- static fromList(elements: number[]): Vector;
2466
+ removeSensor(sensorId: number): void;
2302
2467
  /**
2303
- * Returns a string representation of the vector.
2304
- * @param fixed - The number of digits to appear after the decimal point.
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
- toString(fixed?: number): string;
2471
+ addCommDevice(device: CommunicationDeviceInterface): void;
2309
2472
  /**
2310
- * Returns a string representation of the x value of the vector.
2311
- * @returns A string representation of the x value of the vector.
2473
+ * Removes a communication device from this ground object.
2474
+ * @param deviceId - The ID of the device to remove
2312
2475
  */
2313
- get x(): number;
2476
+ removeCommDevice(deviceId: number): void;
2477
+ isGroundObject(): boolean;
2314
2478
  /**
2315
- * Returns a string representation of the y value of the vector.
2316
- * @returns A string representation of the y value of the vector.
2479
+ * Validates the input data for the GroundObject.
2480
+ * @param info - The GroundPositionParams object containing the latitude,
2481
+ * longitude, and altitude.
2317
2482
  */
2318
- get y(): number;
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
- * Returns a string representation of the z value of the vector.
2321
- * @returns A string representation of the z value of the vector.
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
- get z(): number;
2520
+ static fromGeodetic(geodetic: Geodetic, name?: string, id?: number): GroundStation;
2324
2521
  /**
2325
- * Converts the vector elements to an array.
2326
- * @returns An array containing the vector elements.
2522
+ * Creates a deep copy of this ground station.
2327
2523
  */
2328
- toList(): number[];
2524
+ clone(): GroundStation;
2329
2525
  /**
2330
- * Converts the vector to a Float64Array.
2331
- * @returns The vector as a Float64Array.
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
- toArray(): Float64Array;
2533
+ moveTo(lat: Degrees, lon: Degrees, alt?: Kilometers): GroundStation;
2334
2534
  /**
2335
- * Calculates the magnitude of the vector.
2336
- * @returns The magnitude of the vector.
2535
+ * Returns true since GroundStation is always a ground object.
2337
2536
  */
2338
- magnitude(): number;
2537
+ isGroundObject(): boolean;
2339
2538
  /**
2340
- * Adds the elements of another vector to this vector and returns a new
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
- add(v: Vector): Vector;
2346
- /**
2347
- * Subtracts a vector from the current vector.
2348
- * @param v The vector to subtract.
2349
- * @returns A new vector representing the result of the subtraction.
2350
- */
2351
- subtract(v: Vector): Vector;
2352
- /**
2353
- * Scales the vector by a given factor.
2354
- * @param n The scaling factor.
2355
- * @returns A new Vector object representing the scaled vector.
2356
- */
2357
- scale(n: number): Vector;
2358
- /**
2359
- * Negates the vector by scaling it by -1.
2360
- * @returns A new Vector object representing the negated vector.
2361
- */
2362
- negate(): Vector;
2363
- /**
2364
- * Return the Euclidean distance between this and another Vector.
2365
- * @param v The vector to calculate the distance to.
2366
- * @returns The distance between the two vectors.
2367
- */
2368
- distance(v: Vector): number;
2369
- /**
2370
- * Normalizes the vector, making it a unit vector with the same direction but
2371
- * a magnitude of 1. If the vector has a magnitude of 0, it returns a zero
2372
- * vector of the same length.
2373
- * @returns The normalized vector.
2374
- */
2375
- normalize(): Vector;
2376
- /**
2377
- * Calculates the dot product of this vector and another vector.
2378
- * @param v - The vector to calculate the dot product with.
2379
- * @returns The dot product of the two vectors.
2380
- */
2381
- dot(v: Vector): number;
2382
- /**
2383
- * Calculates the outer product of this vector with another vector.
2384
- * @param v The vector to calculate the outer product with.
2385
- * @returns A matrix representing the outer product of the two vectors.
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
- * Rotates the vector around the Y-axis by the specified angle.
2408
- * @param theta The angle of rotation in radians.
2409
- * @returns A new Vector representing the rotated vector.
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
- rotY(theta: Radians): Vector;
2591
+ static fromDegrees(latitude: Degrees, longitude: Degrees, altitude: Kilometers): Geodetic;
2412
2592
  /**
2413
- * Rotates the vector around the Z-axis by the specified angle.
2414
- * @param theta The angle of rotation in radians.
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
- rotZ(theta: Radians): Vector;
2596
+ toString(): string;
2418
2597
  /**
2419
- * Calculates the angle between this vector and another vector.
2420
- * @param v The other vector.
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
- angle(v: Vector): Radians;
2601
+ get latDeg(): number;
2424
2602
  /**
2425
- * Calculates the angle between this vector and another vector in degrees.
2426
- * @param v The other vector.
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
- angleDegrees(v: Vector): Degrees;
2606
+ get lonDeg(): number;
2430
2607
  /**
2431
- * Determines if there is line of sight between this vector and another vector
2432
- * within a given radius.
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
- sight(v: Vector, radius: number): boolean;
2611
+ toGroundStation(): GroundStation;
2438
2612
  /**
2439
- * Returns the bisect vector between this vector and the given vector. The
2440
- * bisect vector is calculated by scaling this vector's magnitude by the
2441
- * magnitude of the given vector, adding the result to the product of scaling
2442
- * the given vector's magnitude by this vector's magnitude, and then
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
- bisect(v: Vector): Vector;
2618
+ toITRF(epoch: EpochUTC): ITRF;
2448
2619
  /**
2449
- * Joins the current vector with another vector.
2450
- * @param v The vector to join with.
2451
- * @returns A new vector that contains the elements of both vectors.
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
- join(v: Vector): Vector;
2625
+ angle(g: Geodetic, method?: AngularDistanceMethod): Radians;
2454
2626
  /**
2455
- * Returns a new Vector containing a portion of the elements from the
2456
- * specified start index to the specified end index
2457
- * @param start The start index of the slice (inclusive).
2458
- * @param end The end index of the slice (exclusive).
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
- slice(start: number, end: number): Vector;
2632
+ angleDeg(g: Geodetic, method?: AngularDistanceMethod): Degrees;
2462
2633
  /**
2463
- * Returns a new Matrix object representing the row vector.
2464
- * @returns The row vector as a Matrix object.
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
- row(): Matrix;
2639
+ distance(g: Geodetic, method?: AngularDistanceMethod): Kilometers;
2467
2640
  /**
2468
- * Returns a new Matrix object representing the column vector of this Vector.
2469
- * @returns The column vector as a Matrix object.
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
- column(): Matrix;
2644
+ fieldOfView(): Radians;
2472
2645
  /**
2473
- * Converts the elements at the specified index to a Vector3D object.
2474
- * @param index - The index of the elements to convert.
2475
- * @returns A new Vector3D object containing the converted elements.
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
- toVector3D(index: number): Vector3D;
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 matrix is a rectangular array of numbers or other mathematical objects for
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 Matrix {
2508
- elements: number[][];
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 matrix with all elements set to zero.
2514
- * @param rows - The number of rows in the matrix.
2515
- * @param columns - The number of columns in the matrix.
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 allZeros(rows: number, columns: number): Matrix;
2687
+ static createTle(tleParams: TleParams): {
2688
+ tle1: TleLine1;
2689
+ tle2: TleLine2;
2690
+ };
2519
2691
  /**
2520
- * Creates a new Matrix with the specified number of rows and columns, filled
2521
- * with the specified value.
2522
- * @param rows The number of rows in the matrix.
2523
- * @param columns The number of columns in the matrix.
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 fill(rows: number, columns: number, value?: number): Matrix;
2697
+ static argumentOfPerigee(argPe: number | string): StringifiedNumber;
2528
2698
  /**
2529
- * Creates a rotation matrix around the X-axis.
2530
- * @param theta - The angle of rotation in radians.
2531
- * @returns The rotation matrix.
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 rotX(theta: Radians): Matrix;
2704
+ static eccentricity(ecen: string | number): string;
2534
2705
  /**
2535
- * Creates a rotation matrix around the y-axis.
2536
- * @param theta - The angle of rotation in radians.
2537
- * @returns The rotation matrix.
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 rotY(theta: Radians): Matrix;
2711
+ static inclination(inc: number | string): StringifiedNumber;
2540
2712
  /**
2541
- * Creates a rotation matrix around the Z-axis.
2542
- * @param theta The angle of rotation in radians.
2543
- * @returns The rotation matrix.
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
- subtract(m: Matrix): Matrix;
2718
+ static meanAnomaly(meana: number | string): StringifiedNumber;
2577
2719
  /**
2578
- * Scales the matrix by multiplying each element by a scalar value.
2579
- * @param n - The scalar value to multiply each element by.
2580
- * @returns A new Matrix object representing the scaled matrix.
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
- scale(n: number): Matrix;
2732
+ static meanMotion(meanmo: number | string): StringifiedNumber;
2583
2733
  /**
2584
- * Negates the matrix by scaling it by -1.
2585
- * @returns The negated matrix.
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
- negate(): Matrix;
2739
+ static rightAscension(rasc: number | string): StringifiedNumber;
2588
2740
  /**
2589
- * Multiplies this matrix with another matrix.
2590
- * @param m The matrix to multiply with.
2591
- * @returns The resulting matrix.
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
- multiply(m: Matrix): Matrix;
2747
+ static setCharAt(str: string, index: number, chr: string): string;
2594
2748
  /**
2595
- * Computes the outer product of this matrix with another matrix.
2596
- * @param m - The matrix to compute the outer product with.
2597
- * @returns The resulting matrix.
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
- outerProduct(m: Matrix): Matrix;
2754
+ static formatMeanMotionDot(value: number): string;
2600
2755
  /**
2601
- * Multiplies the matrix by a vector.
2602
- * @param v The vector to multiply by.
2603
- * @returns A new vector representing the result of the multiplication.
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
- multiplyVector(v: Vector): Vector;
2762
+ static formatTleExponential(value: number): string;
2606
2763
  /**
2607
- * Multiplies a 3D vector by the matrix.
2608
- * @template T - The type of the vector elements.
2609
- * @param v - The 3D vector to multiply.
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
- multiplyVector3D<T extends number>(v: Vector3D<T>): Vector3D<T>;
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
- * Returns a new Matrix object where each element is the reciprocal of the
2615
- * corresponding element in the current matrix. If an element in the current
2616
- * matrix is zero, the corresponding element in the output matrix will also be
2617
- * zero.
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
- reciprocal(): Matrix;
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
- * Transposes the matrix by swapping rows with columns.
2624
- * @returns A new Matrix object representing the transposed matrix.
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
- transpose(): Matrix;
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
- * Performs the Cholesky decomposition on the matrix.
2629
- * @returns A new Matrix object representing the Cholesky decomposition of the
2630
- * original matrix.
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
- cholesky(): Matrix;
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
- * Swaps two rows in the matrix.
2635
- * @param i - The index of the first row.
2636
- * @param j - The index of the second row.
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
- private _swapRows;
2990
+ static _error(waypoint: Waypoint, maneuver: Thrust, state: J2000, forceModel: ForceModel, target: StateInterpolator, components: Float64Array): number;
2639
2991
  /**
2640
- * Converts the matrix to reduced row echelon form using the Gaussian
2641
- * elimination method. This method modifies the matrix in-place.
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
- private toReducedRowEchelonForm_;
3004
+ static _refineManeuverScore(waypoint: Waypoint, maneuver: Thrust, state: J2000, forceModel: ForceModel, target: StateInterpolator): (components: Float64Array) => number;
2644
3005
  /**
2645
- * Calculates the inverse of the matrix.
2646
- * @returns The inverse of the matrix.
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
- inverse(): Matrix;
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 alphabets to their corresponding numeric values.
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
- * Returns the number of entries in the history.
3887
+ * The propagator type to create. Defaults to PropagatorType.RK89.
3556
3888
  */
3557
- get length(): number;
3889
+ type?: PropagatorType;
3558
3890
  /**
3559
- * Returns the current configuration.
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
- get config(): HistoryConfig;
3895
+ forceModel?: ForceModel;
3562
3896
  /**
3563
- * Returns true if the history is empty.
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
- get isEmpty(): boolean;
3902
+ tolerance?: number;
3566
3903
  /**
3567
- * Returns the time span covered by the history in milliseconds.
3568
- * Returns 0 if there are fewer than 2 entries.
3904
+ * Fixed step size in seconds for RK4 propagator.
3905
+ * Defaults to 15.0 seconds.
3906
+ * Ignored for other propagator types.
3569
3907
  */
3570
- get timeSpan(): number;
3571
- toString(): string;
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
- * Abstract base class for all objects in the ootk system.
4169
- * Provides common functionality for identification, type checking,
4170
- * history tracking, and serialization.
4171
- */
4172
- declare abstract class BaseObject {
4173
- /** Unique identifier for the object */
4174
- id: number;
4175
- /** Human-readable name */
4176
- name: string;
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
- * Parameters for constructing a GroundObject.
4285
- */
4286
- interface GroundObjectParams extends BaseObjectParams {
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 abstract class GroundObject extends BaseObject {
4296
- name: string;
4297
- readonly lat: Degrees;
4298
- readonly lon: Degrees;
4299
- readonly alt: Kilometers;
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
- * Converts the latitude, longitude, and altitude of the GroundObject to radians and kilometers.
4332
- * @variation optimized version of this.toGeodetic() without class instantiation for better performance and
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
- llaRad(): LlaVec3<Radians, Kilometers>;
4337
- get latRad(): Radians;
4338
- get lonRad(): Radians;
4354
+ get state(): J2000;
4339
4355
  /**
4340
- * Converts the ground position to geodetic coordinates.
4341
- * @returns The geodetic coordinates.
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
- toGeodetic(): Geodetic;
4362
+ ephemerisManeuver(_start: EpochUTC, _finish: EpochUTC, _maneuvers: Thrust[], _interval?: number): VerletBlendInterpolator;
4344
4363
  /**
4345
- * Converts the ground position to J2000 inertial coordinates.
4346
- * Ground objects have zero velocity in the inertial frame (ignoring Earth rotation).
4347
- * @param date - The date for the conversion (defaults to now)
4348
- * @returns J2000 state vector
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
- toJ2000(date?: Date): J2000;
4369
+ maneuver(_maneuver: Thrust, _interval?: number): J2000[];
4351
4370
  /**
4352
- * Adds a sensor to this ground object.
4353
- * @param sensor - The sensor to add
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
- addSensor(sensor: SensorInterface): void;
4375
+ propagate(epoch: EpochUTC): J2000;
4356
4376
  /**
4357
- * Removes a sensor from this ground object.
4358
- * @param sensorId - The ID of the sensor to remove
4377
+ * Resets the state of the Sgp4Propagator by updating the cache state
4378
+ * to the current J2000 state of the TLE.
4359
4379
  */
4360
- removeSensor(sensorId: number): void;
4380
+ reset(): void;
4361
4381
  /**
4362
- * Adds a communication device to this ground object.
4363
- * @param device - The device to add
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
- addCommDevice(device: CommunicationDeviceInterface): void;
4385
+ checkpoint(): number;
4366
4386
  /**
4367
- * Removes a communication device from this ground object.
4368
- * @param deviceId - The ID of the device to remove
4387
+ * Clears all the checkpoints in the propagator.
4369
4388
  */
4370
- removeCommDevice(deviceId: number): void;
4371
- isGroundObject(): boolean;
4389
+ clearCheckpoints(): void;
4372
4390
  /**
4373
- * Validates the input data for the GroundObject.
4374
- * @param info - The GroundPositionParams object containing the latitude,
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
- private validateGroundObjectInputData_;
4394
+ restore(index: number): void;
4378
4395
  }
4379
4396
 
4380
4397
  /**
@@ -6109,35 +6126,6 @@ interface StarObjectParams extends BaseObjectParams {
6109
6126
  bayer?: string;
6110
6127
  }
6111
6128
 
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
6129
  /**
6142
6130
  * @author Theodore Kruczek
6143
6131
  * @description Orbital Object ToolKit (ootk) is a collection of tools for working
@@ -7545,6 +7533,49 @@ declare const MILLISECONDS_PER_SECOND: Milliseconds;
7545
7533
  declare const RADIUS_OF_EARTH = 6371;
7546
7534
  declare const earthGravityParam = 398600.4415;
7547
7535
 
7536
+ /**
7537
+ * @author Theodore Kruczek
7538
+ * @license AGPL-3.0-or-later
7539
+ * @copyright (c) 2025-2026 Kruczek Labs LLC
7540
+ *
7541
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7542
+ * terms of the GNU Affero General Public License as published by the Free Software
7543
+ * Foundation, either version 3 of the License, or (at your option) any later version.
7544
+ *
7545
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
7546
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7547
+ * See the GNU Affero General Public License for more details.
7548
+ *
7549
+ * You should have received a copy of the GNU Affero General Public License along with
7550
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
7551
+ */
7552
+
7553
+ /** Covariance Frame */
7554
+ declare enum CovarianceFrame {
7555
+ /** Earth-centered inertial */
7556
+ ECI = "eci",
7557
+ /** Radial-Intrack-Crosstrack */
7558
+ RIC = "ric"
7559
+ }
7560
+ declare class StateCovariance {
7561
+ matrix: Matrix;
7562
+ frame: CovarianceFrame;
7563
+ /**
7564
+ * Create a new [StateCovariance] object given its covariance [matrix] and
7565
+ * [CovarianceFrame].
7566
+ * @param matrix The covariance matrix.
7567
+ * @param frame The covariance frame.
7568
+ * @returns A new [StateCovariance] object.
7569
+ */
7570
+ constructor(matrix: Matrix, frame: CovarianceFrame);
7571
+ static fromSigmas(sigmas: number[], frame: CovarianceFrame): StateCovariance;
7572
+ /**
7573
+ * Calculates the standard deviations (sigmas) of each element in the covariance matrix.
7574
+ * @returns A vector containing the standard deviations of each element in the covariance matrix.
7575
+ */
7576
+ sigmas(): Vector;
7577
+ }
7578
+
7548
7579
  /**
7549
7580
  * Creates a 6x6 state covariance matrix from a TLE
7550
7581
  * @param tleLine1 The first line of the TLE
@@ -8863,65 +8894,6 @@ declare class EphemerisSatellite extends SpaceObject {
8863
8894
  private createInterpolator_;
8864
8895
  }
8865
8896
 
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
8897
  /**
8926
8898
  * @author Theodore Kruczek
8927
8899
  * @license AGPL-3.0-or-later
@@ -10383,43 +10355,163 @@ declare class SolarSystem {
10383
10355
  /** Pluto */
10384
10356
  static get pluto(): PlanetBody;
10385
10357
  /**
10386
- * Gets the count of registered bodies.
10358
+ * Gets the count of registered bodies.
10359
+ */
10360
+ static get count(): number;
10361
+ /**
10362
+ * Clears all registered bodies and resets to uninitialized state.
10363
+ * Primarily for testing purposes.
10364
+ */
10365
+ static reset(): void;
10366
+ /**
10367
+ * Ensures the registry is initialized before access.
10368
+ */
10369
+ private static ensureInitialized_;
10370
+ }
10371
+
10372
+ /**
10373
+ * @author Theodore Kruczek
10374
+ * @license AGPL-3.0-or-later
10375
+ * @copyright (c) 2025-2026 Kruczek Labs LLC
10376
+ *
10377
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
10378
+ * terms of the GNU Affero General Public License as published by the Free Software
10379
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10380
+ *
10381
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10382
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10383
+ * See the GNU Affero General Public License for more details.
10384
+ *
10385
+ * You should have received a copy of the GNU Affero General Public License along with
10386
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
10387
+ */
10388
+
10389
+ declare const radecToPosition: (ra: Radians, dec: Radians, r: Kilometers) => Vector3D<Kilometers>;
10390
+ declare const radecToVelocity: (ra: Radians, dec: Radians, r: Kilometers, raDot: RadiansPerSecond, decDot: RadiansPerSecond, rDot: KilometersPerSecond) => Vector3D<KilometersPerSecond>;
10391
+ declare const normalizeAngle: (a: number, b: number) => number;
10392
+ declare const observationDerivative: (xh: number, xl: number, step: number, isAngle?: boolean) => number;
10393
+ declare const observationNoiseFromSigmas: (sigmas: number[]) => Matrix;
10394
+
10395
+ /**
10396
+ * @author Theodore Kruczek
10397
+ * @description Orbital Object ToolKit (ootk) is a collection of tools for working
10398
+ * with satellites and other orbital objects.
10399
+ * @license AGPL-3.0-or-later
10400
+ * @copyright (c) 2025-2026 Kruczek Labs LLC
10401
+ *
10402
+ * Many of the classes are based off of the work of @david-rc-dayton and his
10403
+ * Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which
10404
+ * is licensed under the MIT license.
10405
+ *
10406
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
10407
+ * terms of the GNU Affero General Public License as published by the Free Software
10408
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10409
+ *
10410
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10411
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10412
+ * See the GNU Affero General Public License for more details.
10413
+ *
10414
+ * You should have received a copy of the GNU Affero General Public License along with
10415
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
10416
+ */
10417
+
10418
+ /**
10419
+ * Represents a topocentric right ascension and declination observation.
10420
+ *
10421
+ * Topocentric coordinates take into account the observer's exact location on the Earth's surface. This model is crucial
10422
+ * for precise measurements of local astronomical events and nearby celestial objects, where the observer's latitude,
10423
+ * longitude, and altitude can significantly affect the observed position due to parallax. Topocentric coordinates are
10424
+ * particularly important for observations of the Moon, planets, and artificial satellites.
10425
+ */
10426
+ declare class RadecTopocentric {
10427
+ epoch: EpochUTC;
10428
+ rightAscension: Radians;
10429
+ declination: Radians;
10430
+ range?: Kilometers | undefined;
10431
+ rightAscensionRate?: (RadiansPerSecond | null) | undefined;
10432
+ declinationRate?: (RadiansPerSecond | null) | undefined;
10433
+ rangeRate?: (KilometersPerSecond | null) | undefined;
10434
+ constructor(epoch: EpochUTC, rightAscension: Radians, declination: Radians, range?: Kilometers | undefined, rightAscensionRate?: (RadiansPerSecond | null) | undefined, declinationRate?: (RadiansPerSecond | null) | undefined, rangeRate?: (KilometersPerSecond | null) | undefined);
10435
+ /**
10436
+ * Create a new RadecTopocentric object, using degrees for the angular values.
10437
+ * @param epoch UTC epoch.
10438
+ * @param rightAscensionDegrees Right-ascension in degrees.
10439
+ * @param declinationDegrees Declination in degrees.
10440
+ * @param range Range in km.
10441
+ * @param rightAscensionRateDegrees Right-ascension rate in degrees per second.
10442
+ * @param declinationRateDegrees Declination rate in degrees per second.
10443
+ * @param rangeRate Range rate in km/s.
10444
+ * @returns A new RadecTopocentric object.
10445
+ */
10446
+ static fromDegrees(epoch: EpochUTC, rightAscensionDegrees: Degrees, declinationDegrees: Degrees, range?: Kilometers, rightAscensionRateDegrees?: DegreesPerSecond, declinationRateDegrees?: DegreesPerSecond, rangeRate?: KilometersPerSecond): RadecTopocentric;
10447
+ /**
10448
+ * Create a new RadecTopocentric object from a J2000 state vector.
10449
+ * @param state Inertial state vector.
10450
+ * @param site Site vector.
10451
+ * @returns A new RadecTopocentric object.
10452
+ */
10453
+ static fromStateVector(state: J2000, site: J2000): RadecTopocentric;
10454
+ /**
10455
+ * Gets the right ascension in degrees.
10456
+ * @returns The right ascension in degrees.
10457
+ */
10458
+ get rightAscensionDegrees(): Degrees;
10459
+ /**
10460
+ * Gets the declination in degrees.
10461
+ * @returns The declination in degrees.
10462
+ */
10463
+ get declinationDegrees(): Degrees;
10464
+ /**
10465
+ * Gets the right ascension rate in degrees per second.
10466
+ * @returns The right ascension rate in degrees per second, or null if it is not available.
10467
+ */
10468
+ get rightAscensionRateDegrees(): DegreesPerSecond | null;
10469
+ /**
10470
+ * Gets the rate of change of declination in degrees per second.
10471
+ * @returns The rate of change of declination in degrees per second, or null if the declination rate is not defined.
10472
+ */
10473
+ get declinationRateDegrees(): DegreesPerSecond | null;
10474
+ /**
10475
+ * Return the position relative to the observer site.
10476
+ *
10477
+ * An optional range value can be passed to override the value contained in this observation.
10478
+ * @param site Observer site.
10479
+ * @param range Range in km.
10480
+ * @returns A Vector3D object.
10481
+ */
10482
+ position(site: J2000, range?: Kilometers): Vector3D<Kilometers>;
10483
+ /**
10484
+ * Return the velocity relative to the observer site.
10485
+ *
10486
+ * An optional range and rangeRate value can be passed to override the values contained in this observation.
10487
+ * @param site Observer site.
10488
+ * @param range Range in km.
10489
+ * @param rangeRate Range rate in km/s.
10490
+ * @returns A Vector3D object.
10387
10491
  */
10388
- static get count(): number;
10492
+ velocity(site: J2000, range?: Kilometers, rangeRate?: KilometersPerSecond): Vector3D<KilometersPerSecond>;
10389
10493
  /**
10390
- * Clears all registered bodies and resets to uninitialized state.
10391
- * Primarily for testing purposes.
10494
+ * Calculates the line of sight vector in the topocentric coordinate system.
10495
+ * The line of sight vector points from the observer's location towards the celestial object.
10496
+ * @returns The line of sight vector as a Vector3D object.
10392
10497
  */
10393
- static reset(): void;
10498
+ lineOfSight(): Vector3D;
10394
10499
  /**
10395
- * Ensures the registry is initialized before access.
10500
+ * Calculate the angular distance between this and another RadecTopocentric object.
10501
+ * @param radec - The other RadecTopocentric object.
10502
+ * @param method - The angular distance method to use.
10503
+ * @returns The angular distance.
10396
10504
  */
10397
- private static ensureInitialized_;
10505
+ angle(radec: RadecTopocentric, method?: AngularDistanceMethod): Radians;
10506
+ /**
10507
+ * Calculate the angular distance between this and another RadecTopocentric object.
10508
+ * @param radec - The other RadecTopocentric object.
10509
+ * @param method - The angular distance method to use.
10510
+ * @returns The angular distance
10511
+ */
10512
+ angleDegrees(radec: RadecTopocentric, method?: AngularDistanceMethod): Degrees;
10398
10513
  }
10399
10514
 
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
10515
  /**
10424
10516
  * @author Theodore Kruczek
10425
10517
  * @license AGPL-3.0-or-later
@@ -10573,126 +10665,6 @@ declare class RadecGeocentric {
10573
10665
  angleDegrees(radec: RadecGeocentric, method?: AngularDistanceMethod): Degrees;
10574
10666
  }
10575
10667
 
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
10668
  /**
10697
10669
  * @author Theodore Kruczek
10698
10670
  * @description Orbital Object ToolKit (ootk) is a collection of tools for working
@@ -11377,90 +11349,47 @@ declare class RkResult {
11377
11349
  * @author Theodore Kruczek
11378
11350
  * @license AGPL-3.0-or-later
11379
11351
  * @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;
11352
+ *
11353
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
11354
+ * terms of the GNU Affero General Public License as published by the Free Software
11355
+ * Foundation, either version 3 of the License, or (at your option) any later version.
11356
+ *
11357
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11358
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11359
+ * See the GNU Affero General Public License for more details.
11360
+ *
11361
+ * You should have received a copy of the GNU Affero General Public License along with
11362
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
11363
+ */
11364
+
11365
+ declare class RungeKutta4Propagator extends Propagator {
11366
+ private readonly initState_;
11367
+ private forceModel_;
11368
+ private stepSize_;
11369
+ private cacheState_;
11370
+ private checkpoints_;
11459
11371
  /**
11460
- * Calculates the standard deviations (sigmas) of each element in the covariance matrix.
11461
- * @returns A vector containing the standard deviations of each element in the covariance matrix.
11372
+ * Create a new [RungeKutta4Propagator] object from an initial state vector and
11373
+ * along with an optional [ForceModel] and [stepSize] in seconds.
11374
+ * @param initState_ Initial state vector.
11375
+ * @param forceModel_ Numerical integration force model.
11376
+ * @param stepSize_ Integration step size _(seconds)_.
11377
+ * @param cacheState_ Cached state vector.
11378
+ * @param checkpoints_ Cached state vector checkpoints.
11462
11379
  */
11463
- sigmas(): Vector;
11380
+ constructor(initState_: J2000, forceModel_?: ForceModel, stepSize_?: number, cacheState_?: J2000, checkpoints_?: J2000[]);
11381
+ setStepSize(seconds: number): void;
11382
+ setForceModel(forceModel: ForceModel): void;
11383
+ ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval?: Seconds): VerletBlendInterpolator;
11384
+ maneuver(maneuver: Thrust, interval?: number): J2000[];
11385
+ private _kFn;
11386
+ private _integrate;
11387
+ propagate(epoch: EpochUTC): J2000;
11388
+ reset(): void;
11389
+ get state(): J2000;
11390
+ checkpoint(): number;
11391
+ clearCheckpoints(): void;
11392
+ restore(index: number): void;
11464
11393
  }
11465
11394
 
11466
11395
  /**
@@ -12142,6 +12071,113 @@ interface RicSigmas {
12142
12071
  */
12143
12072
  declare function scaleAndClampRicSigmas(sigmas: RicSigmas, confidence: number, caps: RicSigmas): RicSigmas | null;
12144
12073
 
12074
+ /**
12075
+ * @author Theodore Kruczek
12076
+ * @license AGPL-3.0-or-later
12077
+ * @copyright (c) 2025-2026 Kruczek Labs LLC
12078
+ *
12079
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
12080
+ * terms of the GNU Affero General Public License as published by the Free Software
12081
+ * Foundation, either version 3 of the License, or (at your option) any later version.
12082
+ *
12083
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12084
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12085
+ * See the GNU Affero General Public License for more details.
12086
+ *
12087
+ * You should have received a copy of the GNU Affero General Public License along with
12088
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
12089
+ */
12090
+
12091
+ /**
12092
+ * Represents the result of a conjunction assessment between two space objects.
12093
+ * Contains all relevant information about the close approach event.
12094
+ */
12095
+ declare class ConjunctionEvent {
12096
+ /** Time of Closest Approach (TCA) */
12097
+ readonly tca: EpochUTC;
12098
+ /** Primary object state at TCA in J2000 frame */
12099
+ readonly primaryState: J2000;
12100
+ /** Secondary object state at TCA in J2000 frame */
12101
+ readonly secondaryState: J2000;
12102
+ /** Relative state in RIC frame (relative to primary) */
12103
+ readonly relativeState: RIC;
12104
+ /** Total miss distance at TCA (km) */
12105
+ readonly missDistance: Kilometers;
12106
+ /** Radial component of miss distance (km) */
12107
+ readonly radialDistance: Kilometers;
12108
+ /** Intrack component of miss distance (km) */
12109
+ readonly intrackDistance: Kilometers;
12110
+ /** Crosstrack component of miss distance (km) */
12111
+ readonly crosstrackDistance: Kilometers;
12112
+ /** Relative velocity magnitude at TCA (km/s) */
12113
+ readonly relativeVelocity: KilometersPerSecond;
12114
+ /** Combined position covariance matrix in RIC frame (optional) */
12115
+ readonly combinedCovariance?: StateCovariance;
12116
+ /** Probability of collision (optional, 0-1) */
12117
+ readonly probabilityOfCollision?: number;
12118
+ /** Hard body radius for primary object (km, optional) */
12119
+ readonly primaryRadius?: Kilometers;
12120
+ /** Hard body radius for secondary object (km, optional) */
12121
+ readonly secondaryRadius?: Kilometers;
12122
+ /** Primary object name/identifier (optional, for CDM export) */
12123
+ readonly primaryName?: string;
12124
+ /** Secondary object name/identifier (optional, for CDM export) */
12125
+ readonly secondaryName?: string;
12126
+ /** Primary object catalog designator (optional, for CDM export) */
12127
+ readonly primaryDesignator?: string;
12128
+ /** Secondary object catalog designator (optional, for CDM export) */
12129
+ readonly secondaryDesignator?: string;
12130
+ /** Primary object covariance (optional, for CDM export) */
12131
+ readonly primaryCovariance?: StateCovariance;
12132
+ /** Secondary object covariance (optional, for CDM export) */
12133
+ readonly secondaryCovariance?: StateCovariance;
12134
+ constructor(params: {
12135
+ tca: EpochUTC;
12136
+ primaryState: J2000;
12137
+ secondaryState: J2000;
12138
+ relativeState: RIC;
12139
+ missDistance: Kilometers;
12140
+ radialDistance: Kilometers;
12141
+ intrackDistance: Kilometers;
12142
+ crosstrackDistance: Kilometers;
12143
+ relativeVelocity: KilometersPerSecond;
12144
+ combinedCovariance?: StateCovariance;
12145
+ probabilityOfCollision?: number;
12146
+ primaryRadius?: Kilometers;
12147
+ secondaryRadius?: Kilometers;
12148
+ primaryName?: string;
12149
+ secondaryName?: string;
12150
+ primaryDesignator?: string;
12151
+ secondaryDesignator?: string;
12152
+ primaryCovariance?: StateCovariance;
12153
+ secondaryCovariance?: StateCovariance;
12154
+ });
12155
+ /**
12156
+ * Returns a formatted string representation of the conjunction event.
12157
+ * @returns A multi-line string with conjunction details.
12158
+ */
12159
+ toString(): string;
12160
+ /**
12161
+ * Checks if this is a high-risk conjunction based on miss distance and Pc.
12162
+ * @param distanceThreshold Miss distance threshold in km (default: 1.0 km)
12163
+ * @param pcThreshold Probability of collision threshold (default: 1e-4)
12164
+ * @returns True if the conjunction exceeds risk thresholds.
12165
+ */
12166
+ isHighRisk(distanceThreshold?: Kilometers, pcThreshold?: number): boolean;
12167
+ /**
12168
+ * Gets the Mahalanobis distance if covariance is available.
12169
+ * This is the miss distance normalized by the combined covariance.
12170
+ * @returns The Mahalanobis distance (unitless), or undefined if no covariance.
12171
+ */
12172
+ getMahalanobisDistance(): number | undefined;
12173
+ /**
12174
+ * Extracts the 3x3 position covariance from a 6x6 state covariance matrix.
12175
+ * @param stateCov 6x6 state covariance matrix
12176
+ * @returns 3x3 position covariance matrix
12177
+ */
12178
+ private extractPositionCovariance;
12179
+ }
12180
+
12145
12181
  /**
12146
12182
  * @author Theodore Kruczek
12147
12183
  * @license AGPL-3.0-or-later
@@ -12292,113 +12328,6 @@ declare class ConjunctionAssessment {
12292
12328
  private build6x6Transform;
12293
12329
  }
12294
12330
 
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
12331
  /**
12403
12332
  * @author Theodore Kruczek
12404
12333
  * @license AGPL-3.0-or-later