Code Monkey home page Code Monkey logo

eclipse-simulator's Introduction

eclipse-simulator

Eclipse simulator is a command-line tool for producing animations of solar eclipses. It was written to produce all of the diagrams, KML path files, and video animations that appear on https://in-the-sky.org/. An example of the kinds of media it produces can be seen on this page: https://in-the-sky.org/news.php?id=20201214_09_100

The simulations are based on the DE430 planetary ephemeris computed by the Jet Propulsion Laboratory (JPL). The position of the Sun, Earth and Moon are extracted from the DE430 files using EphemerisCompute (https://github.com/dcf21/ephemeris-compute-de430), written by the author and also freely available for download.

They assume that the Earth and Moon are both ellipsoids with fixed polar and equatorial radii, and do not take into account the irregular topography of either body. All eclipse predictions are made at sea level. In practice, this means that the predictions presented here are inaccurate by at most of few seconds.

Supported operating systems

eclipse-simulator is written in C and runs in Linux, MacOS, and other Unix-like operating systems. A front-end user interface is written in python3. The simulator does not run under Windows.

License

This code is distributed under the Gnu General Public License. It is (C) Dominic Ford 2012 - 2020.

Set up

Before you start, the simulator needs to download various data from the internet, including the tool ephemerisCompute from the author's GitHub repository, and the DE430 ephemeris files.

This can be done with the Python script solarEclipses.py. The total download size will be around 500 MB. These files are only downloaded the first time this script is run.

The script will then proceed to run some demo simulations; by default it simulates the eclipses of 2020 and 2021. Each simulation takes around 45 minutes on a single core of a modern computer (e.g. Intel i7 8700), or around 120 minutes on a machine dating from around 2010. If your computer has multiple cores, multiple simulations will run on parallel on the various cores.

Simulating particular eclipses

eclipse-simulator may be used to simulate any solar eclipse within the time span of the DE430 planetary ephemeris - i.e. 1600 to 2200 AD. To simulate a particular eclipse, pass the command-line switches --year-min and --year-max to the Python script solarEclipses.py. For example:

./solarEclipses.py --year-min 2025 --year-max 2030

Author

This code was developed by Dominic Ford https://dcford.org.uk. It is distributed under the Gnu General Public License V3.

eclipse-simulator's People

Contributors

dcf21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ubutnux stephent

eclipse-simulator's Issues

Program to be optimized

mmexport1638106839419
There are two problems with the software:
1.De430 Failed to download .Please learn from the reprint I sent you for optimization (End of text )
2.There is a problem with the compiler. Compilation always fails. What version is the author using? The required dependencies are not indicated and are one of the reasons why the software does not work.

Looking forward to your reply, thank you!

Forward :

I just tested and was able to perform a successful download with both Skyfield and also the manual command:

curl ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp/de421.bsp | wc
But you bring up a good question: what if they were to disable the service someday? I'll go see if there's a mailing list I can join so I'd be warned ahead of time!

Meanwhile, you'll probably want to check other possible sources of connectivity problems between you and the JPL servers. Let me know if you find a root cause, in case any other users are affected. I'll close the issue since it's not a Skyfield problem, but I welcome further comments on the closed issue. Thanks!

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.