Pious Squid
Orbital mechanics and satellite mission analysis library, for NodeJS and the browser.
Features
-
Coordinate Frames
- Classical Orbit Elements
- Earth Centered Earth Fixed (ITRF)
- Geodetic
- J2000
- Look Angles
- True Equator Mean Equinox (TEME)
- Relative Motion (RIC)
-
Ephemeris Propagators
- 4th Order Runge-Kutta (numerical)
- Keplerian (analytic)
- Interpolator
-
Celestial Bodies
- Earth Atmospheric Density
- Earth Precession / Nutation
- Moon Position
- Solar Eclipse
- Sun Position
-
Epoch
- Barycentric Dynamical Time (TDB)
- Greenwich Mean Sidereal Time
- International Atomic Time (TAI)
- Julian Centuries
- Julian Date
- Leap Seconds
- Terrestrial Time (TT)
- UTC/UT1 Time
-
Force Model
- Atmospheric Drag
- Earth Geopotential (70x70)
- Moon Gravity
- Solar Radiation Pressure
- Sun Gravity
-
Operations
- Satellite Maneuvers
- Monte-Carlo Simulation
- Conjunction Assesment
Install
To include pious-squid
in your NodeJS project:
npm install pious-squid --save
The browser library bundles (pious-squid.js
or pious-squid.min.js
) can be
found under, the
Releases
tab on GitHub.
Example
To propagate a satellite from its position and velocity vectors:
; // =============================================================================// set initial state in J2000 frame// ============================================================================= const initialState = EpochUTC // epoch (UTC) -1117913276 73093299 -7000018272 // km 3531365461 6583914964 -0495649656 // km/s; console;// => [J2000]// Epoch: 2018-12-21T00:00:00.000Z// Position: [ -1117.913276000, 73.093299000, -7000.018272000 ] km// Velocity: [ 3.531365461, 6.583914964, -0.495649656 ] km/s // =============================================================================// create a propagator object// ============================================================================= const propagator = initialState; // set the step sizepropagator; // seconds // add Earth gravity accelerationpropagatorforceModel; // add third-body accelerationpropagatorforceModel; // =============================================================================// propagate ephemeris to a future time// ============================================================================= const finalState = propagator; console;// => [J2000]// Epoch: 2018-12-22T00:00:00.000Z// Position: [ -212.111629987, -2464.336270508, 6625.907441304 ] km// Velocity: [ -3.618621245, -6.126790740, -2.389539402 ] km/s // =============================================================================// display information about the propagated state// ============================================================================= // Earth-fixed coordinatesconsole;// => [ITRF]// Epoch: 2018-12-22T00:00:00.000Z// Position: [ -2463.105532067, 235.348124556, 6625.580458844 ] km// Velocity: [ -6.093169860, 3.821763334, -2.395927109 ] km/s // geodetic coordinatesconsole;// => [Geodetic]// Latitude: 69.635°// Longitude: 174.542°// Altitude: 713.165 km // look angle from ground observerconst observer = 71218 * MathPI / 180 // latitude (radians) 180508 * MathPI / 180 // longitude (radians) 0325 // altitude (km);console;// => [Look-Angle]// Azimuth: 234.477°// Elevation: 65.882°// Range: 773.318 km // relative positionconst actualState = EpochUTC -212125533 -2464351601 6625907454 -3618617698 -612677853 -238955619;console;// => [RIC]// Epoch: 2018-12-22T00:00:00.000Z// Position: [ -0.005770585, -0.019208198, 0.005105235 ] km// Velocity: [ 0.000020089, 0.000006319, 0.000000117 ] km/s
Additional examples can be found in the examples directory in the project source directory.
License
The MIT License (MIT)
Copyright © 2018 David RC Dayton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.