Coder Social home page Coder Social logo

gpspanel's Introduction

GPS Panel

GPS Panel is a simple web application to present information from your GPS. It depends on gpsd daemon, which reads raw data from your GPS device.

Installation

GPS Panel is based on Python Flask micro-framework. It has a built-in webserver and by default listens on port 8625. Install the pre-requisites:

$sudo pip3 install -r requirements.txt 

Copy the gpspanel folder to DIRECTORY (eg. /var/www/)

Usage

The GPS Panel can be run as a standalone server. It can be started manually by invoking python:

$ python3 DIRECTORY/gpspanel/gpspanel.py

Then using your favorite web browser, go to http://your_ip_address:8625

Auto Start

To enable the GPS Panel to automatically start after a system reboot, a systemd service file is provided for your convenience:

[Unit]
Description=GPS Panel
After=multi-user.target

[Service]
Type=idle
User=nobody
ExecStart=/usr/bin/python3 DIRECTORY/gpspanel/gpspanel.py
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

The above service files assumes you copied the gpspanel directory to DIRECTORY - replace DIRECTORY with real path to gpspanel on your system.

Copy the gpspanel.service file to /etc/systemd/system:

sudo cp gpspanel.service /etc/systemd/system/
sudo chmod 644 /etc/systemd/system/gpspanel.service

Now configure systemd to load the service file during boot:

sudo systemctl daemon-reload
sudo systemctl enable gpspanel.service
sudo systenctl start gpspanel.service

After startup, check the status of the GPS Panel service:

sudo systemctl status gpspanel.service

If all appears OK, you can start using GPS Panel using any browser.

Testing

To test GPS Panel while you don't have your GPS connected you can use gps_test.log. Just run gpsfake in your terminal to emulate gpsd service:

gpsfake -c 1 gps_test.log

gpspanel's People

Contributors

rkaczorek avatar pkockritz avatar

Stargazers

 avatar  avatar  avatar Insane_Engenner avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar

gpspanel's Issues

Add a default empty image for GPS signal chart

Hi,

I am using gpspanel in astroberry.io, and when there is some issue when loading GPS data, the panel shows a broken image on the signal panel.

I suggest adding an empty transparent image, by substituting this code

<img id="sschart" src=""/>

And using this new code:

         <img id="sschart" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="/>

socket.io Bad Request

Hello,

I'm trying to use gpspanel in a personal project to monitor GPS status. Im using Raspberry Pi OS (32 bits) on a Raspberry Pi 4.

After installing requirements I tested as is suggested. I ran the following commands (in different shells).

  • gpsfake -c 1 gps_test.log
  • python3 DIRECTORY/gpspanel/gpspanel.py

In last console I get the following message
$ python3 gpspanel.py The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO)

When I open the web I get the following errors in console (both in Chrome 103.0.5060.114-64 bits and Firefox 104.0-64-bit over ubuntu 20)
socket.io.min.js:1 GET http://allsky.local:8625/socket.io/?EIO=3&transport=polling&t=OBgF61P 400 (BAD REQUEST)
image

I will appreciate some idea to solve it.

Best regards,

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.