eph_jpl_cr

Crystal port of EphJpl, an ephemeris calculation tool in Ruby by JPL method.

EphJplCr

Crystal port of Ruby library EphJpl, which calculates ephemeris data by JPL(NASA Jet Propulsion Laboratory) method.

See the original libary for more detail.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      eph_jpl_cr:
        github: soya-daizu/eph_jpl_cr
    
  2. Run shards install

Usage

require "eph_jpl_cr"

session = EphJplCr::Session.new(
  bin_path: "/path/to/JPLEPH",
  use_memory_io: true # load all binary data to memory, uses more memory (~400MB) but significantly faster lookup
)
# Target celestial body num, center celestial body num, julian day
session.set_args(11, 3, 2457465.5)
session.calc #=> [x, y, z-position, x, y, z-velocity]

Contributing

  1. Fork it (https://github.com/soya-daizu/eph_jpl_cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

eph_jpl_cr

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • almost 3 years ago
  • October 13, 2021
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 08:02:35 GMT

Languages