13 gps.getlastrmc(), 14 gps.getlastvtg(), 15 gps.getposition() – Rainbow Electronics GM862-GPS User Manual
Page 61

Easy Script
in Python
80000ST10020a Rev.8 - 01/10/08
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved
page 61 of 100
2.10.13
GPS.getLastRMC()
This command gets GPS last RMC NMEA sentence stored. It has no input parameter.
Return value is a Python string which is the last RMC NMEA sentence formatted according to NMEA
specification.
Example:
rms = GPS.getLastRMC()
gets last RMC NMEA sentence, assigning return value to rmc.
2.10.14
GPS.getLastVTG()
This command gets GPS last VTG NMEA sentence stored. It has no input parameter.
Return value is a Python string which is the last VTG NMEA sentence formatted according to NMEA
specification.
Example:
vtg = GPS.getLastVTG()
gets last VTG NMEA sentence, assigning return value to vtg.
2.10.15
GPS.getPosition()
This command gets GPS last position stored in numeric format. It has no input parameter.
Return value is a Python tuple formatted in the following way
where:
• First element of tuple is a Python integer which is latitude in (degrees * 10000000), that is in
degrees with 10000000 scale factor.
• Second element of tuple in a Python string which is ‘N’ for north or ‘S’ for south.
• Third element of tuple is a Python integer which is longitude in (degrees * 10000000), that is
in degrees with 10000000 scale factor.
• Fourth element of tuple in a Python string which is ‘E’ for east or ‘W’ for west.
If GPS controller has no position information the following tuple is returned:
(0, ‘’, 0, ‘’).
Example:
pos = GPS.getPosition()
gets last position stored, assigning return value to pos.