Giter VIP home page Giter VIP logo

nasa2014's Introduction

Space Rocks!

Space Rocks!

This is the repository for Space Rocks!, an entry to the Space Apps Challenge 2014. A live version of the project can be seen at http://www.spacerocksgame.org

The code for the game is in ./game_v1/

The code for the API is in ./astro_api/

Description of the API

The Space Rocks! API allows user to query for asteroids in a subset of the JPL Small Bodies Database (SBDB). The asteroids made available through the API are all those that have a known spectral type. In addition to the properties provided by the SBDB, we also add the total value and value per kg calculated by the Asterank library, and the calculated distance and delta-v from Earth on a given day.

The distance calculation is provided in ./astro_api/orbitcalc.py. You can run the API locally by installing Flask (pip install flask) and running

python app.py

The endpoint of the API is http://server.spacerocksgame.org/get_asteroids_by_type and takes the following query parameters:

  • limit: The number of asteroids to return
  • day: The offset, relative to the current day, to calculate the distance and delta-v to Earth
  • min_dist: A minimum distance to Earth cut (AU)
  • max_dist: A maximum distance to Earth cut (AU)
  • none: Fraction of asteroids to return which have no valuable resources
  • water: Fraction of asteroids to return which have water
  • metals: Fraction of asteroids to return which have metals
  • hydrogen: Fraction of asteroids to return which have hydrogen
  • platinum: Fraction of asteroids to return which have platinum

An example query: http://server.spacerocksgame.org/get_asteroids_by_type?limit=10&day=0&min_dist=0.5&max_dist=3.0&none=0.09&water=0.3&metals=0.3&hydrogen=0.3&platinum=0.01

Forking

This code is available under the GPL. If you'd like to use this code, or build a different version of the game using the codebase, please do!

Libraries

API

The asteroid API has the following dependencies:

Game

The game would not have been possible in a weekend without some amazing javascript libraries:

Thanks

Thanks to our significant others for giving up weekends to drawid space ships, to NY Space Apps for hosting, to Jason Kessler and Rob Landis for asteroid advice, and to NASA for being wonderful enough to go chasing after asteroids in the first place.

nasa2014's People

Contributors

jdallen83 avatar jonroberts avatar mattl920 avatar

Watchers

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