Skip to content
/ Graviton Public

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

License

Notifications You must be signed in to change notification settings

DJBen/Graviton

Repository files navigation

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.

Getting Started

Prerequisites

Xcode 9.2 is required to compile and run the project.

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.

Important: For best experience, please run with real device, especially so when testing against graphics related features.

iOS 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.

Simulator Limitations

Simulator uses OpenGL rendering while real devices use Metal. Some graphics effect may look broken on simulators.

Documentation

Placeholder

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •