All Projects → wdalmut → Libgps

wdalmut / Libgps

Licence: mit
UART NMEA GPS library for Raspberry Pi

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Libgps

Photobooth
A photobooth Web-Application for raspberry pi with gphoto2
Stars: ✭ 188 (+213.33%)
Mutual labels:  raspberry-pi, raspberry
Kupiki Hotspot Script
Create automatically a full Wifi Hotspot on Raspberry Pi including a Captive Portal
Stars: ✭ 265 (+341.67%)
Mutual labels:  raspberry-pi, raspberry
Rpicheck
RasPi Check - an Android app for checking your Raspberry Pi status.
Stars: ✭ 227 (+278.33%)
Mutual labels:  raspberry-pi, raspberry
Fabscanpi Server
FabScan Pi Open Source 3D Scanner - Server application
Stars: ✭ 137 (+128.33%)
Mutual labels:  raspberry-pi, raspberry
Balena Electronjs
electronJS-based resin application template
Stars: ✭ 348 (+480%)
Mutual labels:  raspberry-pi, raspberry
Rpi wordclock
Software to create a Raspberry Pi based wordclock
Stars: ✭ 164 (+173.33%)
Mutual labels:  raspberry-pi, raspberry
Python-NEO-6M-GPS-Raspberry-Pi
Python script for the NEO-6M GPS module on the Raspberry Pi
Stars: ✭ 41 (-31.67%)
Mutual labels:  gps, raspberry
Gumcp
Web Control Panel for Raspberry Pi
Stars: ✭ 124 (+106.67%)
Mutual labels:  raspberry-pi, raspberry
Rust Raspberrypi Os Tutorials
📚 Learn to write an embedded OS in Rust 🦀
Stars: ✭ 7,275 (+12025%)
Mutual labels:  raspberry-pi, raspberry
Meta Raspberrypi
Yocto BSP layer for the Raspberry Pi boards
Stars: ✭ 276 (+360%)
Mutual labels:  raspberry-pi, raspberry
Raspberrypi tempmon
Raspberry pi CPU temperature monitor with many functions such as logging, GPIO output, graphing, email, alarm, notifications and stress testing. Python 3.
Stars: ✭ 52 (-13.33%)
Mutual labels:  raspberry-pi, raspberry
Raspberryio
The Raspberry Pi's IO Functionality in an easy-to-use API for Mono/.NET/C#
Stars: ✭ 593 (+888.33%)
Mutual labels:  raspberry-pi, raspberry
Umbrel Os
Run Umbrel Bitcoin and Lightning node on a Raspberry Pi in one click
Stars: ✭ 132 (+120%)
Mutual labels:  raspberry-pi, raspberry
Debian Pi Aarch64
This is the first 64-bit system in the world to support all Raspberry Pi 64-bit hardware!!! (Include: PI400,4B,3B+,3B,3A+,Zero2W)
Stars: ✭ 2,505 (+4075%)
Mutual labels:  raspberry-pi, raspberry
Teslalogger
Stars: ✭ 131 (+118.33%)
Mutual labels:  raspberry-pi, raspberry
Berrylan
Raspberry Pi WiFi setup
Stars: ✭ 243 (+305%)
Mutual labels:  raspberry-pi, raspberry
Qtrpi
An easy-to-use environment to cross-compile Qt applications for Raspberry Pi from your desktop.
Stars: ✭ 93 (+55%)
Mutual labels:  raspberry-pi, raspberry
Pi Hole Droid
Pi-hole Droid is an unofficial app that connects to your Pi-hole to show charts and statistics.
Stars: ✭ 107 (+78.33%)
Mutual labels:  raspberry-pi, raspberry
Raspibackup
Backup and restore your running Raspberry
Stars: ✭ 268 (+346.67%)
Mutual labels:  raspberry-pi, raspberry
Pinn
An enhanced Operating System installer for the Raspberry Pi
Stars: ✭ 530 (+783.33%)
Mutual labels:  raspberry-pi, raspberry

GPS library

The GPS library

Build it

In order to obtain libgps.a

$ make
$ sudo make install

Use it

This project is mainly created for Raspberry ARM boards. After you have compiled the source code on the target or cross-compiling you can include it in your application

#include <gps.h>

The library mainly exposes few methods

  • gps_init - Initialize the communication
  • gps_on - Activate the GPS device
  • gps_location - Expose data from GPS (latitude, longitude, speed, course, altitude)
  • gps_off - Turn off the GPS device

This project abstracts all datas and replies in:

  • Decimal Degrees for latitudes and logitudes (46.235325, 7.12521)
    • Not degrees (42° 53' 23.25'' North - 4° 22' 46.3'' West)
  • Knots for speeds
  • Degrees for angles (course)
  • Meters for altitude

Example - Position logging

Create a simple position_logger.c file (you can find all in the examples folder)

#include <stdio.h>
#include <stdlib.h>
#include <gps.h>

int main(void) {
    // Open
    gps_init();

    loc_t data;

    while (1) {
        gps_location(&data);

        printf("%lf %lf\n", data.latitude, data.longitude);
    }

    return EXIT_SUCCESS;
}

Compile it

$ gcc -o position_logger position_logger.c -lgps -lm

Run it

$ ./position_logger

You will see your data directly in console:

45.071060 7.646363
45.071082 7.646385
45.071078 7.646387
45.071060 7.646373
45.071048 7.646358
45.071052 7.646372
45.071057 7.646392
45.071062 7.646397
45.071062 7.646383
45.071073 7.646395
45.071082 7.646403
45.071082 7.646403
45.071080 7.646395
45.071083 7.646392
45.071088 7.646393

You can rotate the output to files

$ ./position_logger >> position.log

That's all...

Tested components

This library is tested with:

  • Adafruit Ultimate GPS Breakout - 66 channel w/10 Hz updates - Version 3
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].