Project

General

Profile

Actions

Feature #5346

open

GPSManager: Enable NFD to obtain GPS-based position from local gpsd

Added by Tianxing Ma 7 days ago. Updated 6 days ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
02/06/2025
Due date:
% Done:

0%

Estimated time:
Tags:

Description

GPSManager works as a gpsd client and obtains latitude, longitude, altitude, and optionally horizontal movement direction, speed, and vertical speed from local gpsd. It has two main classes: GPSReader, which reads raw GPS data from local gpsd, and GPSManager, which manages the GPSReader and makes location information available to other parts of the system.

The code achieves its purpose through a multi-threaded approach. The GPSReader runs in a separate thread that continuously polls gpsd for new data. When valid GPS data is received, it updates the current location information. The GPSManager class uses the Singleton pattern (getInstance()) to ensure only one instance manages the GPS functionality throughout the system.

GPSManager and related files will only be compiled when ./waf configure --with-gps is specified.

Actions

Also available in: Atom PDF