Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Realtime Satellite Tracking in the Browser (JSConf 2014)

Realtime Satellite Tracking in the Browser (JSConf 2014)

In 1980 the United States Department of Defense (DoD) released the equations and source code used to predict the positions of satellites around the Earth. These simplified perturbations models (SGP4) were originally written in FORTRAN IV and have since been ported to C++, Java, MATLAB, and Pascal. And now, with a JavaScript port, it’s time to bring satellite tracking to the browser!

In this talk we’ll learn how to use existing tools to calculate and plot realtime satellite positions on a map using Leaflet.js and satellite.js. Along the way we’ll sneak in some orbital mechanics concepts, minus a lot of the hardcore math.

Perturbations, polar orbits, orbital eccentricity, Kepler’s laws, orbital propagation, oh my!

We will also learn about the pitfalls of 2D map projections, and why a 3D projection is more accurate and intuitive. If there’s time, we’ll go one step further and build a 3D satellite tracker using WebGL.

David Calhoun

June 02, 2014
Tweet

Other Decks in Programming

Transcript

  1. 1 Skybox Imaging, Inc. Proprietary and Confidential Pulse  of  the

     Planet,  Delivered  Daily ! Real&me  Satellite  Tracking     in  the  Browser   ! David  Calhoun,  Skybox  Imaging   hAp://bit.ly/jsconf-­‐satellites   Your  World  on  Demand 2014 © Skybox Imaging, Inc.
  2. Skybox Imaging Proprietary & Confidential Skybox  by  the  numbers 4

      2009   2010   2011 2012 $91M   Raised  from  Khosla  Ventures,   Bessemer  Ventures,  Canaan   Ventures  and  Norwest  Venture   Partners 25   53 84 24   #  Satellites  in  planned  constella&on 6   Months  since  the  launch     of  SkySat-­‐1 2009     Incorpora&on 100+   Number  of  space  missions   supported  by  the  team #  Skybox  Team 2013 91 Today   125 Q2  2014   SkySat-­‐2  Launch  
  3. As  a  UI  engineer… • telemetry  dashboard:  WebSocket-­‐powered,  lives  in

     MOC   • “Search”:  map-­‐based  satellite  image/video  catalog   • “Schedule”:  map-­‐based  image  scheduling  UI   • “Process”:  dashboard  for  managing  image  processing   workflow
  4. Wait,  we  need…   ! Math.   ! Astrophysics.  

    ! More  math  (for  good  measure).
  5. SkySat-­‐1  TLE SKYSAT-1 1 39418U 13066C 14148.17702979 .00002107 00000-0 19287-3

    0 5740 2 39418 97.7889 224.9006 0024641 64.3193 296.0575 14.95823977 28066 Eccentricity Inclina&on Longitude  of  the  ascending  node Mean  anomaly  at  epoch TLE  updated  daily  on  Celestrak:  hAp://www.celestrak.com/NORAD/elements/resource.txt   TLE  explorer:  hAp://davidbcalhoun.com/a/tle-­‐explorer/
  6. SGP4  in  JS:  iSat •hAps://github.com/koansys/isat   •powers  NASA  iSat  interac&ve

      satellite  viewer   •many  tests   •higher  accuracy  floa&ng  point   calcula&ons?   •not  in  ac&ve  development   •not  a  standalone  SGP4  library
  7. SGP4  in  JS:  satellite.js •hAps://github.com/shashwatak/satellite-­‐js   •s&ll  in  ac&ve  development

      •API  with  examples  (not  perfect,  but  usable)   •SGP4  only  (no  graphical  component)
  8. Ques&ons? • slides  &  learning  materials:  bit.ly/jsconf-­‐satellites   •  

               @franksvalli   • [email protected]   • linkedin.com/in/davidcalhoun/
  9. Sources Sputnik  Audio  (Roy  Welsh,  Dallas  Texas):  hAp:// www.astrosurf.com/luxorion/audiofiles-­‐astronau&c.htm  

    Stars:  hAps://www.flickr.com/photos/scoA-­‐s_photos/ 11763686274   Sputnik  images:  hAp://history.nasa.gov/sputnik/ gallerysput.html,  hAp://commons.wikimedia.org/wiki/ File:Sputnik_asm.jpg   Sputnik  ground  track:  Sputnik:  The  Shock  of  the  Century   SkySat-­‐1  Dnepr  launch  video:  hAp://www.youtube.com/ watch?v=RMi0DbQGfxs
  10. Epicycles  image:  Encyclopaedia  BriAanica  1st  Edi&on  via   Wikipedia  

    2-­‐body  problem  hAp://en.wikipedia.org/wiki/ File:Ellip&c_orbit.gif   Perturba&ons:  hAp://www.navipedia.net/index.php/ Perturbed_Mo&on   ! ! ! ! ! ! ! ! ! Sources  2