GPS Example
This example demonstrates the Serial data capabilities of the EZ Web Lynx system. Most GPS enabled devices use a standard protocol called NMEA to send their positional data back to a receiver. In this example, the following serial stream of ASCII characters was sent to the EZ Web Lynx which then using the Serial Data command displayed the relevant sections on a web page.
$GPGGA,055819,6409.038,N,10131.000,E,1,08,0.9,345.4,M,46.9,M,,*47
A web page was created using the following HTML that would parse this stream and display the relevant data such as the longitude, latitude, and altitude.
Sample HTML - GPS
<html>
<head>
</head>
<body>
<p style="text-align:center;">
<b><span style="font-size:48px">GPS Location</span></b>
</p>
<p>
<hr/>
<!--(EXEC SERIAL_START=0x24,0x47,0x50,0x47,0x47,0x41)-->
<!--translates to $GPGGA-->
<!--(EXEC SERIAL_END=0x2A,0x34,0x37)-->
<!--translates to *47-->
</p>
<p>
<span style="font-size:18pt;"><b>Longitude:</b></span>
<!--(IF SERIAL_KBHIT > 0)--><!--(SERIAL DATA 25 27)--> deg
<!--(SERIAL DATA 28 33)-->' <!--(SERIAL DATA 35 35)-->
<!--(ELSE)--><b>NO SERIAL DATA!</b><!--(ENDIF)-->
</p>
<p>
<span style="font-size:18pt;"><b>Latitude:</b></span>
<!--(IF SERIAL_KBHIT > 0)--><!--(SERIAL DATA 14 15)--> deg
<!--(SERIAL DATA 16 21)-->' <!--(SERIAL DATA 23 23)-->
<!--(ELSE)--><b>NO SERIAL DATA!</b><!--(ENDIF)-->
</p>
<p>
<span style="font-size:18pt;"><b>Altitude:</b></span>
<!--(IF SERIAL_KBHIT > 0)--><!--(SERIAL DATA 46 50)-->
<!--(SERIAL DATA 52 52)-->
<!--(ELSE)--><b>NO SERIAL DATA!</b><!--(ENDIF)-->
</p>
<p>
<span style="font-size:18pt;"><b>Time:</b></span>
<!--(IF SERIAL_KBHIT > 0)--><!--(SERIAL DATA 7 8)-->:
<!--(SERIAL DATA 9 10)-->:<!--(SERIAL DATA 11 12)-->
<!--(ELSE)--><b>NO SERIAL DATA!</b><!--(ENDIF)-->
</p>
</body>
</html>


