/Graviton

Real-time night sky rendering in Swift 4 with native SceneKit and Metal.

Primary LanguageSwiftGNU General Public License v3.0GPL-3.0

Header image

Graviton 🌌

Language Build Status codebeat badge License: GPL v3

  • Real-time night sky and solar system rendering.
  • Astronomy and celestial mechanics toolkit.
  • Native Apple technologies with Swift 4 and SceneKit.

App

  • Real-time night sky rendering. Fully customizable. Totally hackable.
    • Reading from GPS or inputing custom position to see a night sky in your location.
    • Time warp - see what night sky is like at any time.
  • Real-time high accuracy solar system illustration. In scale.
  • Detailed celestial body information. Rise, transit and set information panel for ☀️, 🌛 and naked-eye planets.

Screenshots

Stellarium Planets Metadata Celestial body
main planets rts celestial-body

Getting Started

Prerequisites

Xcode 9.3 and iOS 11.3 is recommended to run the project.

Note: You need a real device to be able to see the fully rendered effects with Metal.

Installation

This app uses Carthage as its dependency manager. Make sure you have installed it before running the following command.

carthage update --platform ios

That's all you need for bootstrapping! Now you can proceed to open the Xcode project file.

iOS 11.2 Bug

There's an issue that iOS 11.2 breaks SceneKit transparency texture. The appearance of stars will appear like squares instead of round dots. It has been fixed in iOS 11.3.

Features

Active development in progress; features will change without notice.

Stellarium

  1. View the simulated night sky at your local position and local time. Find the constellations and solar system plants.
  2. Time warp to any time in the past and future to view the predicted night sky.
  3. Browse the celestial object catalog, search the desired celestial objects and inspect their physical properties.

Planets

  1. View the real-time solar system.
  2. Goes forward in time to see the motion of heaven.

Information

  1. Astronomic properties including Julian date, LST offset and more.
  2. Rise, transit and set time of the sun, the moon and all planets.

Two websites are planned to be built. One includes all documentation, the other is a shiny front page for maximum appeal.

Frameworks

Orbits

High accuracy ephemeris query and orbital mechanics calculation framework.

  • Calculate Keplarian orbital mechanics with support of all conics.
  • Query and process high accuracy ephemeris from NASA JPL's Horizon interface and automatically cache results using Realm and SQLite.
  • Excellent offline mode. Stock ephemeris from 1500 AD to 3000 AD of major celestial bodies.
  • Support querying rise, transit and set timestamps for major celestial bodies.

Conics model predicts the orbits of the major planets in our solar system pretty accurately. To account for apsidal precession and other orbital perturbations of celestial bodies like Mercury and Earth's moon, Orbits fetches many data points from JPL and cherry-pick the orbital configuration closest to the reference time.

Goals

This is an amateurish project by an amateur astronomer. As a lover of science and space exploration, there are a few long-term goals:

  • A full-fledged open source stellarium software
  • An educational astronomy app with science in mind
  • (?) A space flight simulator that utilizes patched conics approximation.

Copyright

This project is licensed under GPLv3. If you have issues with any assets or resources in Graviton, please don't hesitate to reach out DJBen. No copyright issue is too small.