python GPS – NMEA sentence Parser

from datetime import datetime
import sqlite3
import time
import requests

class db_create():
    def __init__(self,lon,lat,speed):
    def __str__(self):
        return(" Lon={}\n Lat={}\n Speed={}".format(self.lon,,self.speed))
class decode():
    def __init__(self,serial_data):


    def to_decaminal(self):[0:2])+(float(self.raw_lat[2:4])/60)+(float(self.raw_lat[5:7])/3600)
        self.speed=float(self.speed_knot)*1.85200 #knots to kmh
gprmc="$GNRMC,091805.00,A,3953.300557,N,03252.202539,E,0.102,,200619,,,A*6"#exapmle data string of telnet

if (gprmc[0:6] == "$GNRMC"):
    if (parsed_data[2]=="A"):
        print("gps error")

It is an example for parsing nmea sentes with python and it creates the db , you need to create serial connection to use with gps receiver.

#gprmc string is example of serial data stream you need to create serial connection to use # here, you can find more information about gps nema sentences

RPI CAM #Closed

Due to Heating issues I have closed the camera sorry :p (You can see here)

You can see Ankara’s city View with RPI Cam.This camera is connected to Rpi Zero W . Also you can watch daily timelapses (but video qualities are very low due to my upload speed so i use webm format to decrease file size.)

Whole day has nearly 18000 frame(1-2gb in jpeg) but i have used mancoder program to convert jpeg’s to Avi . By doing this ,whole day’s timelapse’s has been decreased to 40 mb but after converting avi to webm this file size is decreased extremely to 6-8 mb .

I’ve used crontab to converting images to videos. crontab works at every 01.01 AM (for ffmpeg and deleting used jpegs)

On rpi zero i used this tool to web gui and after i created a basic curl script to catch images every 5 seconds. (this curl script works in my main dektop also this pc renders the files and hosts the videos)

you can see my basic scripts at bottom

RPI CAM #Closed yazısına devam et