26 lines
527 B
C
26 lines
527 B
C
|
#pragma once
|
||
|
|
||
|
#include <SoftwareSerial.h>
|
||
|
|
||
|
#include <TinyGPS++.h>
|
||
|
|
||
|
#include "settings.h"
|
||
|
|
||
|
|
||
|
// The GPS message decoder
|
||
|
TinyGPSPlus gps;
|
||
|
// The serial connection to the GPS device
|
||
|
SoftwareSerial serial_gps(PIN_GPS_RX, PIN_GPS_TX);
|
||
|
|
||
|
/**
|
||
|
* Initialises the connection to the GPS device.
|
||
|
*/
|
||
|
void gps_begin();
|
||
|
|
||
|
/**
|
||
|
* Fetches the current location from the GPS device.
|
||
|
* May take a moment, as the GPS device needs time to acquire a satellite fix.
|
||
|
* @return TinyGPSLocation The current location.
|
||
|
*/
|
||
|
TinyGPSLocation get_location();
|