« GPS TESTS | Main | SITE ANALYSIS »

GPS DATA

DATA FROM GPS72

I used Tom's code in processing and this is what I got!

GPSdata.jpg

/dev/tty.KeySerial1
/dev/cu.KeySerial1
/dev/tty.Bluetooth-PDA-Sync
/dev/cu.Bluetooth-PDA-Sync
/dev/tty.Bluetooth-Modem
/dev/cu.Bluetooth-Modem


$GPBOD,257.5,T,271.0,M,GARMIN,*58

$GPBWC,232208,3851.3330,N,09447.9410,W,270.0,T,283.4,M,969.963,N,GARMIN,A*67

$GPVTG,262.6,T,276.0,M,0.0,N,0.0,K*4D

$GPXTE,A,A,9.99,R,N,A*14

$PGRME,11.6,M,10.1,M,15.4,M*18

$PGRMZ,237,f,2*1C

$PGRMM,WGS 84*06

$GPRMC,232210,A,4046.6818,N,07355.0011,W,0.0,262.6,220207,13.4,W,A*2D

$GPRMB,A,9.99,R,,GARMIN,3851.3330,N,09447.9410,W,969.962,270.0,,V,A*6E

$GPGGA,232210,4046.6818,N,07355.0011,W,1,03,3.3,72.4,M,-34.0,M,,*4D

$GPGLL,4046.6818,N,07355.0011,W,232210,A,A*50

$GPBOD,257.5,T,271.0,M,GARMIN,*58

$GPBWC,232210,3851.3330,N,09447.9410,W,270.0,T,283.4,M,969.962,N,GARMIN,A*6F

$GPVTG,262.6,T,276.0,M,0.0,N,0.0,K*4D

$GPXTE,A,A,9.99,R,N,A*14

$PGRME,11.6,M,10.1,M,15.4,M*18

$PGRMZ,237,f,2*1C

$PGRMM,WGS 84*06

$GPRMC,232212,A,4046.6812,N,07355.0020,W,0.0,262.6,220207,13.4,W,A*27

$GPRMB,A,9.99,R,,GARMIN,3851.3330,N,09447.9410,W,969.962,270.0,,V,A*6E

$GPGGA,232212,4046.6812,N,07355.0020,W,1,03,3.3,72.4,M,-34.0,M,,*47

$GPGLL,4046.6812,N,07355.0020,W,232212,A,A*5A

$GPBOD,257.5,T,271.0,M,GARMIN,*58

$GPBWC,232212,3851.3330,N,09447.9410,W,270.0,T,283.4,M,969.962,N,GARMIN,A*6D

$GPVTG,262.6,T,276.0,M,0.0,N,0.0,K*4D

$GPXTE,A,A,9.99,R,N,A*14

$PGRME,11.6,M,10.1,M,15.4,M*18

$PGRMZ,237,f,2*1C

$PGRMM,WGS 84*06

$GPRMC,232214,A,4046.6806,N,07355.0029,W,0.0,262.6,220207,13.4,W,A*2D


Then with this code:

// import the serial library:
import processing.serial.*;

float latitude = 0.0; // the latitude reading in degrees
String northSouth; // north or south?
float longitude = 0.0; // the longitude reading in degrees
String eastWest; // east or west?
int linefeed = 10; // linefeed in ASCII
int carriageReturn = 13; // carriage return in ASCII
Serial myPort; // The serial port

void setup() {
// List all the available serial ports
println(Serial.list());

// I know that the first port in the serial list on my mac
// is always my Keyspan adaptor, so I open Serial.list()[0].
// Open whatever port is the one you're using.
myPort = new Serial(this, Serial.list()[2], 4800);

// read bytes into a buffer until you get a carriage return (ASCII 13):
myPort.bufferUntil(carriageReturn);
}

void draw() {
// not doing anything here
}

// serialEvent method is run automatically by the Processing applet
// whenever the buffer reaches the byte value set in the bufferUntil()
// method in the setup():

void serialEvent(Serial myPort) {
// read the serial buffer:
String myString = myPort.readStringUntil(linefeed);
// if you got any bytes other than the linefeed:
if (myString != null) {
// print it:
parseString(myString);
}
}
//Then replace println(myString); above with parseString(myString);
//Then add this method at the end of the program:
void parseString(String serialString) {
// split the string at the commas
//and convert the sections into integers:
String items[] = (split(serialString, ','));
// if the first item in the sentence is our identifier, parse the rest:
if (items[0].equals("$GPGLL") == true) {
// move the items from the string into the variables:
latitude = float(items[1]);
northSouth = items[2];
longitude = float(items[3]);
eastWest = items[4];
println(latitude + northSouth + "," +longitude + eastWest);
}
}

I got somewhat parsed information:

GPSparse.jpg

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
/dev/tty.modem
/dev/cu.modem
/dev/tty.KeySerial1
/dev/cu.KeySerial1
/dev/tty.Bluetooth-PDA-Sync
/dev/cu.Bluetooth-PDA-Sync
/dev/tty.Bluetooth-Modem
/dev/cu.Bluetooth-Modem

RXTX Warning: Removing stale lock file. /var/lock/LK.002.009.006

4046.6887N,7354.9854W
4046.6887N,7354.986W
4046.6887N,7354.986W
4046.6885N,7354.986W
4046.6887N,7354.985W
4046.6887N,7354.984W
4046.6887N,7354.983W
4046.6887N,7354.983W
4046.6885N,7354.9824W
4046.6885N,7354.982W
4046.6887N,7354.982W
4046.6887N,7354.9814W
4046.689N,7354.9814W
4046.6892N,7354.9814W
4046.6895N,7354.9814W
4046.6895N,7354.9814W
4046.6892N,7354.9824W

TrackBack

TrackBack URL for this entry:
http://itp.nyu.edu/~bp432/cgi-bin/mt/mt-tb.cgi/66