firebug-cvs Mailing List for FireBug: wireless wildfire monitoring (Page 14)
Brought to you by:
doolin
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(36) |
Jun
(45) |
Jul
(108) |
Aug
(31) |
Sep
(2) |
Oct
(4) |
Nov
(113) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(63) |
Feb
(37) |
Mar
(24) |
Apr
(6) |
May
(5) |
Jun
(5) |
Jul
(71) |
Aug
(42) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(64) |
Jun
(71) |
Jul
(51) |
Aug
(89) |
Sep
(24) |
Oct
(1) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
|
Feb
|
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: David M. D. <do...@us...> - 2005-05-18 23:32:25
|
Update of /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3017/XSensorMTS400 Log Message: Directory /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400 added to the repository |
From: David M. D. <do...@us...> - 2005-05-18 23:30:58
|
Update of /cvsroot/firebug/fireboard/beta/tos/sensorboards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2695/sensorboards Log Message: Directory /cvsroot/firebug/fireboard/beta/tos/sensorboards added to the repository |
From: David M. D. <do...@us...> - 2005-05-18 23:30:31
|
Update of /cvsroot/firebug/fireboard/beta/tos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2614/tos Log Message: Directory /cvsroot/firebug/fireboard/beta/tos added to the repository |
From: David M. D. <do...@us...> - 2005-05-18 23:29:28
|
Update of /cvsroot/firebug/fireboard/beta/apps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2437/apps Log Message: Directory /cvsroot/firebug/fireboard/beta/apps added to the repository |
From: David M. D. <do...@us...> - 2005-05-18 23:28:36
|
Update of /cvsroot/firebug/fireboard/beta In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2248/beta Log Message: Directory /cvsroot/firebug/fireboard/beta added to the repository |
From: David M. D. <do...@us...> - 2005-03-24 01:26:38
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30235 Modified Files: publications.html publications.php Log Message: Fixed pubs php. Index: publications.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/publications.html,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** publications.html 24 Mar 2005 01:09:48 -0000 1.12 --- publications.html 24 Mar 2005 01:26:20 -0000 1.13 *************** *** 15,19 **** <li> - D. M. Doolin and N. Sitar. <a href="spie2005.pdf">Wireless sensors for wildre monitoring</a> --- 15,18 ---- Index: publications.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/publications.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** publications.php 3 Aug 2004 01:37:31 -0000 1.1 --- publications.php 24 Mar 2005 01:26:21 -0000 1.2 *************** *** 20,23 **** --- 20,60 ---- <li> + D. M. Doolin and N. Sitar. + <a href="spie2005.pdf">Wireless sensors for wildre monitoring</a> + Proceedings of SPIE Symposium on Smart Structures & Materials/ NDE 2005, San Diego, + California, March 6-10, 2005. + <p> + ABSTRACT: We describe the design of a system for wildfire monitoring + incorporating wireless sensors, and report results + from field testing during prescribed test burns near San + Francisco, California. The system is composed of + environmental sensors collecting temperature, relative + humidity and barometric pressure with an on-board GPS + unit attached to a wireless, networked mote. The motes + communicate with a base station, which communicates + the collected data to software running on a database + server. The data can be accessed using a browser-based + web application or any other application capable of + communicating with the database server. Performance of the + monitoring system during two prescribed burns at Pinole + Point Regional Park (Contra Costa County, California, + near San Francisco) is promising. Sensors within the + burn zone recorded the passage of the flame front before + being scorched, with temperature increasing, and barometric + pressure and humidity decreasing as the flame front + advanced. Temperature gradients up to 5 C per second were + recorded. The data also show that the temperature + slightly decreases and the relative humidity slightly + increases from ambient values immediately preceding the + flame front, indicating that locally significant weather + conditions develop even during relatively cool, slow moving + grass fires. The maximum temperature recorded was 95 C, + the minimum relative humidity 9%, and barometric + pressure dropped by as much as 25 mbar. + </p> + </li> + + + <li> S. D. Glaser. <a href="glaser_spie_2004_paper.pdf">Some real-world applications of wireless sensor nodes</a> |
From: David M. D. <do...@us...> - 2005-03-24 01:10:18
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22973 Modified Files: publications.html Log Message: Added spie paper. Index: publications.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/publications.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** publications.html 24 Mar 2005 01:08:37 -0000 1.11 --- publications.html 24 Mar 2005 01:09:48 -0000 1.12 *************** *** 21,25 **** California, March 6-10, 2005. <p> ! We describe the design of a system for wildfire monitoring incorporating wireless sensors, and report results from field testing during prescribed test burns near San --- 21,25 ---- California, March 6-10, 2005. <p> ! ABSTRACT: We describe the design of a system for wildfire monitoring incorporating wireless sensors, and report results from field testing during prescribed test burns near San |
From: David M. D. <do...@us...> - 2005-03-24 01:09:11
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22432 Modified Files: publications.html Added Files: spie2005.pdf Log Message: Added spie paper. --- NEW FILE: spie2005.pdf --- (This appears to be a binary file; contents omitted.) Index: publications.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/publications.html,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** publications.html 3 Aug 2004 00:47:54 -0000 1.10 --- publications.html 24 Mar 2005 01:08:37 -0000 1.11 *************** *** 15,23 **** <li> S. D. Glaser. <a href="glaser_spie_2004_paper.pdf">Some real-world applications of wireless sensor nodes</a> Proceedings of SPIE Symposium on Smart Structures & Materials/ NDE 2004, San Diego, California, March 14-18, 2004 ! <p> ABSTRACT: This paper presents two case histories of the use of wireless sensor Mote technologies. These are devices that --- 15,60 ---- <li> + + D. M. Doolin and N. Sitar. + <a href="spie2005.pdf">Wireless sensors for wildre monitoring</a> + Proceedings of SPIE Symposium on Smart Structures & Materials/ NDE 2005, San Diego, + California, March 6-10, 2005. + <p> + We describe the design of a system for wildfire monitoring + incorporating wireless sensors, and report results + from field testing during prescribed test burns near San + Francisco, California. The system is composed of + environmental sensors collecting temperature, relative + humidity and barometric pressure with an on-board GPS + unit attached to a wireless, networked mote. The motes + communicate with a base station, which communicates + the collected data to software running on a database + server. The data can be accessed using a browser-based + web application or any other application capable of + communicating with the database server. Performance of the + monitoring system during two prescribed burns at Pinole + Point Regional Park (Contra Costa County, California, + near San Francisco) is promising. Sensors within the + burn zone recorded the passage of the flame front before + being scorched, with temperature increasing, and barometric + pressure and humidity decreasing as the flame front + advanced. Temperature gradients up to 5 C per second were + recorded. The data also show that the temperature + slightly decreases and the relative humidity slightly + increases from ambient values immediately preceding the + flame front, indicating that locally significant weather + conditions develop even during relatively cool, slow moving + grass fires. The maximum temperature recorded was 95 C, + the minimum relative humidity 9%, and barometric + pressure dropped by as much as 25 mbar. + </p> + </li> + + <li> S. D. Glaser. <a href="glaser_spie_2004_paper.pdf">Some real-world applications of wireless sensor nodes</a> Proceedings of SPIE Symposium on Smart Structures & Materials/ NDE 2004, San Diego, California, March 14-18, 2004 ! <p> ABSTRACT: This paper presents two case histories of the use of wireless sensor Mote technologies. These are devices that |
From: David M. D. <do...@us...> - 2004-09-28 23:59:19
|
Update of /cvsroot/firebug/firebug/project/java/src/org/firebug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19340/java/src/org/firebug Modified Files: ListenFB.java Log Message: java listening code now supports creating a database from the command line. Index: ListenFB.java =================================================================== RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/ListenFB.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ListenFB.java 9 Aug 2004 19:47:37 -0000 1.23 --- ListenFB.java 28 Sep 2004 23:59:00 -0000 1.24 *************** *** 29,32 **** --- 29,33 ---- import javax.comm.*; import java.sql.*; + import org.firebug.database.MysqlDBHandler; *************** *** 61,64 **** --- 62,75 ---- + static String location_table = "CREATE TABLE location (mote_id SMALLINT, gps_hours SMALLINT, gps_minutes SMALLINT, gps_seconds FLOAT, lat_deg SMALLINT," + + "lat_dec_min FLOAT, long_deg SMALLINT, long_dec_min FLOAT, nsew SMALLINT, numsats SMALLINT)"; + static String current_table = "CREATE TABLE current (mote_id SMALLINT, time TIMESTAMP, cnt SMALLINT, temp FLOAT, rel_hum FLOAT, baro_pres FLOAT, lux FLOAT)"; + static String cumulative_table = "CREATE TABLE cumulative (mote_id SMALLINT, time TIMESTAMP, cnt SMALLINT, temp FLOAT, rel_hum FLOAT, baro_pres FLOAT, lux FLOAT)"; + static String range_table = "CREATE TABLE range (mote_id SMALLINT, time TIMESTAMP, count INTEGER, rssi INTEGER, voltage FLOAT)"; + + + + + private FireLogger firelogger; private RangeLogger rangelogger; *************** *** 70,74 **** new dispatch(129,rangelogger), new dispatch(0,null) ! }; /** Use this interface when changing the output --- 81,85 ---- new dispatch(129,rangelogger), new dispatch(0,null) ! }; /** Use this interface when changing the output *************** *** 121,125 **** return gpslogger; } else { ! return xbowlogger; } } --- 132,136 ---- return gpslogger; } else { ! return xbowlogger; } } *************** *** 184,191 **** static int get_xbow_packet_id(byte [] packet) { ! int packet_id = (int)(packet[6]&0xFF); ! if (packet_id == 1) return 137; ! if (packet_id == 2) return 138; ! return 0; } --- 195,202 ---- static int get_xbow_packet_id(byte [] packet) { ! int packet_id = (int)(packet[6]&0xFF); ! if (packet_id == 1) return 137; ! if (packet_id == 2) return 138; ! return 0; } *************** *** 221,225 **** PacketPrinter printer = GetPrinter(am_type); if (printer != null) { ! printer.print(packet); } } --- 232,236 ---- PacketPrinter printer = GetPrinter(am_type); if (printer != null) { ! printer.print(packet); } } *************** *** 247,256 **** ! if (args.length != 3) { ! printUsage(); ! } ! dbname = args[1]; if (args[args.length - 1].charAt(0) == '-') { --- 258,329 ---- ! if (args.length != 3) { ! printUsage(); ! } ! dbname = args[1]; ! ! Connection connection; ! ! /* Put a check in here to make the db exists, and if ! * if doesn't exist, create it. ! */ ! String URL2 = "jdbc:mysql://" ! + "localhost" ! + ":" ! + "3306" ! + "/" ! //+ dbname ! + "?user=" ! + "root" ! + "&password=" ! + ""; ! try { ! // The newInstance() call is a work around for some ! // broken Java implementations ! Class.forName("org.gjt.mm.mysql.Driver").newInstance(); ! } ! catch (Exception E) { ! System.err.println("Unable to load driver."); ! E.printStackTrace(); ! } ! ! try { ! connection = DriverManager.getConnection(URL2, "root", ""); ! System.out.println("Connection with null database."); ! Statement stmt = connection.createStatement(); ! //try { ! stmt.executeUpdate("create database " + dbname); ! stmt.executeUpdate("use " + dbname); ! stmt.executeUpdate(location_table); ! stmt.executeUpdate(current_table); ! stmt.executeUpdate(cumulative_table); ! stmt.executeUpdate(range_table); ! ! //} catch (Exception e) { ! //e.printStackTrace(); ! //} ! } catch (SQLException e) { ! System.out.println("We are not connecting here..."); ! int error = e.getErrorCode(); ! e.printStackTrace(); ! ! if (error == 1049) { ! System.out.println("1049: Unknown database specified"); ! } ! ! if (error == 1007) { ! System.out.println("1007: Database exists..."); ! } ! ! ! } ! ! /* ! catch (Exception e) { ! e.printStackTrace(); ! } ! */ if (args[args.length - 1].charAt(0) == '-') { *************** *** 284,288 **** listener.read(); } catch (Exception e) { ! e.printStackTrace(); } } --- 357,361 ---- listener.read(); } catch (Exception e) { ! e.printStackTrace(); } } |
From: David M. D. <do...@us...> - 2004-09-28 23:59:19
|
Update of /cvsroot/firebug/firebug/project/java/src/org/firebug/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19340/java/src/org/firebug/database Modified Files: MysqlDBHandler.java Log Message: java listening code now supports creating a database from the command line. Index: MysqlDBHandler.java =================================================================== RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/database/MysqlDBHandler.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MysqlDBHandler.java 11 Mar 2004 23:52:01 -0000 1.11 --- MysqlDBHandler.java 28 Sep 2004 23:59:01 -0000 1.12 *************** *** 244,251 **** int error = e.getErrorCode(); if (error == 1049) { ! System.out.println("Bad database specified"); } ! e.printStackTrace(); } catch (Exception e) { --- 244,252 ---- int error = e.getErrorCode(); + if (error == 1049) { ! System.out.println("Unknown database specified"); } ! //e.printStackTrace(); } catch (Exception e) { |
From: David M. D. <do...@us...> - 2004-09-24 00:16:45
|
Update of /cvsroot/firebug/firebug/doc/sensor_interface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22961 Modified Files: sensor_interface.tex Log Message: Added some notes on sensors. Index: sensor_interface.tex =================================================================== RCS file: /cvsroot/firebug/firebug/doc/sensor_interface/sensor_interface.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sensor_interface.tex 29 Jun 2004 00:26:27 -0000 1.2 --- sensor_interface.tex 24 Sep 2004 00:16:36 -0000 1.3 *************** *** 707,710 **** --- 707,735 ---- \end{itemize} + \subsection{Recommendations} + + \begin{itemize} + + \item Better error reporting. If a sensor quits, + it would be helpful to shut it down in the software, + such that the software could operate as if the + sensor were ``unplugged'' from the sensorboard. + The HLSensor interface could be really helpful here, + especially if there was some hardware support for it. + + + \item Small amount of flash on the sensor board, + enough to store UUID and serial number. It would + be nice (actually, it will be essential in the + future) to be able to query the board to find out + it's capabilities, and all this could be burnt + into flash (or whatever). + + \item External serial number on board. It's really + hard to keep track of working versus non-working + boards. + + + \end{itemize} |
From: David M. D. <do...@us...> - 2004-09-15 01:34:24
|
Update of /cvsroot/firebug/firebug/project/src/sensordata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14642 Modified Files: xbow.h Log Message: Fixing problem with mig destroying header files. Index: xbow.h =================================================================== RCS file: /cvsroot/firebug/firebug/project/src/sensordata/xbow.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** xbow.h 30 Aug 2004 16:48:47 -0000 1.5 --- xbow.h 15 Sep 2004 01:34:16 -0000 1.6 *************** *** 0 **** --- 1,88 ---- + + typedef struct XSensorMTS400Data1 { + uint16_t battery; + uint16_t humidity; + uint16_t temp; + + uint16_t cal_word1; //!< Pressure calibration word 1 + uint16_t cal_word2; //!< Pressure calibration word 2 + uint16_t cal_word3; //!< Pressure calibration word 3 + uint16_t cal_word4; //!< Pressure calibration word 4 + uint16_t intersematemp; + uint16_t intersemapressure; + + uint16_t taosch0; + uint16_t taosch1; + + uint16_t accel_x; + } XSensorMTS400Data1; + + + enum { + AM_XSENSORMTS400DATA1 = 137 + }; + + + typedef struct XSensorMTS420GPSData { + uint8_t hours; //Hours + uint8_t minutes;//Minutes + uint8_t Lat_deg;//Latitude degrees + uint8_t Long_deg;//Longitude degrees + uint32_t dec_sec;//Decimal seconds + uint32_t Lat_dec_min;//Latitude decimal minutes + uint32_t Long_dec_min;//Longitude decimal minutes + uint8_t NSEWind;//NSEWind + uint8_t Fixed; // as to whether the packet is valid(i.e. has the gps Fixed on to the sattelites). + + } XSensorMTS420GPSData; + + enum { + AM_XSENSORMTS420GPSDATA = 138 + }; + + + typedef struct Weather1 { + uint16_t battery; + uint16_t humidity; + uint16_t temp; + + uint16_t intersematemp; + + //uint16_t cal_word1; //!< Pressure calibration word 1 + //uint16_t cal_word2; //!< Pressure calibration word 2 + //uint16_t cal_word3; //!< Pressure calibration word 3 + //uint16_t cal_word4; //!< Pressure calibration word 4 + + uint32_t fintersematemp; + uint32_t fintersemapressure; + uint32_t lux; + + uint16_t intersemapressure; + + uint16_t accel_x; + } Weather1; + + + enum { + AM_WEATHER1 = 139 + }; + + + typedef struct GPS1 { + + uint8_t hours; //Hours + uint8_t minutes;//Minutes + uint8_t Lat_deg;//Latitude degrees + uint8_t Long_deg;//Longitude degrees + uint32_t dec_sec;//Decimal seconds + uint32_t Lat_dec_min;//Latitude decimal minutes + uint32_t Long_dec_min;//Longitude decimal minutes + uint8_t NSEWind;//NSEWind + uint8_t Fixed; // as to whether the packet is valid(i.e. has the gps Fixed on to the sattelites). + uint8_t num_sats; + } GPS1; + + + enum { + AM_GPS1 = 140 + }; |
From: David M. D. <do...@us...> - 2004-09-14 23:38:08
|
Update of /cvsroot/firebug/firebug/project/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27185/project/java Modified Files: mhrun.sh Log Message: Fixed nmea includes. Index: mhrun.sh =================================================================== RCS file: /cvsroot/firebug/firebug/project/java/mhrun.sh,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mhrun.sh 19 Feb 2004 17:41:53 -0000 1.10 --- mhrun.sh 14 Sep 2004 23:37:59 -0000 1.11 *************** *** 37,40 **** echo ".\\dist\\firebug.jar;$COMMJAR;$MYSQLJAR;$MSGPATH" ! java -cp ".\\dist\\firebug.jar;$COMMJAR;$MYSQLJAR;$MSGPATH" \ org.firebug.ListenFB -e $1 COM1 --- 37,40 ---- echo ".\\dist\\firebug.jar;$COMMJAR;$MYSQLJAR;$MSGPATH" ! java -cp "$CLASSPATH;.\\dist\\firebug.jar;$COMMJAR;$MYSQLJAR;$MSGPATH" \ org.firebug.ListenFB -e $1 COM1 |
From: David M. D. <do...@us...> - 2004-09-14 23:38:08
|
Update of /cvsroot/firebug/fireboard/apps/TestNMEA In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27185/fireboard/apps/TestNMEA Modified Files: Makefile TestNMEAM.nc Log Message: Fixed nmea includes. Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/apps/TestNMEA/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 30 Aug 2004 20:39:20 -0000 1.1 --- Makefile 14 Sep 2004 23:37:59 -0000 1.2 *************** *** 1,7 **** --- 1,9 ---- COMPONENT=TestNMEA MTS420CA = $(HOME)/sf.net/firebug/fireboard + NMEA_PATH = -I$(HOME)/sf.net/tinyos-1.x/contrib/ucbce/tos/lib/NMEA FIREBOARD_PATH = -I$(MTS420CA)/interfaces/ FIREBOARD_PATH += -I$(MTS420CA)/sensors/leadtek9546 LOCAL_PATH += $(FIREBOARD_PATH) + LOCAL_PATH += $(NMEA_PATH) PFLAGS := $(LOCAL_PATH) $(PFLAGS) #$(LOCAL_DEFINES) include $(TOSROOT)/apps/Makerules Index: TestNMEAM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/apps/TestNMEA/TestNMEAM.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestNMEAM.nc 31 Aug 2004 13:24:55 -0000 1.3 --- TestNMEAM.nc 14 Sep 2004 23:37:59 -0000 1.4 *************** *** 10,14 **** ! includes nmea_parse; --- 10,14 ---- ! includes NMEA; |
From: David M. D. <do...@us...> - 2004-09-14 23:38:08
|
Update of /cvsroot/firebug/fireboard/interfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27185/fireboard/interfaces Modified Files: NMEA.nc Log Message: Fixed nmea includes. Index: NMEA.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/interfaces/NMEA.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NMEA.nc 31 Aug 2004 13:31:38 -0000 1.2 --- NMEA.nc 14 Sep 2004 23:37:59 -0000 1.3 *************** *** 14,18 **** */ ! includes nmea_parse; interface NMEA { --- 14,18 ---- */ ! includes NMEA; interface NMEA { |
From: John-Michael W. <jm...@us...> - 2004-08-31 23:37:36
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12537 Modified Files: .cvsignore Log Message: Modified MySQL connection to use included configuration. Index: .cvsignore =================================================================== RCS file: /cvsroot/firebug/firebug/web/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 11 Jul 2003 16:11:44 -0000 1.1 --- .cvsignore 31 Aug 2004 23:37:27 -0000 1.2 *************** *** 1 **** --- 1,2 ---- *~ *.dvi *.log *.aux *.bbl *.blg + mysql_config.php |
From: John-Michael W. <jm...@us...> - 2004-08-31 23:36:44
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12364 Modified Files: db_create.php db_drop.php db_dropdb.php db_list_component.php db_list_databases.php db_select.php db_table_buttons.php db_table_select.php db_write_file.php Log Message: Modified MySQL connection to use included configuration. Index: db_create.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_create.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** db_create.php 7 Jul 2004 19:24:54 -0000 1.15 --- db_create.php 31 Aug 2004 23:36:30 -0000 1.16 *************** *** 27,33 **** */ ! $statement = "create database if not exists $dbname;"; ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); mysql_query($statement) or die("Error: ".mysql_error()." in creating database"); --- 27,34 ---- */ ! $statement = "create database if not exists $dbname;"; ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); mysql_query($statement) or die("Error: ".mysql_error()." in creating database"); *************** *** 49,54 **** uint8_t Long_deg; float Long_dec_min; ! uint8_t NSEWind; ! uint8_t num_sats; } GGAMsg; */ --- 50,55 ---- uint8_t Long_deg; float Long_dec_min; ! uint8_t NSEWind; ! uint8_t num_sats; } GGAMsg; */ *************** *** 93,97 **** print "<br />"; print $statement; ! mysql_query($statement) or die("Error: ".mysql_error()." in inserting current atable"); } ?> --- 94,98 ---- print "<br />"; print $statement; ! mysql_query($statement) or die("Error: ".mysql_error()." in inserting current atable"); } ?> Index: db_table_buttons.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_table_buttons.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_table_buttons.php 30 Mar 2004 23:27:14 -0000 1.1 --- db_table_buttons.php 31 Aug 2004 23:36:31 -0000 1.2 *************** *** 7,11 **** print("Choose different table: "); ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); $dblink=mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); --- 7,12 ---- print("Choose different table: "); ! include("mysql_config.php"); ! mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); $dblink=mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); Index: db_write_file.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_write_file.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_write_file.php 11 Feb 2004 00:05:24 -0000 1.1 --- db_write_file.php 31 Aug 2004 23:36:31 -0000 1.2 *************** *** 8,12 **** <head> <title>FireBug Client</title> ! <META HTTP-EQUIV="Refresh" CONTENT="30;URL=http://localhost/firebug/db_write_file.php"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> --- 8,12 ---- <head> <title>FireBug Client</title> ! <META HTTP-EQUIV="Refresh" CONTENT="30;URL=http://localhost/firebug/db_write_file.php"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> *************** *** 35,39 **** if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; ! $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } --- 35,39 ---- if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; ! $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } *************** *** 74,78 **** ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); --- 74,79 ---- ! include("mysql_config.php"); ! mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); *************** *** 152,156 **** ! do { fputs($inside_fp,$row["mote_id"]." "); --- 153,157 ---- ! do { fputs($inside_fp,$row["mote_id"]." "); *************** *** 177,181 **** // System call ! `"C:/gp373w32/pgnuplot.exe < ./test.gnu"`; echo "<img src=\"test.png\">"; --- 178,182 ---- // System call ! `"C:/gp373w32/pgnuplot.exe < ./test.gnu"`; echo "<img src=\"test.png\">"; *************** *** 203,207 **** ! do { print ("<tr>"); --- 204,208 ---- ! do { print ("<tr>"); Index: db_select.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_select.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** db_select.php 14 Jul 2004 22:46:48 -0000 1.7 --- db_select.php 31 Aug 2004 23:36:31 -0000 1.8 *************** *** 26,30 **** ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); $dblink=mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); --- 26,31 ---- ! include("mysql_config.php"); ! mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); $dblink=mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); *************** *** 47,51 **** print ("</td>"); ! print ("<td>"); print ("<input type=radio name=tbl1 value=\"" . htmlspecialchars($row[0]) . "\">"); print ("</td>"); --- 48,52 ---- print ("</td>"); ! print ("<td>"); print ("<input type=radio name=tbl1 value=\"" . htmlspecialchars($row[0]) . "\">"); print ("</td>"); *************** *** 65,71 **** <br /> ! <!-- ! Add links to go back to the firebug home page running on the ! current server, and to the database admin page running on the current server. --> --- 66,72 ---- <br /> ! <!-- ! Add links to go back to the firebug home page running on the ! current server, and to the database admin page running on the current server. --> Index: db_dropdb.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_dropdb.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db_dropdb.php 15 May 2003 00:02:58 -0000 1.2 --- db_dropdb.php 31 Aug 2004 23:36:31 -0000 1.3 *************** *** 20,25 **** <hr /> <?php ! $statement = "drop database if exists $dbname"; ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); mysql_query($statement) or die("Error: ".mysql_error()." in dropping database"); ?> --- 20,26 ---- <hr /> <?php ! $statement = "drop database if exists $dbname"; ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); mysql_query($statement) or die("Error: ".mysql_error()." in dropping database"); ?> Index: db_list_databases.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_list_databases.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_list_databases.php 11 May 2004 23:24:09 -0000 1.1 --- db_list_databases.php 31 Aug 2004 23:36:31 -0000 1.2 *************** *** 6,11 **** <?php ! $dblink=mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); ! $arr = array(1 => "mysql", 2 => "test"); --- 6,12 ---- <?php ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); ! $arr = array(1 => "mysql", 2 => "test"); *************** *** 13,17 **** while ($row = mysql_fetch_object($db_list)) { ! $var=$row->Database; $flag=false; --- 14,18 ---- while ($row = mysql_fetch_object($db_list)) { ! $var=$row->Database; $flag=false; *************** *** 21,30 **** } ! if($flag==false){ print ("<tr><td>"); print $var; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$var\">"); print ("</td>"); --- 22,31 ---- } ! if($flag==false){ print ("<tr><td>"); print $var; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$var\">"); print ("</td>"); Index: db_drop.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_drop.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db_drop.php 22 May 2003 19:07:27 -0000 1.2 --- db_drop.php 31 Aug 2004 23:36:31 -0000 1.3 *************** *** 23,27 **** <?php ! $dblink=mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); /* Add the names of other databases here. */ --- 23,28 ---- <?php ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); /* Add the names of other databases here. */ *************** *** 36,40 **** print $dbname; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$dbname\">"); print ("</td>"); --- 37,41 ---- print $dbname; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$dbname\">"); print ("</td>"); *************** *** 48,52 **** while ($row = mysql_fetch_object($db_list)) { ! $dbname=$row->Database; if (in_array($dbname,$system_dbs)) { --- 49,53 ---- while ($row = mysql_fetch_object($db_list)) { ! $dbname=$row->Database; if (in_array($dbname,$system_dbs)) { Index: db_list_component.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_list_component.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_list_component.php 1 Apr 2004 14:58:10 -0000 1.1 --- db_list_component.php 31 Aug 2004 23:36:31 -0000 1.2 *************** *** 12,17 **** <?php ! $dblink=mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); ! $arr = array(1 => "mysql", 2 => "test"); --- 12,18 ---- <?php ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); ! $arr = array(1 => "mysql", 2 => "test"); *************** *** 19,23 **** while ($row = mysql_fetch_object($db_list)) { ! $var=$row->Database; $flag=false; --- 20,24 ---- while ($row = mysql_fetch_object($db_list)) { ! $var=$row->Database; $flag=false; *************** *** 27,36 **** } ! if($flag==false){ print ("<tr><td>"); print $var; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$var\">"); print ("</td>"); --- 28,37 ---- } ! if($flag==false){ print ("<tr><td>"); print $var; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$var\">"); print ("</td>"); Index: db_table_select.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_table_select.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** db_table_select.php 14 Jul 2004 22:46:48 -0000 1.10 --- db_table_select.php 31 Aug 2004 23:36:31 -0000 1.11 *************** *** 10,14 **** <title>FireBug Client</title> <!-- ! <META HTTP-EQUIV="Refresh" CONTENT="30;URL=http://localhost/firebug/db_table_select.php"> --> --- 10,14 ---- <title>FireBug Client</title> <!-- ! <META HTTP-EQUIV="Refresh" CONTENT="30;URL=http://localhost/firebug/db_table_select.php"> --> *************** *** 37,41 **** if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; ! $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } --- 37,41 ---- if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; ! $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } *************** *** 58,66 **** <?php ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); ! $statement = "show columns from $tblname;"; $columns = mysql_query($statement) or die("Error: ".mysql_error()." getting columns"); --- 58,67 ---- <?php ! include("mysql_config.php"); ! mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); ! $statement = "show columns from $tblname;"; $columns = mysql_query($statement) or die("Error: ".mysql_error()." getting columns"); *************** *** 83,87 **** ! $statement = "select * from $tblname"; $result = mysql_query($statement); --- 84,88 ---- ! $statement = "select * from $tblname"; $result = mysql_query($statement); *************** *** 95,103 **** } ! // Print every row. if ($row = mysql_fetch_row($result)) { // for each row ! do { // For each column... print ("<tr>"); --- 96,104 ---- } ! // Print every row. if ($row = mysql_fetch_row($result)) { // for each row ! do { // For each column... print ("<tr>"); |
From: David M. D. <do...@us...> - 2004-08-31 13:31:47
|
Update of /cvsroot/firebug/fireboard/interfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27477 Modified Files: NMEA.nc Log Message: Added header comments to code. Index: NMEA.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/interfaces/NMEA.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NMEA.nc 30 Aug 2004 20:33:52 -0000 1.1 --- NMEA.nc 31 Aug 2004 13:31:38 -0000 1.2 *************** *** 3,6 **** --- 3,15 ---- /** * Interface for defining behavior of NMEA - 0183 parser. + * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ + * */ |
From: David M. D. <do...@us...> - 2004-08-31 13:31:21
|
Update of /cvsroot/firebug/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27327 Modified Files: ggaparse.c gllparse.c gsaparse.c gsvparse.c leadtek_9546.c mssparse.c nmea_parse.c nmea_parse.h nmea_parse_private.h nmea_parse_test.c nsew.c packer.c rmcparse.c vtgparse.c Log Message: Added header comments to code. Index: gsaparse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/gsaparse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gsaparse.c 30 Aug 2004 17:03:38 -0000 1.1 --- gsaparse.c 31 Aug 2004 13:31:10 -0000 1.2 *************** *** 1,3 **** ! #include <stdio.h> --- 1,12 ---- ! /** ! * ! * This code is part of the NSF-ITR funded ! * FireBug project: ! * @url http://firebug.sourceforge.net ! * ! * @author David M. Doolin ! * ! * $Id$ ! */ #include <stdio.h> Index: gsvparse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/gsvparse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gsvparse.c 30 Aug 2004 17:02:58 -0000 1.1 --- gsvparse.c 31 Aug 2004 13:31:10 -0000 1.2 *************** *** 1,3 **** --- 1,14 ---- + /** + * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ + * + */ Index: packer.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/packer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** packer.c 30 Aug 2004 17:02:58 -0000 1.1 --- packer.c 31 Aug 2004 13:31:10 -0000 1.2 *************** *** 1,2 **** --- 1,14 ---- + /** + * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ + * + */ + // Some macros for packing floats into uint16s Index: nmea_parse_test.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/nmea_parse_test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nmea_parse_test.c 30 Aug 2004 21:37:48 -0000 1.2 --- nmea_parse_test.c 31 Aug 2004 13:31:10 -0000 1.3 *************** *** 1,3 **** ! #include <stdio.h> #include <string.h> --- 1,13 ---- ! /** ! * ! * This code is part of the NSF-ITR funded ! * FireBug project: ! * @url http://firebug.sourceforge.net ! * ! * @author David M. Doolin ! * ! * $Id$ ! * ! */ #include <stdio.h> #include <string.h> Index: rmcparse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/rmcparse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rmcparse.c 30 Aug 2004 17:02:58 -0000 1.1 --- rmcparse.c 31 Aug 2004 13:31:10 -0000 1.2 *************** *** 1,3 **** ! #include <stdio.h> --- 1,13 ---- ! /** ! * ! * This code is part of the NSF-ITR funded ! * FireBug project: ! * @url http://firebug.sourceforge.net ! * ! * @author David M. Doolin ! * ! * $Id$ ! * ! */ #include <stdio.h> Index: nsew.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/nsew.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nsew.c 30 Aug 2004 17:02:58 -0000 1.1 --- nsew.c 31 Aug 2004 13:31:10 -0000 1.2 *************** *** 1,2 **** --- 1,14 ---- + /** + * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ + * + */ + /* Check out what bit masking does to certain chars. */ Index: ggaparse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/ggaparse.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ggaparse.c 30 Aug 2004 21:37:48 -0000 1.2 --- ggaparse.c 31 Aug 2004 13:31:10 -0000 1.3 *************** *** 1,2 **** --- 1,11 ---- + /** + * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ #include <stdio.h> Index: nmea_parse.h =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/nmea_parse.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nmea_parse.h 30 Aug 2004 21:37:48 -0000 1.2 --- nmea_parse.h 31 Aug 2004 13:31:10 -0000 1.3 *************** *** 1,3 **** ! #ifndef NMEA_PARSE_H --- 1,13 ---- ! /** ! * ! * This code is part of the NSF-ITR funded ! * FireBug project: ! * @url http://firebug.sourceforge.net ! * ! * @author David M. Doolin ! * ! * $Id$ ! * ! */ #ifndef NMEA_PARSE_H Index: mssparse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/mssparse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mssparse.c 30 Aug 2004 17:02:58 -0000 1.1 --- mssparse.c 31 Aug 2004 13:31:10 -0000 1.2 *************** *** 1,3 **** --- 1,15 ---- + /** + * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ + * + */ + #include <stdio.h> #include <stdlib.h> Index: nmea_parse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/nmea_parse.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nmea_parse.c 30 Aug 2004 21:37:48 -0000 1.2 --- nmea_parse.c 31 Aug 2004 13:31:10 -0000 1.3 *************** *** 1,3 **** ! #include <stdio.h> --- 1,13 ---- ! /** ! * ! * This code is part of the NSF-ITR funded ! * FireBug project: ! * @url http://firebug.sourceforge.net ! * ! * @author David M. Doolin ! * ! * $Id$ ! * ! */ #include <stdio.h> Index: leadtek_9546.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/leadtek_9546.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** leadtek_9546.c 30 Aug 2004 17:01:23 -0000 1.4 --- leadtek_9546.c 31 Aug 2004 13:31:10 -0000 1.5 *************** *** 1,3 **** ! #include <stdio.h> --- 1,12 ---- ! /** ! * This code is part of the NSF-ITR funded ! * FireBug project: ! * @url http://firebug.sourceforge.net ! * ! * @author David M. Doolin ! * ! * $Id$ ! * ! */ #include <stdio.h> Index: gllparse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/gllparse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gllparse.c 30 Aug 2004 17:02:58 -0000 1.1 --- gllparse.c 31 Aug 2004 13:31:10 -0000 1.2 *************** *** 1,3 **** --- 1,14 ---- + /** + * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ + + #include <stdio.h> #include <stdlib.h> Index: vtgparse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/vtgparse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vtgparse.c 30 Aug 2004 17:02:58 -0000 1.1 --- vtgparse.c 31 Aug 2004 13:31:10 -0000 1.2 *************** *** 1,3 **** ! #include <stdio.h> --- 1,13 ---- ! /** ! * This code is part of the NSF-ITR funded ! * FireBug project: ! * @url http://firebug.sourceforge.net ! * ! * @author David M. Doolin ! * ! * $Id$ ! * ! * ! */ #include <stdio.h> Index: nmea_parse_private.h =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/nmea_parse_private.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nmea_parse_private.h 30 Aug 2004 21:38:25 -0000 1.1 --- nmea_parse_private.h 31 Aug 2004 13:31:10 -0000 1.2 *************** *** 1,3 **** ! #ifndef NMEA_PARSE_PRIVATE_H --- 1,13 ---- ! /** ! * ! * This code is part of the NSF-ITR funded ! * FireBug project: ! * @url http://firebug.sourceforge.net ! * ! * @author David M. Doolin ! * ! * $Id$ ! * ! */ #ifndef NMEA_PARSE_PRIVATE_H |
From: David M. D. <do...@us...> - 2004-08-31 13:25:09
|
Update of /cvsroot/firebug/fireboard/apps/TestNMEA In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26196 Modified Files: NMEAC.nc NMEAM.nc TestNMEA.nc TestNMEAM.nc Log Message: Added header comments to code. Index: NMEAC.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/apps/TestNMEA/NMEAC.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NMEAC.nc 30 Aug 2004 20:39:20 -0000 1.1 --- NMEAC.nc 31 Aug 2004 13:24:54 -0000 1.2 *************** *** 3,6 **** --- 3,14 ---- /** * Configuration for NMEA - 0183 parser. + * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ */ Index: NMEAM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/apps/TestNMEA/NMEAM.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NMEAM.nc 30 Aug 2004 21:40:11 -0000 1.2 --- NMEAM.nc 31 Aug 2004 13:24:55 -0000 1.3 *************** *** 4,7 **** --- 4,11 ---- * Module for parsing NMEA - 0183 sentences. * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * * @author David M. Doolin * Index: TestNMEAM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/apps/TestNMEA/TestNMEAM.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestNMEAM.nc 30 Aug 2004 21:40:11 -0000 1.2 --- TestNMEAM.nc 31 Aug 2004 13:24:55 -0000 1.3 *************** *** 1,2 **** --- 1,11 ---- + /** + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ + */ Index: TestNMEA.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/apps/TestNMEA/TestNMEA.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestNMEA.nc 30 Aug 2004 20:39:20 -0000 1.1 --- TestNMEA.nc 31 Aug 2004 13:24:55 -0000 1.2 *************** *** 1,3 **** --- 1,16 ---- + /** + * Test application for NMEA gps parsing code. + * + * This code is part of the NSF-ITR funded + * FireBug project: + * @url http://firebug.sourceforge.net + * + * @author David M. Doolin + * + * $Id$ + */ + + configuration TestNMEA { |
From: David M. D. <do...@us...> - 2004-08-30 21:40:20
|
Update of /cvsroot/firebug/fireboard/apps/TestNMEA In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv884 Modified Files: NMEAM.nc TestNMEAM.nc Log Message: NMEA parsing and testing framework defined, some of the code implemented. The GGA code is useful right now. Index: TestNMEAM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/apps/TestNMEA/TestNMEAM.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestNMEAM.nc 30 Aug 2004 20:39:20 -0000 1.1 --- TestNMEAM.nc 30 Aug 2004 21:40:11 -0000 1.2 *************** *** 8,11 **** --- 8,16 ---- provides interface StdControl; + provides { + command result_t test_gga_parse(const char * gga_string); + command result_t test_gll_parse(const char * gll_string); + } + uses { interface NMEA as nmea; *************** *** 20,25 **** ! const char gga_string[] = {"$GPGGA,231622.994,3751.3086,N,12216.5235,W,1,09,1.1,-4.5,M,,,,0000*30"}; ! const char gll_string[] = {"$GPGLL,3723.2475,N,12158.3416,W,161229.487,A*2C"}; const char gsa_string[] = {"$GPGSA,A,3,07,02,26,27,09,04,15,,,,,,1.8,1.0,1.5*33"}; const char gsv_string1[] = {"$GPGSV,2,1,07,07,79,048,42,02,51,062,43,26,36,256,42,27,27,138,42,*71"}; --- 25,30 ---- ! const char gga_string1[] = {"$GPGGA,231622.994,3751.3086,N,12216.5235,W,1,09,1.1,-4.5,M,,,,0000*30"}; ! const char gll_string1[] = {"$GPGLL,3723.2475,N,12158.3416,W,161229.487,A*2C"}; const char gsa_string[] = {"$GPGSA,A,3,07,02,26,27,09,04,15,,,,,,1.8,1.0,1.5*33"}; const char gsv_string1[] = {"$GPGSV,2,1,07,07,79,048,42,02,51,062,43,26,36,256,42,27,27,138,42,*71"}; *************** *** 35,39 **** command result_t StdControl.start() { ! // Default test passes. uint8_t result = 1; GGA_Data gga_data; --- 40,57 ---- command result_t StdControl.start() { ! result_t result; ! result = call test_gga_parse(gga_string1); ! result *= call test_gll_parse(gll_string1); ! return result; ! } ! ! command result_t StdControl.stop() { ! return SUCCESS; ! } ! ! ! command result_t test_gga_parse(const char * gga_string) { ! ! // Default: test passes. uint8_t result = 1; GGA_Data gga_data; *************** *** 55,60 **** } ! command result_t StdControl.stop() { ! return SUCCESS; } --- 73,82 ---- } ! /** @todo Implement the test code here. */ ! command result_t test_gll_parse(const char * gll_string) { ! ! GLL_Data gll_data; ! //call nmea.gll_parse(&gll_data, gll_string); ! return FAIL; } Index: NMEAM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/apps/TestNMEA/NMEAM.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NMEAM.nc 30 Aug 2004 20:39:20 -0000 1.1 --- NMEAM.nc 30 Aug 2004 21:40:11 -0000 1.2 *************** *** 5,8 **** --- 5,10 ---- * * @author David M. Doolin + * + * $Id$ */ *************** *** 19,25 **** #define extract_Long_dec_min_m(data) (10*(data[3]-'0') + (data[4]-'0') + 0.1*(data[6]-'0') \ + 0.01*(data[7]-'0') + 0.001*(data[8]-'0') + 0.0001*(data[9]-'0')) ! #define NS_m(foo) ((foo[28]=='N') ? 1 : 0) ! #define EW_m(foo) ((foo[41]=='W') ? 1 : 0) ! #define extract_NSEWind_m(foo) ((EW_m(foo)) | ((NS_m(foo))<<4)) --- 21,27 ---- #define extract_Long_dec_min_m(data) (10*(data[3]-'0') + (data[4]-'0') + 0.1*(data[6]-'0') \ + 0.01*(data[7]-'0') + 0.001*(data[8]-'0') + 0.0001*(data[9]-'0')) ! #define GGA_NS_m(foo) ((foo[28]=='N') ? 1 : 0) ! #define GGA_EW_m(foo) ((foo[41]=='W') ? 1 : 0) ! #define extract_GGA_NSEWind_m(foo) ((GGA_EW_m(foo)) | ((GGA_NS_m(foo))<<4)) *************** *** 38,41 **** --- 40,54 ---- } + /** Uses hard-wired offsets because the LeadTek will return two sizes of + * strings. The first size is when there not enough satellites, so we can + * return directly. The second is when there are enough satellites, in + * which case the fields are fixed. + * + * If this turns out to be "broken", it would not be much more + * complicated to find the offset for each by counting commas, + * because the number of fields is fixed. In any case, this is + * much faster than stuffing everything into an array as it is + * done now in the MTS420 driver code. + */ command result_t NMEA.gga_parse (GGA_Data * ggad, const char * gga_string) { *************** *** 71,81 **** ggad->Long_dec_min = extract_Long_dec_min_m(data); ! ggad->NSEWind = extract_NSEWind_m(gga_string); return SUCCESS; } command result_t NMEA.gll_parse (GLL_Data * gll_data, const char * gll_string) { ! return FAIL; } --- 84,126 ---- ggad->Long_dec_min = extract_Long_dec_min_m(data); ! ggad->NSEWind = extract_GGA_NSEWind_m(gga_string); return SUCCESS; } + command result_t NMEA.gll_parse (GLL_Data * gll_data, const char * gll_string) { ! ! const char * data; ! enum {GLL_LAT_DEG = 7, ! GLL_NS_IND = 17, ! GLL_LONG_DEG = 19, ! GLL_EW_IND = 30, ! GLL_HOURS = 32, ! GLL_STATUS = 43}; ! ! #define GLL_NS_m(foo) ((foo[GLL_NS_IND]=='N') ? 1 : 0) ! #define GLL_EW_m(foo) ((foo[GLL_EW_IND]=='W') ? 1 : 0) ! #define extract_GLL_NSEWind_m(foo) ((GLL_EW_m(foo)) | ((GLL_NS_m(foo))<<4)) ! ! data = &gll_string[GLL_LAT_DEG]; ! gll_data->Lat_deg = extract_Lat_deg_m(data); ! gll_data->Lat_dec_min = extract_Lat_dec_min_m(data); ! ! data = &gll_string[GLL_LONG_DEG]; ! gll_data->Long_deg = extract_Long_deg_m(data); ! gll_data->Long_dec_min = extract_Long_dec_min_m(data); ! ! data = &gll_string[GLL_HOURS]; ! gll_data->hours = extract_hours_m(data); ! gll_data->minutes = extract_minutes_m(data); ! gll_data->dec_sec = extract_dec_sec_m(data); ! ! ! gll_data->status = gll_string[GLL_STATUS]; ! ! gll_data->NSEWind = extract_GLL_NSEWind_m(gll_string); ! ! return SUCCESS; } |
From: David M. D. <do...@us...> - 2004-08-30 21:38:34
|
Update of /cvsroot/firebug/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv573 Added Files: nmea_parse_private.h Log Message: Private header with prototypes for testing. --- NEW FILE: nmea_parse_private.h --- #ifndef NMEA_PARSE_PRIVATE_H #define NMEA_PARSE_PRIVATE_H uint8_t nmea_get_type (const char * nmeastring); GGA_Data * nmea_gga_new (void); GLL_Data * nmea_gll_new (void); GSA_Data * nmea_gsa_new (void); GSV_Data * nmea_gsv_new (void); RMC_Data * nmea_rmc_new (void); VTG_Data * nmea_vtg_new (void); MSS_Data * nmea_mss_new (void); void nmea_gga_delete (GGA_Data * gga_data); void nmea_gll_delete (GLL_Data * gll_data); void nmea_gsa_delete (GSA_Data * gsa_data); void nmea_gsv_delete (GSV_Data * gsv_data); void nmea_rmc_delete (RMC_Data * rmc_data); void nmea_vtg_delete (VTG_Data * vtg_data); void nmea_mss_delete (MSS_Data * mss_data); GGA_Data * nmea_gga_parse (const char * gga_string); GLL_Data * nmea_gll_parse (const char * gll_string); GSA_Data * nmea_gsa_parse (const char * gsa_string); GSV_Data * nmea_gsv_parse (const char * gsv_string); RMC_Data * nmea_rmc_parse (const char * rmc_string); VTG_Data * nmea_vtg_parse (const char * vtg_string); MSS_Data * nmea_mss_parse (const char * mss_string); void nmea_gga_print (const GGA_Data * gga_data); void nmea_gll_print (const GLL_Data * gll_data); void nmea_gsa_print (const GSA_Data * gsa_data); void nmea_gsv_print (const GSV_Data * gsv_data); void nmea_mss_print (const MSS_Data * mss_data); int test_gga_parse (void); int test_gll_parse (void); int test_gsa_parse (void); int test_gsv_parse (void); int test_rmc_parse (void); int test_vtg_parse (void); int test_mss_parse (void); #endif /* NMEA_PARSE_PRIVATE_H */ |
From: David M. D. <do...@us...> - 2004-08-30 21:37:57
|
Update of /cvsroot/firebug/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv440 Modified Files: ggaparse.c leadtek_9546.h nmea_parse.c nmea_parse.h nmea_parse_test.c Log Message: Moved some defines around, trying to fix a problem with the macros for nmea parsing. Index: nmea_parse_test.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/nmea_parse_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nmea_parse_test.c 30 Aug 2004 17:01:23 -0000 1.1 --- nmea_parse_test.c 30 Aug 2004 21:37:48 -0000 1.2 *************** *** 5,8 **** --- 5,10 ---- #include "nmea_parse.h" + #include "nmea_parse_private.h" + *************** *** 12,15 **** --- 14,19 ---- int passed = 0; + int r = 1; + char * gga_string = "$GPGGA,231622.994,3751.3086,N,12216.5235,W,1,09,1.1,-4.5,M,,,,0000*30"; GGA_Data * gga_data = nmea_gga_new(); //(GGA_Data*)malloc(sizeof(GGA_Data)); *************** *** 31,34 **** --- 35,44 ---- result = memcmp((const void*)gga_parsed,(const void*)(gga_data),sizeof(GGA_Data)); + + r *= (gga_data->num_sats==8); + r *= (gga_data->num_sats==9); + printf ("Result mults: %d\n",r); + + /* nmea_gga_print(gga_data); *************** *** 37,40 **** --- 47,52 ---- */ + + if (result == 0) { printf("Passed nmea_gga_parse\n"); Index: nmea_parse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/nmea_parse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nmea_parse.c 30 Aug 2004 17:02:58 -0000 1.1 --- nmea_parse.c 30 Aug 2004 21:37:48 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- #include "nmea_parse.h" + #include "nmea_parse_private.h" /** @brief This is a pretty small struct, should *************** *** 14,18 **** typedef struct nmea_types { char * nmea_type; ! unsigned char tag; } NMEA_Types; --- 15,19 ---- typedef struct nmea_types { char * nmea_type; ! uint8_t tag; } NMEA_Types; *************** *** 28,31 **** --- 29,33 ---- {"RMC", RMC}, {"VTG", VTG}, + {"MSS", MSS}, {NULL, 0 } }; *************** *** 45,49 **** * the nmea sentence. */ ! int nmea_get_type(const char * nmeastring) { --- 47,51 ---- * the nmea sentence. */ ! uint8_t nmea_get_type(const char * nmeastring) { Index: nmea_parse.h =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/nmea_parse.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nmea_parse.h 30 Aug 2004 17:02:58 -0000 1.1 --- nmea_parse.h 30 Aug 2004 21:37:48 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- + #ifndef NMEA_PARSE_H #define NMEA_PARSE_H *************** *** 24,27 **** --- 25,50 ---- */ + /** For various reasons, these have been defined in several + * different places. They should be defined either here, + * or in files specific to the particular GGA sentence under + * consideration. + */ + //#ifndef NMEA_EXTRACTION_MACROS + #define NMEA_EXTRACTION_MACROS + #define extract_num_sats_m(data) (10*(data[0]-'0') + (data[1]-'0')) + #define extract_hours_m(data) (10*(data[0]-'0') + (data[1]-'0')) + #define extract_minutes_m(data) (10*(data[2]-'0') + (data[3]-'0')) + #define extract_dec_sec_m(data) (10*(data[4]-'0') + (data[5]-'0') + 0.1*(data[7]-'0') \ + + 0.01*(data[8]-'0') \ + + 0.001*(data[9]-'0')) + #define extract_Lat_deg_m(data) (10*(data[0]-'0') + (data[1]-'0')) + #define extract_Lat_dec_min_m(data) (10*(data[2]-'0') + (data[3]-'0') + 0.1*(data[5]-'0') \ + + 0.01*(data[6]-'0') + 0.001*(data[7]-'0') + 0.0001*(data[8]-'0')) + #define extract_Long_deg_m(data) (100*(data[0]-'0') + 10*(data[1]-'0') + (data[2]-'0')) + #define extract_Long_dec_min_m(data) (10*(data[3]-'0') + (data[4]-'0') + 0.1*(data[6]-'0') \ + + 0.01*(data[7]-'0') + 0.001*(data[8]-'0') + 0.0001*(data[9]-'0')) + //#endif + + /** @brief These are the most common NMEA-0183 sentences * all of which are available on the LeadTek 9546. *************** *** 94,97 **** --- 117,121 ---- } GGA_Data; + typedef struct gll_data { NMEA_Data nd; *************** *** 171,216 **** - int nmea_get_type (const char * nmeastring); - - - GGA_Data * nmea_gga_new (void); - GLL_Data * nmea_gll_new (void); - GSA_Data * nmea_gsa_new (void); - GSV_Data * nmea_gsv_new (void); - RMC_Data * nmea_rmc_new (void); - VTG_Data * nmea_vtg_new (void); - MSS_Data * nmea_mss_new (void); - - void nmea_gga_delete (GGA_Data * gga_data); - void nmea_gll_delete (GLL_Data * gll_data); - void nmea_gsa_delete (GSA_Data * gsa_data); - void nmea_gsv_delete (GSV_Data * gsv_data); - void nmea_rmc_delete (RMC_Data * rmc_data); - void nmea_vtg_delete (VTG_Data * vtg_data); - void nmea_mss_delete (MSS_Data * mss_data); - - - GGA_Data * nmea_gga_parse (const char * gga_string); - GLL_Data * nmea_gll_parse (const char * gll_string); - GSA_Data * nmea_gsa_parse (const char * gsa_string); - GSV_Data * nmea_gsv_parse (const char * gsv_string); - RMC_Data * nmea_rmc_parse (const char * rmc_string); - VTG_Data * nmea_vtg_parse (const char * vtg_string); - MSS_Data * nmea_mss_parse (const char * mss_string); - - void nmea_gga_print (const GGA_Data * gga_data); - void nmea_gll_print (const GLL_Data * gll_data); - void nmea_gsa_print (const GSA_Data * gsa_data); - void nmea_gsv_print (const GSV_Data * gsv_data); - void nmea_mss_print (const MSS_Data * mss_data); - - int test_gga_parse (void); - int test_gll_parse (void); - int test_gsa_parse (void); - int test_gsv_parse (void); - int test_rmc_parse (void); - int test_vtg_parse (void); - int test_mss_parse (void); - - #endif /* NMEA_PARSE_H */ --- 195,197 ---- Index: ggaparse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/ggaparse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ggaparse.c 30 Aug 2004 17:02:58 -0000 1.1 --- ggaparse.c 30 Aug 2004 21:37:48 -0000 1.2 *************** *** 226,234 **** ! data = &gga_string[7]; ggad->minutes = extract_minutes_m(data); ! data = &gga_string[7]; ggad->dec_sec = extract_dec_sec_m(data); --- 226,234 ---- ! //data = &gga_string[7]; ggad->minutes = extract_minutes_m(data); ! //data = &gga_string[7]; ggad->dec_sec = extract_dec_sec_m(data); *************** *** 238,242 **** ! data = &gga_string[18]; ggad->Lat_dec_min = extract_Lat_dec_min_m(data); --- 238,242 ---- ! //data = &gga_string[18]; ggad->Lat_dec_min = extract_Lat_dec_min_m(data); *************** *** 246,250 **** ! data = &gga_string[30]; ggad->Long_dec_min = extract_Long_dec_min_m(data); --- 246,250 ---- ! //data = &gga_string[30]; ggad->Long_dec_min = extract_Long_dec_min_m(data); Index: leadtek_9546.h =================================================================== RCS file: /cvsroot/firebug/fireboard/sensors/leadtek9546/leadtek_9546.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** leadtek_9546.h 30 Aug 2004 16:58:15 -0000 1.7 --- leadtek_9546.h 30 Aug 2004 21:37:48 -0000 1.8 *************** *** 169,172 **** --- 169,174 ---- // Some useful macros. + #ifndef NMEA_EXTRACTION_MACROS + #define NMEA_EXTRACTION_MACROS #define extract_num_sats_m(data) (10*(data[0]-'0') + (data[1]-'0')) #define extract_hours_m(data) (10*(data[0]-'0') + (data[1]-'0')) *************** *** 181,184 **** --- 183,187 ---- #define extract_Long_dec_min_m(data) (10*(data[3]-'0') + (data[4]-'0') + 0.1*(data[6]-'0') \ + 0.01*(data[7]-'0') + 0.001*(data[8]-'0') + 0.0001*(data[9]-'0')) + #endif typedef struct GGAMsg { |
From: David M. D. <do...@us...> - 2004-08-30 20:39:31
|
Update of /cvsroot/firebug/fireboard/apps/TestNMEA In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21465 Added Files: .cvsignore Makefile NMEAC.nc NMEAM.nc TestNMEA.nc TestNMEAM.nc Log Message: Added a test for gga parsing. --- NEW FILE: .cvsignore --- build *~ --- NEW FILE: NMEAC.nc --- /** * Configuration for NMEA - 0183 parser. */ configuration NMEAC { provides interface NMEA; } implementation { components NMEAM; NMEA = NMEAM; } --- NEW FILE: TestNMEA.nc --- configuration TestNMEA { } implementation { components Main, NMEAC, TestNMEAM; Main.StdControl -> TestNMEAM; TestNMEAM.nmea -> NMEAC; } --- NEW FILE: Makefile --- COMPONENT=TestNMEA MTS420CA = $(HOME)/sf.net/firebug/fireboard FIREBOARD_PATH = -I$(MTS420CA)/interfaces/ FIREBOARD_PATH += -I$(MTS420CA)/sensors/leadtek9546 LOCAL_PATH += $(FIREBOARD_PATH) PFLAGS := $(LOCAL_PATH) $(PFLAGS) #$(LOCAL_DEFINES) include $(TOSROOT)/apps/Makerules --- NEW FILE: NMEAM.nc --- /** * Module for parsing NMEA - 0183 sentences. * * @author David M. Doolin */ #define extract_num_sats_m(data) (10*(data[0]-'0') + (data[1]-'0')) #define extract_hours_m(data) (10*(data[0]-'0') + (data[1]-'0')) #define extract_minutes_m(data) (10*(data[2]-'0') + (data[3]-'0')) #define extract_dec_sec_m(data) (10*(data[4]-'0') + (data[5]-'0') + 0.1*(data[7]-'0') \ + 0.01*(data[8]-'0') \ + 0.001*(data[9]-'0')) #define extract_Lat_deg_m(data) (10*(data[0]-'0') + (data[1]-'0')) #define extract_Lat_dec_min_m(data) (10*(data[2]-'0') + (data[3]-'0') + 0.1*(data[5]-'0') \ + 0.01*(data[6]-'0') + 0.001*(data[7]-'0') + 0.0001*(data[8]-'0')) #define extract_Long_deg_m(data) (100*(data[0]-'0') + 10*(data[1]-'0') + (data[2]-'0')) #define extract_Long_dec_min_m(data) (10*(data[3]-'0') + (data[4]-'0') + 0.1*(data[6]-'0') \ + 0.01*(data[7]-'0') + 0.001*(data[8]-'0') + 0.0001*(data[9]-'0')) #define NS_m(foo) ((foo[28]=='N') ? 1 : 0) #define EW_m(foo) ((foo[41]=='W') ? 1 : 0) #define extract_NSEWind_m(foo) ((EW_m(foo)) | ((NS_m(foo))<<4)) includes nmea_parse; module NMEAM { provides interface NMEA; } implementation { command uint8_t NMEA.get_type (const char * nmeastring) { return 0; } command result_t NMEA.gga_parse (GGA_Data * ggad, const char * gga_string) { int i = 0; int numcommas = 0; int numsats = 0; const char * data; while (numcommas < 7) { if (gga_string[i] == ',') { numcommas++; } i++; } data = &gga_string[i]; numsats = extract_num_sats_m(data); if (numsats < 4) { return FAIL; } ggad->num_sats = numsats; data = &gga_string[7]; ggad->hours = extract_hours_m(data); ggad->minutes = extract_minutes_m(data); ggad->dec_sec = extract_dec_sec_m(data); data = &gga_string[18]; ggad->Lat_deg = extract_Lat_deg_m(data); ggad->Lat_dec_min = extract_Lat_dec_min_m(data); data = &gga_string[30]; ggad->Long_deg = extract_Long_deg_m(data); ggad->Long_dec_min = extract_Long_dec_min_m(data); ggad->NSEWind = extract_NSEWind_m(gga_string); return SUCCESS; } command result_t NMEA.gll_parse (GLL_Data * gll_data, const char * gll_string) { return FAIL; } command result_t NMEA.gsa_parse (GSA_Data * gsa_data, const char * gsa_string) { return FAIL; } command result_t NMEA.gsv_parse (GSV_Data * gsv_data, const char * gsv_string) { return FAIL; } command result_t NMEA.rmc_parse (RMC_Data * rmc_data, const char * rmc_string) { return FAIL; } command result_t NMEA.vtg_parse (VTG_Data * vtg_data, const char * vtg_string) { return FAIL; } command result_t NMEA.mss_parse (MSS_Data * mss_data, const char * mss_string) { return FAIL; } } --- NEW FILE: TestNMEAM.nc --- includes nmea_parse; module TestNMEAM { provides interface StdControl; uses { interface NMEA as nmea; } } implementation { #define SO_DEBUG 1 #include "SODebug.h" #define DBG_USR2 1 const char gga_string[] = {"$GPGGA,231622.994,3751.3086,N,12216.5235,W,1,09,1.1,-4.5,M,,,,0000*30"}; const char gll_string[] = {"$GPGLL,3723.2475,N,12158.3416,W,161229.487,A*2C"}; const char gsa_string[] = {"$GPGSA,A,3,07,02,26,27,09,04,15,,,,,,1.8,1.0,1.5*33"}; const char gsv_string1[] = {"$GPGSV,2,1,07,07,79,048,42,02,51,062,43,26,36,256,42,27,27,138,42,*71"}; const char gsv_string2[] = {"$GPGSV,2,2,07,09,23,313,42,04,19,159,41,15,12,041,42,*41"}; const char mss_string[] = {"$GPMSS,55,27,318.0,100,*66"}; const char vtg_string[] = {"$GPVTG,309.62,T,,M,0.13,N,0.2,K*6E"}; command result_t StdControl.init() { init_debug(); return SUCCESS; } command result_t StdControl.start() { // Default test passes. uint8_t result = 1; GGA_Data gga_data; call nmea.gga_parse(&gga_data, gga_string); // If anyone of the following is incorrect, return FAIL; result *= (gga_data.hours == 23); result *= (gga_data.minutes == 16); result *= (gga_data.dec_sec == 22.994); result *= (gga_data.Lat_deg == 37); result *= (gga_data.Lat_dec_min == 51.3086); result *= (gga_data.Long_deg == 122); result *= (gga_data.Long_dec_min == 16.5235); result *= (gga_data.NSEWind == 17); result *= (gga_data.num_sats == 9); return result; } command result_t StdControl.stop() { return SUCCESS; } } |
From: David M. D. <do...@us...> - 2004-08-30 20:34:46
|
Update of /cvsroot/firebug/fireboard/interfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20480 Added Files: SODebug.h Log Message: Added Michael Newman's SODebug --- NEW FILE: SODebug.h --- // printf style output for debugging // // Copyright (c) 2004 by Sensicast, Inc. // All rights including that of resale granted to Crossbow, Inc. // // Permission to use, copy, modify, and distribute this software and its // documentation for any purpose, without fee, and without written // agreement is hereby granted, provided that the above copyright // notice, the (updated) modification history and the author appear in // all copies of this source code. // // Permission is also granted to distribute this software under the // standard BSD license as contained in the TinyOS distribution. // // @Author: Michael Newman // #ifndef SOdebugEdit #define SOdebugEdit 1 // // Modification History: // 25Jan04 MJNewman 1: Created. #include <stdarg.h> //turn off debug output by default #ifndef SO_DEBUG #define SO_DEBUG 0 #endif // Assume we are not a dot by default #ifndef SO_DEBUG_DOT #define SODEBUG_DOT 0 #endif // Most of this module is off unless enabled #if (SO_DEBUG) //#include <stdio.h> // This varaiable is shared by many possible users of SOdebug. // The rest of the code is duplicated!. bool debugStarted; static const char hex[] = "0123456789ABCDEF"; #if (!SO_DEBUG_DOT) //init comm port (57.6K baud, mica2 only, use 19K baud for mica2dot, mica....) for debug // TinyOS is using 57.6K and seems to reset the baud rate periodically. // Use only 57.6K baud unless TinyOS is sorted out. static void init_debug(){ atomic { outp(0,UBRR0H); #if 1 // 56K with 0% error clock is 7.3728Mhz outp(15, UBRR0L); //set baud rate outp((1<<U2X),UCSR0A); // Set UART double speed #else // 19.K with 0% error clock is 7.3728Mhz outp(47, UBRR0L); //set baud rate outp((1<<U2X),UCSR0A); // Set UART double speed #endif outp(((1 << UCSZ1) | (1 << UCSZ0)) , UCSR0C); // Set frame format: 8 data-bits, 1 stop-bit inp(UDR0); outp((1 << TXEN) ,UCSR0B); // Enable uart reciever and transmitter } } #else //init comm port (19K baud) for mica2dot for debug static void init_debug(){ atomic { outp(0,UBRR0H); // Set baudrate to 19.2 KBps outp(12, UBRR0L); outp(0,UCSR0A); // Disable U2X and MPCM outp(((1 << UCSZ1) | (1 << UCSZ0)) , UCSR0C); inp(UDR0); outp((1 << TXEN) ,UCSR0B); } } #endif // output a char to the uart void UARTPutChar(char c) { if (c == '\n') { loop_until_bit_is_set(UCSR0A, UDRE); outb(UDR0,'\r'); loop_until_bit_is_set(UCSR0A, TXC); }; loop_until_bit_is_set(UCSR0A, UDRE); outb(UDR0,c); loop_until_bit_is_set(UCSR0A, TXC); return; } // Simplified printf int printf(const uint8_t *format, ...) { uint8_t format_flag; uint32_t u_val=0; uint32_t div_val; uint8_t base; uint8_t *ptr; bool longNumber = FALSE; va_list ap; va_start (ap, format); if (!debugStarted) { init_debug(); debugStarted = 1; }; if (format == NULL) format = "NULL\n"; for (;;) /* Until full format string read */ { if (!longNumber) { // Assume char after %l is d or xX while ((format_flag = *format++) != '%') /* Until '%' or '\0' */ { if (!format_flag) { return 0; // not bothering with count of chars output }; UARTPutChar(format_flag); }; }; switch (format_flag = *format++) { case 'c': format_flag = va_arg(ap, int); default: UARTPutChar(format_flag); continue; case 'S': case 's': ptr = va_arg(ap,char *); while (format_flag = *ptr++) { UARTPutChar(format_flag); }; continue; #if 0 case 't': { #define SECONDS_IN_ONE_DAY 86400 base = 10; if (currentSeconds/86400) {//print days div_val = 10000; u_val = currentSeconds/SECONDS_IN_ONE_DAY; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(' '); UARTPutChar('d'); UARTPutChar('a'); UARTPutChar('y'); UARTPutChar('s'); UARTPutChar(' '); } // //hours div_val = 10; u_val = (currentSeconds % 86400)/3600; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(':'); // //minutes div_val = 10; u_val = (INT16)((currentSeconds % 86400)%3600)/60; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(':'); // //seconds div_val = 10; u_val = (INT16)(currentSeconds%60); do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); } continue; #endif // 't' time output case 'l': longNumber = TRUE; continue; case 'o': base = 8; if (!longNumber) div_val = 0x8000; else div_val = 0x40000000; goto CONVERSION_LOOP; case 'u': case 'i': case 'd': base = 10; if (!longNumber) div_val = 10000; else div_val = 1000000000; goto CONVERSION_LOOP; case 'x': base = 16; if (!longNumber) div_val = 0x1000; else div_val = 0x10000000; CONVERSION_LOOP: { if (!longNumber) u_val = va_arg(ap,int); else u_val = va_arg(ap,long); if ((format_flag == 'd') || (format_flag == 'i')) { bool isNegative; if (!longNumber) isNegative = (((int)u_val) < 0); else isNegative = (((long)u_val) < 0); if (isNegative) { u_val = - u_val; UARTPutChar('-'); }; while (div_val > 1 && div_val > u_val) { div_val /= 10; }; } // truncate signed values to a 16 bits for hex output if ((format_flag == 'x') && (!longNumber)) u_val &= 0xffff; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); longNumber = FALSE; }; break; }; }; } #endif // SO_DEBUG #define SO_NO_DEBUG 0 #if (SO_DEBUG) #define SODbg(__x,__args...) { \ char bStatus; \ if(__x != SO_NO_DEBUG){ \ bStatus=bit_is_set(SREG,7); \ cli(); \ printf(__args); \ if (bStatus) sei(); \ }; \ } #else #define SODbg(__x,__args...) #endif #endif //SOdebugEdit |