Module Reference

GPS Module

Real-time location, speed, and heading data recording with offline map display support.

Raspberry Pi Only

This module is designed for Raspberry Pi with the BerryGPS or BerryGPS-IMU from Ozzmaker. Other GPS receivers may work but are not officially supported.

The GPS module records location, speed, and heading data from a BerryGPS receiver during experiment sessions. It provides real-time position tracking and can display your route on an offline map.

Getting Started

  1. Connect your GPS receiverUART or USB-serial
  2. Ensure GPS has clear sky viewFor satellite lock
  3. Enable the GPS moduleFrom the Modules menu
  4. Wait for device detection and satellite fix
  5. Start a sessionTo begin recording

User Interface

Map Display

Shows current position on an offline map:

  • Blue dot indicates current location
  • Trail shows recent path
  • Map tiles are cached for offline use

Telemetry Panel

Real-time GPS data:

FieldDescription
Latitude/LongitudeCurrent coordinates in decimal degrees
SpeedCurrent velocity (km/h or mph)
HeadingDirection of travel (0-360 degrees)
AltitudeHeight above sea level (meters)
SatellitesNumber of satellites in view
Fix QualityGPS fix status (No Fix, 2D, 3D, DGPS)

Recording Sessions

Starting Recording

When you start a recording session:

  • GPS data logging begins immediately
  • Position updates recorded at receiver rate (typically 1-10 Hz)
  • Status shows connection and fix quality

During Recording

Each data point captures:

  • Timestamp (UTC from GPS satellites)
  • Latitude and longitude
  • Speed and heading
  • Altitude and fix quality
  • Number of satellites and accuracy metrics

Data Output

File Location

{session_dir}/GPS/

Files Generated

FileDescription
{timestamp}_GPS_trial{NNN}.csvParsed GPS data with raw NMEA sentences

Raw NMEA sentences are preserved in the raw_sentence column of the CSV.

Example: 20251208_143022_GPS_trial001.csv

GPS CSV Columns (25 fields)

ColumnDescription
trialTrial number (integer, 1-based)
moduleAlways “GPS”
device_idDevice identifier string
labelUser-assigned device label
record_time_unixHost Unix timestamp (seconds, 6 decimals)
record_time_monoHost monotonic time (seconds, 9 decimals)
device_time_unixGPS device time (Unix seconds)
latitude_degLatitude (decimal degrees, + = North)
longitude_degLongitude (decimal degrees, + = East)
altitude_mAltitude above mean sea level (meters)
speed_mpsSpeed over ground (meters per second)
speed_kmhSpeed over ground (km/h)
speed_knotsSpeed over ground (knots)
speed_mphSpeed over ground (mph)
course_degCourse over ground (degrees 0-360)
fix_qualityFix type (0=None, 1=GPS, 2=DGPS, etc.)
fix_modeFix mode (1=None, 2=2D, 3=3D)
fix_validWhether fix is valid (boolean)
satellites_in_useSatellites in position solution
satellites_in_viewTotal satellites visible
hdopHorizontal dilution of precision
pdopPosition dilution of precision
vdopVertical dilution of precision
sentence_typeNMEA sentence type (e.g., RMC, GGA)
raw_sentenceOriginal NMEA sentence

Example row:

1,GPS,berrygps_serial0,GPS_Label,1733665822.500000,12345.678901234,1733665822.450000,-37.8136,144.9631,42.5,12.97,46.9,25.3,29.1,185.2,1,3,true,8,12,1.2,2.1,1.8,RMC,"$GPRMC,143022.50,A,3748.816,S,14457.786,E,25.3,185.2,081224,,,A*7C"

Timing and Synchronization

Timestamp Types

TimestampSourceUse Case
record_time_unixHost wall clockCross-system time reference
record_time_monoHost monotonic clockCross-module synchronization
device_time_unixGPS satellitesMost accurate absolute time (atomic clock derived)

Cross-Module Synchronization

Use record_time_mono to correlate GPS with other modules:

  • Camera record_time_mono
  • Audio record_time_mono
  • Use record_time_unix for absolute time reference

DOP Values (Dilution of Precision)

DOPQualityPosition Accuracy
< 1.0IdealSub-meter
1-2Excellent~1-2 meters
2-5Good~5-10 meters
5-10Moderate~50 meters
> 10PoorConsider waiting for better fix

GPS Fix Quality

Fix TypeSatellitesDescription
No Fix< 3Insufficient satellites visible
2D Fix3Position available (lat/lon) but no altitude
3D Fix4+Full position including altitude
DGPS4+Differential correction applied (sub-meter accuracy)

Configuration

SettingDefaultNotes
Serial Port/dev/serial0Raspberry Pi hardware UART
Baud Rate9600BerryGPS default; do not change unless you’ve reconfigured the GPS
Update Rate1 HzBerryGPS default; can be configured up to 10 Hz

Offline Maps

The module uses pre-downloaded map tiles for offline display.

Download tiles for your area:

python -m rslogger.modules.GPS.download_offline_tiles

Tile storage location:

~/.cache/rslogger/map_tiles/

Hardware Setup

BerryGPS from Ozzmaker

This module is designed for use with the BerryGPS or BerryGPS-IMU connected to your Raspberry Pi’s UART header. See the Ozzmaker Quick Start Guide for hardware installation.

Serial Port

The BerryGPS connects via the Raspberry Pi’s hardware UART at /dev/serial0 (default baud rate: 9600).

Raspberry Pi UART Setup

Enable the serial port for GPS communication:

  1. Enable serial port in raspi-config:
    • Interfacing Options > Serial
    • Login shell: No
    • Serial port: Yes
  2. Reboot
  3. Verify /dev/serial0 points to the hardware UART
Pi 5 Only

Add dtparam=uart0_console to /boot/firmware/config.txt

Verifying GPS Connection

Test with a terminal program before launching:

  • You should see NMEA sentences like $GPRMC, $GPGGA, etc.
  • Data arrives at the configured baud rate (typically 9600)

Troubleshooting

Device not detected
  1. Check UART/serial or USB-serial connection
  2. Verify correct serial port in config
  3. Check baud rate matches GPS receiver (typically 9600)
  4. Test serial connection with a terminal program (e.g., PuTTY, screen, minicom)
No GPS fix
  1. Move to area with clear sky view
  2. Wait 1-2 minutes for cold start acquisition
  3. Check antenna connection if using external antenna
  4. Verify GPS receiver LED indicates searching
Inaccurate position
  1. Check number of satellites (need 4+ for 3D fix)
  2. Move away from buildings/obstructions
  3. Use external antenna for better reception
  4. Wait for DGPS correction if available
Map not displaying
  1. Download offline tiles for your area
  2. Check internet connection for initial download
  3. Verify tile cache directory exists
  4. Check available disk space