GithubHelp home page GithubHelp logo

spacex-telemetry's Introduction

#SpaceX telemetry capturing

An attempt to capture telemetry in realtime from a live video stream

  • uses electron js to be able to do desktop capturing
  • uses a very crude image overlap calculation to recognize characters

It is not much yet, but it does give some results:

example.png

getting it to run

  • clone from github
  • npm install
  • npm start

workings

  • play the spacex video in a frame, with a bit of transforms to get the interesting part up close
  • use electron to capture the window and feed it back into a video element
  • capture that video element to a few canvas elements, slicing out the data bits
  • some thresholding to get the individual characters in greyscale
  • calculate the similarity with predefined characters and get the best
  • use that to guess the character

doing stuff with the data

The capture tries to send data over a local mhub-server. To set one up:

  • (install nodejs)
  • npm install -g mhub
  • mhub-server

This launches an mhub server locally. If you want to see the data coming in, use

  • mhub-client -l -o jsondata

This will give you a stream of data. With that you could

  • pipe it to another utility
  • listen to it with websockets
  • listen to it with raw tcp sockets

mhub-output

Early results

some examples

Pipe it to file:

mhub-client -l -o jsondata > data.txt

Pipe it to mongodb:

mhub-client -l -o jsondata | mongoimport --db spacex --collection telemetry

Listen to the bus in a website:

ws = new WebSocket('ws://localhost:13900');

//subscribe to receive messages
ws.onopen = function() {
    ws.send(JSON.stringify({
        type: 'subscribe',
        node: 'default'
    }));
};

//handle messages received
ws.onmessage = function(msg) {
    console.log(JSON.parse(msg.data));
};

Listen with nodejs:

var MClient = require("mhub").MClient;

var client = new MClient("ws://localhost:13900");

//subscribe to receive messages
client.on("open", function() {
    client.subscribe("default");
});

//handle messages received
client.on("message", function(message) {
    console.log(message);
});

Listen with python:

import websocket
import json

#subscribe to receive messages
def on_open(ws):
    ws.send('{"type":"subscribe","node":"default"}')

#handle messages received
def on_message(ws, message):
    print json.loads(message)


ws = websocket.WebSocketApp("ws://localhost:13900",
                            on_message = on_message,
                            on_open = on_open)

ws.run_forever()

improvements / plans

  • better character segmentation (it is currently not properly segmented when the video resolution is low)
  • better character recognition, we may use a somewhat smarter algorithm, but it needs to be fast.
  • more user friendly ui.

spacex-telemetry's People

Contributors

rikkertkoppes avatar

Stargazers

 avatar Ibrahim Tahir avatar Yea Chen avatar 3Domse3 avatar Livio Avalle avatar Andrew Dassonville avatar  avatar Edward Chan Jia Wei avatar Marcin Kurczalski avatar  avatar Erik Weilow avatar Sam avatar Meliurwen avatar Matthew avatar Alexandre MOTTET avatar Tony Rice avatar Alexandre Nicastro avatar Christopher Erwin avatar Felipe Corrêa da Silva Sanches avatar Brian Konzman, SJ avatar Gio Pagliari avatar Treble Sketch avatar Dieter Devlieghere avatar Dimitar Ralev avatar Andrei Popovici avatar Top_Fuel avatar Cole Reid avatar Yassine avatar Josh Junon avatar asw456 avatar Matt Holt avatar Devon Endicott avatar Ricardo Vieira avatar Roderic Campbell avatar Paweł Sroka avatar Joel Calado avatar

Watchers

Roderic Campbell avatar Felipe Corrêa da Silva Sanches avatar  avatar Sebastien Dejean avatar Andrew Kohlsmith avatar Gio Pagliari avatar Christopher Erwin avatar Top_Fuel avatar Treble Sketch avatar Chris Adams 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.