pious_squid 0.2.1 copy "pious_squid: ^0.2.1" to clipboard
pious_squid: ^0.2.1 copied to clipboard

An astrodynamics library for the Dart ecosystem, covering orbital mechanics and satellite mission analysis logic.

pious_squid #

An astrodynamics library for the Dart ecosystem, covering orbital mechanics and satellite mission analysis logic.

Features #

  • Celestial Bodies
    • Earth
    • Moon
    • Sun
  • Coordinates
    • Classical Orbital Elements
    • Equinoctial Elements
    • Geodetic Coordinates
    • Hill Modified Equidistant Cylindrical Frame (EQCM)
    • International Terrestrial Reference Frame (ITRF)
    • J2000 Inertial Frame (J2000)
    • Radial-Intrack-Crosstrack Relative Frame (RIC)
    • True Equator Mean Equinox Inertial Frame (TEME)
    • Two-Line Element Set (TLE)
  • Covariance
    • Cartesian Covariance
    • Classical Element Covariance
    • Equinoctial Element Covariance
    • Relative Covariance
  • Perturbation Forces
    • Atmospheric Drag (Harris-Priester)
    • Earth Gravity (up to 36x36 geopotential)
    • Solar Radiation Pressure
    • Spacecraft Thrust
    • Spherical Body Gravity
    • Third Body Gravity (Sun and Moon)
  • Interpolators
    • Chebyshev Ephemeris Interpolator
    • Cubic-Spline Ephemeris Interpolator
    • Lagrange Ephemeris Interpolator
    • Verlet-Blend Ephemeris Interpolator
  • Maneuvers
    • Relative Waypoint Targeting
    • Two-Burn Transfer (Hohmann)
  • Metric Observations
    • Geocentric Right-Ascension and Declination (RaDec)
    • Optical Observation
    • Radar Observation
    • Range-Azimuth-Elevation (RAzEl)
    • Topocentric Right-Ascension and Declination (RaDec)
  • Math
    • Matrix Operations
    • Quaternion Operations
    • Vector Operations
  • Optimization
    • Chebyshev Ephemeris Compression
    • Downhill Simplex (Nelder-Mead)
    • Golden Section
    • Polynomial Regression (WIP)
    • Simple Linear Regression
  • Orbit Determination
    • Batch Least Squares Orbit Determination (OD)
    • Gibbs Initial Orbit Determination (IOD)
    • Gooding Initial Orbit Determination (IOD)
    • Herrik-Gibbs Initial Orbit Determination (IOD)
    • Lambert Initial Orbit Determination (IOD)
    • Modified Gooding Initial Orbit Determination (IOD)
  • State Propagation
    • Dormand-Prince 5(4) Adaptive Numerical Propagator
    • Kepler Two-Body Analytical Propagator
    • Runge-Kutta 4 - Fixed Numerical Propagator
    • Runge-Kutta 8(9) Adaptive Numerical Propagator
    • Simplified Perturbations Model 4 (SGP4)
  • Data Smoothing
    • Exponential Smoothing (single/double/time)
  • Time
    • Barycentric Dynamical Time (TDB)
    • Global Positioning System Time (GPS)
    • International Atomic Time (TAI)
    • Terrestrial Time (TT)
    • Universal Coordinated Time (UTC)

Usage #

import 'package:pious_squid/pious_squid.dart';

void main() {
  // Create a new J2000 inertial satellite state.
  final startState = J2000(
      EpochUTC.fromDateTimeString('2017-02-03T06:26:37.976Z'),
      Vector3D(-3134.15877, 7478.695162, 1568.694229),
      Vector3D(-5.227261462, -3.7717234, 2.643938099));

  // Define some spacecraft properties.
  final mass = 1400.0; // kilograms
  final area = 16.0; // meters²

  // Create a perturbation force model.
  final forceModel = ForceModel()
    // Model a 36x36 geopotential.
    ..setEarthGravity(36, 36)
    // Model Moon and Sun gravity.
    ..setThirdBodyGravity(moon: true, sun: true)
    // Model solar radiation pressure, with reflectivity coefficient 1.2.
    ..setSolarRadiationPressure(mass, area, coeff: 1.2)
    // Model atmospheric drag, with drag coefficient 2.2.
    ..setAtmosphericDrag(mass, area, coeff: 2.2);

  // Create a Runge-Kutta 8(9) propagator.
  final rk89Prop = RungeKutta89Propagator(startState, forceModel);

  // Propagate the start state to 1 day in the future.
  final oneDay = 86400.0; // seconds
  final finalState = rk89Prop.propagate(startState.epoch.roll(oneDay));

  print(finalState);
  // ->[J2000]
  // Epoch: 2017-02-04T06:26:37.976Z
  // Position: [5704.152590, -5470.867067, -3040.596164] km
  // Velocity: [4.554130436, 4.557924086, -2.152201166] km/s

  // Create a observer location.
  final observer = Geodetic.fromDegrees(-15, 80, 0.05);

  // Calculate look-angles from the observer to the satellite .
  print(finalState.toITRF().toGeodetic());
  final razel = Razel.fromStateVectors(
      finalState, observer.toITRF(finalState.epoch).toJ2000());
  print(razel);
  // => [RazEl]
  // Epoch:     2017-02-04T06:26:37.976Z
  // Azimuth:   141.6525°
  // Elevation: 60.3304°
  // Range:     2318.580 km
}

More examples can be found in the examples directory.

License #

Copyright (c) 2023 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.
4
likes
0
pub points
0%
popularity

Publisher

unverified uploader

An astrodynamics library for the Dart ecosystem, covering orbital mechanics and satellite mission analysis logic.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on pious_squid