Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Erling Lindholm
Published © GPL3+

Airplane-Mapping for ANR and Precision Flying

Real-time following of competing airplanes.

IntermediateShowcase (no instructions)20 hours1,143
Airplane-Mapping for ANR and Precision Flying

Things used in this project

Hardware components

Raspberry Pi Zero Wireless
Raspberry Pi Zero Wireless
×1
Huawei E303
Huawei E303
×1
GPS bluetooth puck
×1
Battery/power supply
×1

Software apps and online services

GPS position receiver
Hologram Data Router
Hologram Data Router
QGIS

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Schematic of the parts included

Shows the relation between the parts included in the project

Code

Code for the Rpi Zero W

Python
Formats and transfers data from GPS to Dasboard
#!/usr/bin/env python3
#
#
#
import os
import time
import serial
import re
import Hologram
from Hologram.HologramCloud import HologramCloud
credentials = {'devicekey': 'xyz12345'}

hologram = HologramCloud(credentials, network='cellular')
# cmdres =os.system('gpsctl -n')
global count
def nmea(line):
    global count
    parts = line.split(",")
    if parts[0]=='$GPGGA':
        count = count + 1
        gga(parts)
        if count == 10:
            recv = hologram.sendMessage(line, topics=["MyGps"])
            print(line)
            count = 0



def gga(parts):
    # extract the time
    match = re.match('(\d\d)(\d\d)(\d\d)\.(\d\d\d)',parts[1])
    if match:
        h = match.group(1)
        m = match.group(2)
        s = match.group(3)
        print("Time is %s:%s:%s UTC" % (h,m,s))


ser = serial.Serial('/dev/rfcomm1', timeout=2)
line = ""
count =0
while True:
    ch = ser.read()
    if ch=='\r':
        nmea(line)
        line = ""
        ch = ser.read()   # get the newline
    else:
        line = line + ch

Credits

Erling Lindholm

Erling Lindholm

2 projects • 1 follower
Telecom engineer likes to build new things

Comments