Waspmote can integrate a GPS receiver which allows to know the exact location of the mote anytime. Thus, the exact position of the mote can be obtained and even the current time and date, to synchronize the Waspmote internal clock (RTC) with the real time. Besides, data can be geolocated on a map.
The GPS module gives us information about:
The functions implemented in the API allow this information to be extracted simply, calling functions such as:
{
GPS.getAltitude();
GPS.getSpeed();
GPS.getLongitude();
GPS.getLatitude();
}
The GPS receiver uses the UART_1 to communicate with the microcontroller, sharing this UART with the NB-IoT / Cat-M or 4G modules. As up to 2 modules share this UART, a multiplexer has been enabled in order to select the module with which we wish to communicate at any time. This is not a problem; since all actions are sequential, in practice there is parallel availability of both devices.
The GPS starts up by default at 4800 bps. This speed can be increased using the library functions that have been designed for controlling and managing the module.
The GPS receiver has 2 operational modes: NMEA (National Marine Electronic Association) mode and binary mode. NMEA mode uses statements from this standard to obtain location, time and date. The binary mode is based on the sending of structured frames to establish communication between the microcontroller and the GPS receiver, i.e. to read/set ephemeris.
The different types of NMEA statements that the Waspmote's built-in GPS receiver supports are:
The most important NMEA statements are the GGA statements which provide a validity indicator of the measurement carried out, the RMC statement which provides location, speed and date/time and the GSA statement which provides information about the status of the satellites the GPS receiver has been connected to.
(To obtain more information about the NMEA standard and the NMEA statements, visit the website: http://www.gpsinformation.org/dale/nmea.htm)
The GPS receiver needs time to obtain and structure the information that the satellites send. This time can be reduced if there is certain prior information. This information is stored in the almanacs and ephemeris. The information that can be found out is relative to the current position of the satellites (ephemeris) and the trajectory they are going to follow over the next days (almanacs). The almanacs indicate the trajectory that the satellites are going to follow during the next days, having a validity of some 2-3 months. The ephemeris indicate the current position of the satellites and have a validity of some 3-5 hours.
Depending on the information that the GPS receiver has, the start ups can be divided into these types:
As can be observed, the start up time reduces greatly, particularly when ephemeris are stored. For this reason a series of functions have been created in the libraries to store ephemeris on the SD card and enable them to be loaded later.
Related API libraries: WaspGPS.h, WaspGPS.cpp.
All information about their programming and operation can be found in the document: GPS Programming Guide.
All the documentation is located in the Development section in the Libelium website.