Code Monkey home page Code Monkey logo

sgp4go's Introduction

SGP4 C transpiled to Go

Warning: This code is experimental; please see the LICENSE.

An SGP4 implementation based on github.com/aholinch/sgp4/tree/master/src/c, which ultimately originated with David Vallado.

    This file contains the sgp4 procedures for analytical propagation
    of a satellite. the code was originally released in the 1980 and
    1986 spacetrack papers. a detailed discussion of the theory and
    history may be found in the 2006 aiaa paper by vallado, crawford,
    hujsak, and kelso.

                           companion code for
              fundamentals of astrodynamics and applications
                                   2013
                             by david vallado
     (w) 719-573-2600, email [email protected], [email protected]

This implementation is a hand-edited transpilation of C sources to Go by c2go (version v0.25.9 Dubnium 2018-12-30), and the emitted code was edited by hand. The original C implementation test suite was included in this process.

The substantive edits (of Go sources emitted by the transpiler) were the use of 64-bit integers to address at least one 32-bit overflow and using floating point constants instead of naked integer constants when the entire expression consisted of the latter with some division. Example: var x2o3 float64 = 2 / 3 was edited to be var x2o3 float64 = 2.0 / 3.0.

With those changes, the original (transpiled and hand-edited) tests almost all pass. The one exception is for NORAD ID 20413 at mins=1844335, where 1e-07 < rdist < 1e-06. The tests have been edited to tolerate rdist < 1e-06 rather than demand rdist < 1e-07.

Usage

The main constructor is NewTLE(), and the primary method is Prop(). See ExampleProp() in surface_test.go.

See the documentation for details.

The example command-line program sgp4go reads TLEs from stdin and writes propagation data to stdout. See test.sh for an example invocation.

Some sgp4go executables are available here.

References

  1. SGP4 in AIAA-2006-6753-Rev2.

  2. Fundamentals of Astrodynamics and Applications (also at Amazon).

  3. space-trace.org's SGP4 binaries and example code.

  4. C source code for this implementation.

sgp4go's People

Contributors

jsmorph avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.