[Firebug-cvs] firebug/web gps.html,1.6,1.7 gps_driver.html,1.8,1.9 cold_start.htm,1.1,NONE
Brought to you by:
doolin
From: <cs...@us...> - 2003-08-01 16:31:00
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1:/tmp/cvs-serv17142 Modified Files: gps.html gps_driver.html Removed Files: cold_start.htm Log Message: rename cold_start Index: gps.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/gps.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gps.html 12 May 2003 18:14:48 -0000 1.6 --- gps.html 1 Aug 2003 16:30:57 -0000 1.7 *************** *** 1,171 **** ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ! ! <html> ! <head> ! <title> ! FireBug GPS ! </title> ! </head> ! <body> ! <h1> ! FireBug GPS ! </h1> ! <hr width="100%" size="2"> ! <h2> ! GPS ! </h2> ! <ul class="noindent"> ! <li> ! <br> ! </li> ! <li style="list-style: none"> ! Receiver ! </li> ! </ul> ! <ul class="noindent"> ! <li> ! <img src="images/gps_receiver.gif" alt="GPS Receiver" ! width="324"> ! </li> ! <li style="list-style: none"> ! <i>Receiver Specifications</i>:<br> ! </li> ! </ul> ! <ul> ! <li> ! Power Supply Voltage 3.3 V ! </li> ! <li> ! ~ 50 mW @ 0.125 Hz (Trickle State) ! </li> ! <li> ! > 400 mW for continuous sampling (Tracking State) ! </li> ! <li> ! Position Accuracy: 15 m ! </li> ! <li> ! NMEA or proprietery data format (eg. SiRF) output<br> ! </li> ! </ul> ! <table cellpadding="2" cellspacing="2" border="1" width="80%" ! align="center" summary="Add summary here"> ! <tbody> ! <tr> ! <td valign="top" bgcolor="#CCCCCC"> ! <b>NMEA Data Format</b><br> ! <br> ! ! <ul> ! <li> ! Broadcast via a serial interface from GPS ! receiver to host ! </li> ! <li> ! Composed of 83 8-bit ASCII character ! </li> ! </ul> ! <blockquote> ! <blockquote> ! @@ GP DTS , ... (data) ... , ! <CR><LF><br> ! where @@ = start indicator<br> ! DTS = data set identifier<br> ! <CR><LF> = stop ! indicator<br> ! </blockquote> ! </blockquote> ! <ul> ! <li> ! Popular data sets include GGA (for fixed GPS ! data) and GLL (for geographic position) ! </li> ! <li> ! commas act as delimiters<br> ! </li> ! </ul> ! </td> ! </tr> ! </tbody> ! </table> - <br> - <br> - - <h2> - GPS Driver - </h2> - <i>Functions of host driver</i>:<br> - - <ul> - <li> - Wake-up GPS receiver - </li> - <li> - Notify host of receiver response - </li> - <li> - Decode GPS message - </li> - <li> - Checksum of message<br> - </li> - <li> - Store information into memory - </li> - </ul> - Position data from NMEA GGA is decoded and stored as 9 bytes - in the mote's EEPROM. Data is stored in the following - structure:<br> - <br> - <img src="images/gps_eeprom_data.gif" alt="GPS EEPROM DATA" - width="690" height="96"> <br> - - <ul> - <li> - Here, Status refers to the N/S,E/W indicators: SE = - 0x00, SW = 0x01, NE = 0x10, NW = 0x11 - </li> - <li> - The remaining 7 bytes in the EEPROM line are given values - 0xFF<br> - </li> - </ul> - <br> - <br> - - <pre> - - 1. Power on mote - a. Turn on mote timer - b. - 2. Mote catches events from timer firing - - a. Mote switches on state of the GPS unit and state of mote ! i. state POWER_ON ! ! b. GPS is powered ! c. Set mote UART to 4800 baud ! ! ! Wake up GPS unit: ! i. set GPS 9600 baud ! ii. set GPS format to NMEA ! </pre> ! <hr /> ! <p> ! Last Updated: $Date$ ! by $Author$. ! </p> ! </body> </html> --- 1,99 ---- ! <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html xmlns="http://www.w3.org/1999/xhtml"> ! <head name="author" content="Carmel Majidi, UC Berkeley" /="" type="text/css" rel="stylesheet" href="firebug.css"> ! <title>FireBug --- GPS Driver</title> ! ! <meta name="author" content="Carmel Majidi, UC Berkeley" /=""> ! ! <link type="text/css" rel="stylesheet" href="firebug.css"> ! ! <link rel="SHORTCUT ICON" href="./images/favicon.ico"> ! ! <meta name="author" content="Carmel Majidi, UC Berkeley" /=""> ! </head> ! <body> ! <h1>FireBug GPS</h1> ! Each wireless sensor is equipped with a Leadtek GPS receiver ! for localization. Each receiver has an external antenna and is ! mounted on the sensorboard. The schematic below represents the ! relationship between the GPS receiver and the mica2 host. + <center> + <img src="./images/gps_receiver.gif" alt="GPS Interface"> + </center> ! <h2>Receiver Specifications (not updated for new Leadtek receivers)</h2> ! <ul> ! <li> ! Power Supply Voltage 3.3 V ! </li> ! <li> ! ~ 50 mW @ 0.125 Hz (Trickle State) ! </li> ! <li> ! > 400 mW for continuous sampling (Tracking State) ! </li> ! <li> ! Position Accuracy: 15 m ! </li> ! <li> ! NMEA or proprietery data format (eg. SiRF) output<br> ! </li> ! </ul> ! <h2>NMEA Data Format<h2> ! For this application, a standard, NMEA format is used for collecting ! GPS data. There are various types of NMEA messages, all containing ! information related to universal time, geographical location, and the ! Global Positioning System. All messages share the common features: + <ul> + <li> + Broadcast via a serial interface from GPS receiver to host + </li> + <li> + Composed of 83 8-bit ASCII character + </li> + </ul> + <blockquote> + <blockquote> + @@ GP DTS , ... (data) ... ,<CR><LF><br> + where + <blockquote> + @@ = start indicator<br> + DTS = data set identifier<br> + <CR><LF> = stop indicator<br> + </blockquote> + </blockquote> + </blockquote> + <ul> + <li> + Popular data sets include GGA (for fixed GPS data) and GLL + (for geographic position) + </li> + <li> + commas act as delimiters<br> + </li> + </ul> ! <h2><a href="gps_driver.html">GPS Driver</a></h2> ! ! <h2><a href="gps_tests.htm">Receiver Characterization</a></h2> ! ! <hr /=""> ! <h2>Useful Links</h2> ! <p><a href="http://nmviewogc.cr.usgs.gov/viewer.htm">USGS National Map Viewer</a> ! -- use <i>Identify</i> tool to get Long/Lat coordinates of any point ! in the U.S.A.</p> ! <p><a href="http://www.topozone.com">www.topozone.com</a> ! -- interactive USGS topo map of the entire U.S.A.</p> ! <hr /=""> ! <p> Last updated: $Date$ by $Author$. ! </p> ! </body> </html> Index: gps_driver.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/gps_driver.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gps_driver.html 31 Jul 2003 23:48:21 -0000 1.8 --- gps_driver.html 1 Aug 2003 16:30:57 -0000 1.9 *************** *** 40,45 **** <tr> <td width="100%"> ! <pre> ! event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr data) {<br> int8_t gga_string[MSG_LENGTH];<br> bool gga_read = FALSE;<br> bool gga_read_done = FALSE;<br> uint16_t i = 0;<br> uint8_t j = 0;<br> <br> GPS_MsgPtr gps_data = (GPS_MsgPtr)data;<br> <br> while (!gga_read_done) {<br> <br> if(gps_data->data[i] == 'G') {<br> if(gps_data->data[i+1] == 'G') {<br> if(gps_data->data[i+2] == 'A') {<br> gga_read = TRUE;<br> }<br> }<br> }<br> ...<br> if(gga_read) {<br> gga_string[j] = gps_data->data[i];<br> j++;<br> }<br> <br> i++;<br> }<br> } </pre> </td> --- 40,70 ---- <tr> <td width="100%"> ! <pre> ! event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr data) { ! int8_t gga_string[GPS_MSG_LENGTH]; ! bool gga_read = FALSE; ! bool gga_read_done = FALSE; ! uint16_t i = 0; ! uint8_t j = 0; ! GPS_MsgPtr gps_data = (GPS_MsgPtr)data; ! ! while (!gga_read_done) { ! ! if(gps_data->data[i] == 'G') { ! if(gps_data->data[i+1] == 'G') { ! if(gps_data->data[i+2] == 'A') { ! gga_read = TRUE; ! } ! } ! } ! ... ! if(gga_read) { ! gga_string[j] = gps_data->data[i]; ! j++; ! } ! ! i++; ! } ! } </pre> </td> *************** *** 58,63 **** <tr> <td width="100%"> ! <pre> ! event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr data) {<br> ...<br> while (!gga_read_done) {<br> ...<br> if(gps_data->data[i] == '*') {<br> if(gga_read) {<br> call <b>parseGPS</b>(gga_string, j);<br> gga_read = FALSE;<br> gga_read_done = TRUE;<br> }<br> }<br> ...<br> }<br> } </pre> </td> --- 83,104 ---- <tr> <td width="100%"> ! <pre> ! event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr data) { ! ... ! while (!gga_read_done) { ! ... ! if(gps_data->data[i] == GPS_END_MSG) { ! if(gga_read) { ! if(call GpsCmd.GpsPower(0)) { ! SODbg(DBG_USR2, "GPS Power Off\n"); ! } ! call parseGPS(gga_string, j); ! gga_read = FALSE; ! gga_read_done = TRUE; ! } ! } ! ... ! } ! } </pre> </td> *************** *** 69,73 **** <h2>Storing GGA data</h2> <p>In <tt>parseGGA</tt>, the comma-delimited fields of <tt>gga_string ! </tt> are placed into an array, <tt>write</tt>, which is then sent to <tt>logGPS</tt> for storage.</p> --- 110,114 ---- <h2>Storing GGA data</h2> <p>In <tt>parseGGA</tt>, the comma-delimited fields of <tt>gga_string ! </tt> are placed into an array, <tt>gga_fields</tt>, which is then sent to <tt>logGPS</tt> for storage.</p> *************** *** 82,86 **** <td width="100%"> <b>gps.h</b> ! <pre> typedef struct GGA_Msg<br> {<br> uint8_t hours;<br> uint8_t minutes;<br> uint16_t dec_sec;<br> uint8_t Lat_deg;<br> uint16_t Lat_dec_min;<br> uint8_t Long_deg;<br> uint16_t Long_dec_min;<br> uint8_t NSEWind;<br> } GGA_Msg; </pre> --- 123,127 ---- <td width="100%"> <b>gps.h</b> ! <pre> typedef struct GGA_Msg<br> {<br> uint8_t hours;<br> uint8_t minutes;<br> uint16_t dec_sec;<br> uint8_t Lat_deg;<br> uint16_t Lat_dec_min;<br> uint8_t Long_deg;<br> uint16_t Long_dec_min;<br> uint8_t NSEWind;<br> } GGA_Msg; </pre> *************** *** 91,95 **** </center> ! <p>The entry <tt>write[i][j]</tt> represents the jth character in the ith field of GGA string. Fields of interest, their field number, and the number of characters they contain, including decimal points, are --- 132,136 ---- </center> ! <p>The entry <tt>gga_fields[i][j]</tt> represents the jth character in the ith field of GGA string. Fields of interest, their field number, and the number of characters they contain, including decimal points, are *************** *** 160,168 **** <p>Characters representing numbers in ASCII are converted to integers ! by the operation <tt>write[i][j]-'0'</tt>. So for example, the UTC hour, which is given by the first two characters of the second field ! of <tt>write</tt>, is stored as a single 8-bit integer in the line</p> ! <center>pGGA->hours = 10*(write[1][0]-'0') + (write[1][1]-'0');</center> <p>The rest of <tt>GGA_Str</tt> is likewise assembled in this manner.</p> --- 201,209 ---- <p>Characters representing numbers in ASCII are converted to integers ! by the operation <tt>gga_fields[i][j]-'0'</tt>. So for example, the UTC hour, which is given by the first two characters of the second field ! of <tt>gga_fields</tt>, is stored as a single 8-bit integer in the line</p> ! <center>pGGA->hours = 10*(gga_fields[1][0]-'0') + (gga_fields[1][1]-'0');</center> <p>The rest of <tt>GGA_Str</tt> is likewise assembled in this manner.</p> *************** *** 174,194 **** <td width="100%"> <pre> ! pGGA->minutes = 10*(write[1][2]-'0') + (write[1][3]-'0'); ! pGGA->dec_sec = 10000*(write[1][4]-'0') + 1000*(write[1][5]-'0') ! + 100*(write[1][7]-'0') + 10*(write[1][8]-'0') ! + (write[1][9]-'0'); ! pGGA->Lat_deg = 10*(write[2][0]-'0') + (write[2][1]-'0'); ! pGGA->Lat_dec_min = 100000*(write[2][2]-'0') + 10000*(write[2][3]-'0') ! + 1000*(write[2][4]-'0') + 100*(write[2][5]-'0') ! + 10*(write[2][6]-'0') + (write[2][7]-'0'); ! pGGA->Long_deg = 100*(write[4][0]-'0') + 10*(write[4][1]-'0') + (write[4][2]-'0'); ! pGGA->Long_dec_min = 100000*(write[4][3]-'0') + 10000*(write[4][4]-'0') ! + 1000*(write[4][5]-'0') + 100*(write[4][6]-'0') ! + 10*(write[4][7]-'0') + (write[4][8]-'0'); ! NS = (write[3][0] == 'N') ? 1 : 0; ! EW = (write[5][0] == 'W') ? 1 : 0; pGGA->NSEWind = EW | (NS<<4); // eg. Status = 000N000E = 00010000 </pre> --- 215,235 ---- <td width="100%"> <pre> ! pGGA->minutes = 10*(gga_fields[1][2]-'0') + (gga_fields[1][3]-'0'); ! pGGA->dec_sec = 10000*(gga_fields[1][4]-'0') + 1000*(gga_fields[1][5]-'0') ! + 100*(gga_fields[1][7]-'0') + 10*(gga_fields[1][8]-'0') ! + (gga_fields[1][9]-'0'); ! pGGA->Lat_deg = 10*(gga_fields[2][0]-'0') + (gga_fields[2][1]-'0'); ! pGGA->Lat_dec_min = 100000*(gga_fields[2][2]-'0') + 10000*(gga_fields[2][3]-'0') ! + 1000*(gga_fields[2][4]-'0') + 100*(gga_fields[2][5]-'0') ! + 10*(gga_fields[2][6]-'0') + (gga_fields[2][7]-'0'); ! pGGA->Long_deg = 100*(gga_fields[4][0]-'0') + 10*(gga_fields[4][1]-'0') + (gga_fields[4][2]-'0'); ! pGGA->Long_dec_min = 100000*(gga_fields[4][3]-'0') + 10000*(gga_fields[4][4]-'0') ! + 1000*(gga_fields[4][5]-'0') + 100*(gga_fields[4][6]-'0') ! + 10*(gga_fields[4][7]-'0') + (gga_fields[4][8]-'0'); ! NS = (gga_fields[3][0] == 'N') ? 1 : 0; ! EW = (gga_fields[5][0] == 'W') ? 1 : 0; pGGA->NSEWind = EW | (NS<<4); // eg. Status = 000N000E = 00010000 </pre> *************** *** 200,223 **** <p>For storage into EEPROM, <tt>GGA_Str</tt> data is entered into character ! array, <tt>log_array</tt>. For 16-bit data, the 8 most significant bits precede the 8 least significant bits as shown for Latitude decimal seconds:</p> ! <tt><p>log_array[5] = (pGGA->Lat_dec_min)>>8;<br> ! log_array[6] = pGGA->Lat_dec_min;</p></tt> ! <p>Lastly, <tt>log_array</tt> is written into line 25 of EEPROM with the command ! <tt>call LoggerWrite.write(0x19,(char *)log_array))</tt></p> ! ! <hr /=""> ! ! <h2>Click <a href="gps_tests.htm">here</a> for experimental results</h2> ! ! <hr /=""> - <h2>Useful Links</h2> - <p><a href="http://nmviewogc.cr.usgs.gov/viewer.htm">USGS National Map Viewer</a> - -- use <i>Identify</i> tool to get Long/Lat coordinates of any point - in the U.S.A.</p> - <p><a href="http://www.topozone.com">www.topozone.com</a> - -- interactive USGS topo map of the entire U.S.A.</p> <hr /=""> <p> Last updated: $Date$ by $Author$. --- 241,252 ---- <p>For storage into EEPROM, <tt>GGA_Str</tt> data is entered into character ! array, <tt>gga_log_array</tt>. For 16-bit data, the 8 most significant bits precede the 8 least significant bits as shown for Latitude decimal seconds:</p> ! <tt><p>gga_log_array[5] = (pGGA->Lat_dec_min)>>8;<br> ! gga_log_array[6] = pGGA->Lat_dec_min;</p></tt> ! <p>Lastly, <tt>gga_log_array</tt> is written into line 25 of EEPROM with the command ! <tt>call LoggerWrite.write(0x19,(char *)gga_log_array))</tt></p> <hr /=""> <p> Last updated: $Date$ by $Author$. --- cold_start.htm DELETED --- |