Once established, we allow the NetBurner GPRS
network object to monitor the active connection. Mobile
networking connections — like cell phone connections — are
far from perfect. If the application loses signal, the network
object will continuously search for a new signal, and re-establish the connection once one is found.
GPS Location Data
During the configuration and connection of the
network, you should also be initializing the GPS module.
Ideally, you want an update of the current location over
serial every second.
Once turned on, the Telit GPS immediately begins its
satellite search process to establish its current location. An
antenna is a necessity in getting a good satellite read.
Indoor use may degrade the signal, so in development, it’s
best to stay near a window with a clear view of the sky.
GPS readings come in the form of NMEA GPS
sentences. NMEA is a protocol designed for communication
between maritime navigational instruments. GPS
communication is defined within this protocol.
A pitfall at this point would be failing to configure the
GPS module to display output. By default, the device will
not output any location information. For my application, I
am interested in getting the signal quality, current time,
latitude, and longitude. You are not limited to this output
though. You can configure the device to display speed,
direction, altitude, and other navigational readings. The
readings I require can be derived from the NMEA GPGGA
sentence, so we will enable it with a special Telit
configuration command.
int i = siprintf(buff, “$PSRF103,00,00,01,01*”);
// Enable GPGGA
siprintf(buff + i, “%02X\r\n\0”,
GetGPSCheckSum(buff));
writestring(fdIncoming, buff);
This command enables the GPGGA sentence and
instructs the GPS module to send this location statement
every second. The GPGGA sentence arrives from the Telit
GPS in the following example format.
$GPGGA,063214.000,2125.1295,N,00903.9206,E,1,
03,2.1,-108.0,M,46.1,M,,0000*4E
Your application must parse this data string. The only
information that I need to save from this statement is the
current time, latitude, longitude, and satellite connection
quality. Everything else can be dropped. The connection
lo n gitu de
latitude
GPS
The Global Positioning System (GPS) is a worldwide
navigational tool developed and maintained by the US
Department of Defense. It uses orbiting satellites that
transmit specially coded signals which are picked up by
receiver units. With the information broadcast from the
satellites, these receiver units can compute position,
velocity, and time.
The GPS system consists of three main segments. The
space segment details the satellite system. These space
vehicles are in constant orbit around the Earth. Five to
eight of these satellites are visible from any point on the
Earth’s surface. The control segment of GPS consists of
tracking the flight path and updating the coded signals of
the satellites in orbit. This segment is maintained by the
US Air Force. The final — and most important for us
civilians — is the user segment. The user segment consists
of all integrated and dedicated GPS receiver units and the
community of users around these devices.
The GPS receiver figures out its position by triangulating
the distance between satellites that it picks up. At least
four satellites must be in view to figure out the four
dimensions X, Y, Z (Position), and Time. Increasing the
number of satellites available to the unit will increase the
accuracy of your fourth dimensional location.
GPRS
General Packet Radio Server (GPRS) is a wireless
communications standard that uses a mobile cell phone
connection primarily to provide a network address to your
robot. With a GPRS-enabled device, it is possible to
connect to the Internet, view video, read and write emails,
and send and receive packets of data.
GPRS is available on Global System for Mobile
Communications (GSM) which is part of the Second
Generation (2G) wireless telephone technology. While it
does not provide the speed of a Third Generation (3G)
device, it will provide a much wider coverage area. The
connection speed of a GPRS will increase and decrease
with current wireless signal quality. With good coverage,
a GPRS device can attain speeds up to 112 kbps.
The network connection for the mobile networking device
is handled by an access point. This access point has
several channels available to offer the mobile device. In a
standard GSM connection, the device and the access point
utilize a circuit-switched connection. A circuit-switched
connection dedicates one channel to the connection of the
device and remains in an always-on state until the
connection is terminated. A GPRS capable device will
utilize a packet-switched connection to the access point.
In this connection type, multiple channels are opened
between the device and the access point, allowing much
higher throughput. Packets are sent out on an as-needed
basis, allowing the access point to host multiple devices
on the same channel.
SERVO 07.2010 53