gps - wolfen351/public-micropython-iot-platform GitHub Wiki
The GPS module provides functionality to parse GPS data from NMEA sentences, display telemetry, and interact with a map interface. It uses the MicropyGPS
library for parsing and processes data through UART communication.
- Parses NMEA sentences (e.g., GPRMC, GPGGA, GPGLL, etc.) for GPS data.
- Provides telemetry such as latitude, longitude, altitude, speed, course, and satellite information.
- Displays GPS data on a web interface.
- Includes a map interface to visualize the current location.
- Supports logging of GPS data.
The GPS module includes a web-based UI panel defined in gps_index.html
. This panel displays real-time GPS telemetry data and provides a button to access the map interface.
- Latitude: Displays the current latitude in decimal degrees.
- Longitude: Displays the current longitude in decimal degrees.
- Altitude: Displays the current altitude in meters.
- Date/Time: Displays the current GPS date and time.
- Satellites: Displays the number of satellites in use.
- Speed: Displays the current speed in kilometers per hour and the course in degrees.
- Accuracy: Displays the positional accuracy (PDOP).
-
Map Button: A button labeled "Map" that redirects to the
/map
route to display the current location on a map.
The map interface is defined in map.html
and uses Google Maps to display the current GPS location. The map updates every second with the latest telemetry data fetched from the /telemetry
endpoint.
- The map interface is accessible via the
/map
route and displays the current location using Google Maps. - The GPS module is implemented in
gps_control.py
and uses theMicropyGPS
library for parsing GPS data. - The web interface for telemetry is defined in
gps_index.html
, and the map interface is defined inmap.html
.
-
RX Pin: Configurable via
gps.rxPin
(default: 18). -
TX Pin: Configurable via
gps.txPin
(default: 18). - UART communication is initialized at 9600 baud.
-
latitude
: Latitude in decimal degrees. -
longitude
: Longitude in decimal degrees. -
altitude
: Altitude in meters. -
gpsdate
: Current date inDD/MM/YYYY
format. -
gpstime
: Current time inHH:MM:SS
format. -
satellites
: Number of satellites in use. -
course
: Current course in degrees. -
speed
: Speed in kilometers per hour. -
gpsaccuracy
: Positional accuracy (PDOP).
None.
None.
None.
- The map interface is accessible via the
/map
route and displays the current location using Google Maps. - The GPS module is implemented in
gps_control.py
and uses theMicropyGPS
library for parsing GPS data. - The web interface for telemetry is defined in
gps_index.html
, and the map interface is defined inmap.html
.