Sunday, March 4, 2012

Sun., Mar. 4th

Decided to spend some time today getting the latest server code changes to compile, and exercise them a little bit by mocking up some of the expected CTU behavior through UwTerminal.  For reference, here is the transcript from the start of the most recent run:


----------------------------------------------------------------------
At Fri Mar 02 16:25:49 2012 + 432 ms opened node0.uart.trnscr transcript...


Fri Mar 02 16:25:54 2012 + 321 ms: < 
Fri Mar 02 16:25:54 2012 + 323 ms: < HOST_STARTING,CTU_GPS,1.9
Fri Mar 02 16:25:54 2012 + 332 ms: < HOST_READY
Fri Mar 02 16:25:56 2012 +  62 ms: < $ACK,WIFI_READY*60
Fri Mar 02 16:25:56 2012 + 369 ms: < $GPRMC,212556.000,A,3025.675,N,08417.096,W,0.2,0.0,020312,4.1,W*6F
Fri Mar 02 16:25:56 2012 + 370 ms: < $GPGGA,212556.000,3025.67532,N,08417.09555,W,1,04,3.3,083.30,M,-29.7,M,,*53
Fri Mar 02 16:25:56 2012 + 372 ms: < $PDMETRAIM,2,0,0.000000000,0,0,0,0,0,0,0,0,0,0,0,0,0*43
Fri Mar 02 16:25:56 2012 + 374 ms: < $PDMEPOSHOLD,0,0000.000,N,00000.000,E,000.00*4A
Fri Mar 02 16:25:56 2012 + 664 ms: < $ACK,GPS $PDME,1*24
Fri Mar 02 16:25:58 2012 + 111 ms: < $PDMEHEADER1: DeLORME GPS2058_HW_1.0.1
Fri Mar 02 16:25:58 2012 + 115 ms: < $PDMEHEADER2: DeLORME GPS2058_FW_2.0.1
Fri Mar 02 16:25:58 2012 + 155 ms: < $GPTXT,COSMICi Custom_Config_0.0.3
Fri Mar 02 16:25:59 2012 +  28 ms: < $GPGGA,212558.749,3025.67523,N,08417.09543,W,0,00,99.0,083.67,M,-29.7,M,,*67
Fri Mar 02 16:25:59 2012 +  29 ms: < $PDMETRAIM,2,0,0.000000000,0,0,0,0,0,0,0,0,0,0,0,0,0*43
Fri Mar 02 16:25:59 2012 +  30 ms: < $PDMEPOSHOLD,0,0000.000,N,00000.000,E,000.00*4A

OK, code compiles (after fixing one minor syntax error).  Now exercising with the following mock_CTU_output.txt file, going thru fixing runtime errors...

HOST_STARTING,CTU_GPS,1.9
HOST_READY
$ACK,WIFI_STARTING,v0.19*67
$ACK,WIFI_READY*60
$GPRMC,212556.000,A,3025.675,N,08417.096,W,0.2,0.0,020312,4.1,W*6F
$GPGGA,212556.000,3025.67532,N,08417.09555,W,1,04,3.3,083.30,M,-29.7,M,,*53
$PDMETRAIM,2,0,0.000000000,0,0,0,0,0,0,0,0,0,0,0,0,0*43
$PDMEPOSHOLD,0,0000.000,N,00000.000,E,000.00*4A

OK, now I get the following transcript:

----------------------------------------------------------------------
At Sun Mar 04 16:12:00 2012 + 437 ms opened node0.uart.trnscr transcript...

Sun Mar 04 16:12:27 2012 + 406 ms: < HOST_STARTING,CTU_GPS,1.9
Sun Mar 04 16:12:27 2012 + 421 ms: < HOST_READY
Sun Mar 04 16:12:27 2012 + 453 ms: < $ACK,WIFI_STARTING,v0.19*67
Sun Mar 04 16:12:27 2012 + 453 ms: < $ACK,WIFI_READY*60
Sun Mar 04 16:12:27 2012 + 468 ms: < $GPRMC,212556.000,A,3025.675,N,08417.096,W,0.2,0.0,020312,4.1,W*6F
Sun Mar 04 16:12:27 2012 + 484 ms: > HOST GPS $PDME,9,30.428236,-84.285,40,2012,3,4,21,12,27.468
Sun Mar 04 16:12:27 2012 + 484 ms: < $GPGGA,212556.000,3025.67532,N,08417.09555,W,1,04,3.3,083.30,M,-29.7,M,,*53
Sun Mar 04 16:12:27 2012 + 500 ms: < $PDMETRAIM,2,0,0.000000000,0,0,0,0,0,0,0,0,0,0,0,0,0*43
Sun Mar 04 16:12:27 2012 + 500 ms: < $PDMEPOSHOLD,0,0000.000,N,00000.000,E,000.00*4A

