Applicable Products
Part number | Description |
ZETA-GEP-LTE4 (EU) | Low Power LTE Cat 4 European Modem with GPIO and GNSS |
ZETA-G-GPRS | Entry Level GPRS Modem with GNSS (GL) |
Objective
In some applications, the user may require the position of a system shown on Google Maps.
This application note shows how this can be done using a Siretta ZETA modem with GNSS capability.
This document shows how to convert Latitude Longitude to a position in the map.
Solution
GPS Location Integration into Google Maps
The GNSS engine in the ZETA modem will show the Latitude/Longitude position in Decimal Minutes format (ddmm.mmmm). However, Google Maps requires this information in Decimal Degrees format (dd.ddd). The solution is to convert position from one format to the other to show position on Google Maps.
The AT command AT$GPSACP will return the lat/long position information in the Decimal Minutes format.
GPSACP lat is in the format ddmm.mmmm
GPSACP lon is in the format dddmm.mmmm
Demonstration of Solution
Resources used:
- ZETA-GEP-LTE4 (EU) – including Cellular and GNSS antennas.
- ZETA-xxP Quick Start Guide
- Initial Modem Setup Guide App Note
- A PC with an installed Terminal Emulator program
- ZETA-xxP-LTE1 / ZETA-xxP-LTE4 AT Command Guide
Steps:
- Follow the Initial Modem set up guide application note to communicate with the modem using AT commands.
- Issue the following AT command AT$GPSP=1 to turn the GNSS engine ON in the modem.
- Issue the AT command AT$GPSACP to obtain latitude and longitude
COM3 – Tera Term VT |
File Edit Setup Control Window Help |
AT OK AT$GPSP=1 OK AT$GPSACP $GPSACP: 103709.000,5123.1355N,00058.4350W,9.5,96.0,3,303.4,4.5,2.4,050224,03,02 OK |
4. Stripping information’s from responses of AT$GPSACP.
UTC = 103709.000
Latitude = 5123.1355N
Longitude = 00058.4350W
HDOP = 9.5
Altitude = 96.0
Fix = 3
COG = 303.4
SPKM = 4.5
SPKN = 2.4
Date = 050224
Nsat_GPS = 03
Nsat_GLONASS = 02
Position Information Conversion
5. Obtaining Lat/Long
This position information can easily be converted into Google Maps compatible lat/long readings as shown below:
Strip the dd from the message i.e.
ddmm.mmmm
Which becomes
variable1 = dd
variable2 = mm.mmmm
variable3 = variable2 / 60
Rejoin values to make dd.dddd
dd.dddd = variable1.variable3
i.e. Latitude / Longitude for the Siretta office from NMEA GGA message to lat/long
Lat: ddmm.mmmm: 5123.1355 (N)
Lat: dd + mm.mmmm: 51 + 23.1355
Lat: dd + dd.dddd: 51 +( (23.1355 / 60) = 0.38559)
Lat: dd.dddd: 51.38559
Lat: 51.38559 (As this is north it is positive, south is negative)
Long: dddmm.mmmm: 00058.4350 (W)
Long: ddd + mm.mmmm: 000 + 58.4350
Long: ddd + dd.dddd: 000 + ((58.4350 / 60) =0.9739)
Long: ddd.dddd: 000.9739
Long: -000.9739 (As this is West it is negative, East is positive)
Latitude: 51.38559
Longitude: -000.9739
Display on Maps API
Now to get this into Google maps:
Go to http://maps.google.com.
Type the following in to the search box: 51.38559, -000.9739
Then hit ‘Search Maps’ and you get the Siretta office!!
For direct access to Google Maps use the URL below:
http://maps.google.com/maps?q=51.38559+-000.9739
Note: AT command AT$GPSACP may return different parameters, depending on your location, date, time, number of available satellites and fix.
Additional Reading
Description | Author |
ZETA Hardware user’s manual | Siretta |
AT command manual | Telit |
How to use GNSS enabled Siretta modems to obtain Lat and Long positions and Time | Siretta |
https://www.siretta.com/2023/03/using-a-siretta-gnss-modem-to-test-the-performance-of-a-gps-antenna/
|
Siretta |
https://www.siretta.com/2023/01/using-siretta-modems-to-provide-a-gps-position/ | Siretta |
https://www.siretta.com/2023/01/initial-modem-setup/ | Siretta |