GithubHelp home page GithubHelp logo

atellier2 / ephemeris Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marscaper/ephemeris

0.0 1.0 0.0 295 KB

Simple C++ library allowing to compute planet coordinates (equatorial and horizontal) with an Arduino Mega.

C++ 100.00%

ephemeris's Introduction

Ephemeris

Alt text

Synopsis

Simple C++ library allowing to compute planet coordinates (equatorial and horizontal) with an Arduino Mega. The code is also compatible with PC.

Alt text

Features

  • Compute equatorial coordinates (RA/Dec), horizontal coordinates (Alt/Az), rise, set, distance (in A.U), and apparent diameter (in arcminutes) for Sun, Mercury, Venus, Earth's Moon, Mars, Jupiter, Saturn, Uranus, Neptune.
  • Uses VSOP87 for planets.
  • Uses ELP2000 for the Moon.
  • Code optimized for single-precision calculations with Arduino.

Goodies

  • Transformations from equatorial coordinates (RA/Dec) to horizontal coordinates (Alt/Az).
  • Transformations from horizontal coordinates (Alt/Az) to equatorial coordinates (RA/Dec).
  • Rise and set for custom equatorial coordinates.
  • Time zone conversion.
  • Conversion from equatorial coordinates for a specified equinox (Ex:J2000) to apparent equatorial coordinates (JNow).

Limitations

Due to VSOP87 and ELP2000 implementation, code needs too much flash memory for classic Arduinos (Uno, etc).

Code Example

// Set location on earth for horizontal coordinates transformations (Lat:48°50'11", Lon:-2°20'14")

Ephemeris::setLocationOnEarth(48,50,11, -2,20,14);

// Choose a date and time

int day=10,month=4,year=2014,hour=19,minute=21,second=0;

// Compute coordinates for the planet you want

SolarSystemObject planet = Ephemeris::solarSystemObjectAtDateAndTime(Mars, day, month, year, hour, minute, second);

See examples directory for full sample code.

Alt text

Motivation

This library is part of a personnal project to improve my EM10 Takahashi mount thanks to Arduino.

Contributors

Code based on Jean Meeus book.

License

Copyright (c) 2017 by Sebastien MARCHAND Web:www.marscaper.com - Email:[email protected]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

ephemeris's People

Contributors

marscaper avatar per1234 avatar

Watchers

James Cloos 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.