and the following in the console:

|------------------------------------------------------------|
|  Node 0 log started.                                      |
|VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV|
Node 0 reports its MAC address is 00:1E:3D:33:FE:0D.
Node 0 turned on at Sun Mar 04 16:12:00 2012 + 359 ms.
Starting AUXIO server for node 0 on port 52737...
Starting UART server for node 0 on port 63766...
Node 0 reports that its bridging mode has changed to NONE.
Node 0's bridge mode is now NONE.
Node 0 reports that its bridging mode has changed to TREFOIL.
Node 0's bridge mode is now TREFOIL.
Node #0's host (type CTU_GPS, firmware version 1.9) is starting up...
Node #0's host is ready to accept commands.
 WARNING: GPS_Manager._checkTime(): GPS time is more than 10 seconds behind system time.

This is correct as far as it goes, since the time in the file is indeed out of date, so it is appropriate that the server responds with a $PDME,9 command to attempt to correct the time.

OK, now the test input file includes a fake $PDME,9,OK acknowledgement:

HOST_STARTING,CTU_GPS,1.9
HOST_READY
$ACK,WIFI_STARTING,v0.19*67
$ACK,WIFI_READY*60
$GPRMC,212556.000,A,3025.675,N,08417.096,W,0.2,0.0,020312,4.1,W*6F
$GPGGA,212556.000,3025.67532,N,08417.09555,W,1,04,3.3,083.30,M,-29.7,M,,*53
$PDMETRAIM,2,0,0.000000000,0,0,0,0,0,0,0,0,0,0,0,0,0*43
$PDMEPOSHOLD,0,0000.000,N,00000.000,E,000.00*4A
$PDME,9,OK

and produces this UART transcript:

----------------------------------------------------------------------
At Sun Mar 04 16:32:53 2012 + 890 ms opened node0.uart.trnscr transcript...

Sun Mar 04 16:33:07 2012 + 156 ms: < HOST_STARTING,CTU_GPS,1.9
Sun Mar 04 16:33:07 2012 + 171 ms: < HOST_READY
Sun Mar 04 16:33:07 2012 + 187 ms: < $ACK,WIFI_STARTING,v0.19*67
Sun Mar 04 16:33:07 2012 + 203 ms: < $ACK,WIFI_READY*60
Sun Mar 04 16:33:07 2012 + 203 ms: < $GPRMC,212556.000,A,3025.675,N,08417.096,W,0.2,0.0,020312,4.1,W*6F
Sun Mar 04 16:33:07 2012 + 203 ms: > HOST GPS $PDME,9,30.428236,-84.285,40,2012,3,4,21,33,7.203
Sun Mar 04 16:33:07 2012 + 218 ms: < $GPGGA,212556.000,3025.67532,N,08417.09555,W,1,04,3.3,083.30,M,-29.7...
Sun Mar 04 16:33:07 2012 + 218 ms: < $PDMETRAIM,2,0,0.000000000,0,0,0,0,0,0,0,0,0,0,0,0,0*43
Sun Mar 04 16:33:07 2012 + 218 ms: < $PDMEPOSHOLD,0,0000.000,N,00000.000,E,000.00*4A
Sun Mar 04 16:33:07 2012 + 218 ms: < $PDME,9,OK

and this console output:

|------------------------------------------------------------|
|  Node 0 log started.                                       |
|VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV|
Node 0 reports its MAC address is 00:1E:3D:33:FE:0D.
Node 0 turned on at Sun Mar 04 16:32:53 2012 + 796 ms.
Starting AUXIO server for node 0 on port 52737...
Starting UART server for node 0 on port 63766...
Node 0 reports that its bridging mode has changed to NONE.
Node 0's bridge mode is now NONE.
Node 0 reports that its bridging mode has changed to TREFOIL.
Node 0's bridge mode is now TREFOIL.
Node #0's host (type CTU_GPS, firmware version 1.9) is starting up...
Node #0's host is ready to accept commands.
 WARNING: GPS_Manager._checkTime(): GPS time is more than 10 seconds behind system time.
The GPS module is receiving signals from 4 satellites.
Heartbeat #1 received from node 0 at Sun Mar 04 16:34:07 2012 + 296 ms.

So now it is also correctly parsing the number of satellites out of the GPGGA message.

Further testing will be difficult without the real GPS module in place, since the initialization algorithm's behavior depends on the timing of responses from the GPS module, which is difficult to emulate by manually streaming text to the Wi-Fi board using UwTerminal.  So, we'll just wait to do further testing until in lab tomorrow when we can just test with the real GPS module.

No comments:

Post a Comment