GithubHelp home page GithubHelp logo

00mjk / 1090webclient Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slord6/1090webclient

1.0 0.0 0.0 15 KB

A web client for dump1090

License: Other

HTML 9.48% JavaScript 85.78% CSS 4.74%

1090webclient's Introduction

1090WebClient

A light-weight web client for plane spotting using dump1090.

Install

  1. git clone https://github.com/Slord6/1090webclient.git
  2. Update the url variable in getNewData in map.js to point at your data source
  3. Either Just open index.html or host with you favourite web server - if you don't have one, I'm using Fenix.

What is this?

Super, super simple (plain js/css/html) dump1090 web client using Leaflet for maps.

Currently set up to use Open Street Maps for map tiles but any leaflet-supported map tile service should work (see the list of tile servers).

Note: This is not 'production-ready' code - it works, but it's also, for example, consuming the server's data as HTML in places - don't just throw this on the internet if you don't know what you're doing.

How to use

Once you're serving the website, just navigate to it in a web browser (only tested in Chrome, so that's your best bet) and then wait for planes to appear.

Hover over a plane on the map for more info.

Screenshot

Sample screenshot

FAQ

Cross-Origin Errors

Depending on the version of dump1090 you have and your setup, there might be a slight modification you need to make in order not to get cross-origin errors.

I've tried to write the following instructions so someone who's never written code in their life can fix it, but if you have problems feel free to open an issue and I'll try and help you out.

The following instructions assume:

  • You have git cloned the dump1090 repository as the instructions there explain
  • You are running a linux system (in my case raspbian). However, the instructions should be fairly similar for other setups.
  • You are ssh-ing into the system or only have a command line (if not and you have a GUI, then you can open the file with any text editor and start at #3)
  1. Navigate to the cloned directory on the command line
  2. Open the net_io.c file - nano ./net_io.c
  3. Now we need to edit the headers sent in the HTTP responses
    • Find the function with the name handleHTTPRequest and the section commented // Create the header and send the reply (In nano you can search with Ctrl-W)
    • After "Content-Length: %d\r\n" add "Access-Control-Allow-Origin: *\r\n" on a new line
    • Save the file (in nano this is Ctrl-X and then Y to save)
  4. Run make in the same directory to rebuild dump1090
  5. Run ./dump1090 --net --interactive and open or refresh the client - the issue should be resolved (if not, open an issue)

No planes

If you don't see any planes, check the console to see if your problem reveals itself there. If not, open an issue.

Change default location

Edit the lat/lon + zoom values passed to setView on the first line of map.js

Change data fetch frequency

You want the dataFetchBreakTime variable

Licence

See separate file (but its MIT)

1090webclient's People

Stargazers

 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.