I took your advice and started pairing back the instructions and found that it works fine if I just take out the last mytok call in this section of code:
if(strcmp(messageID, "GPGGA") == 0)
{
ptr = mytok(time, ptr);
ptr = mytok(latit1, ptr, '.'); //get the first half of latitude
ptr = mytok(latit2, ptr); //get the second half of latitude
ptr = mytok(NS, ptr);
ptr = mytok(longit1, ptr, '.');
ptr = mytok(longit2, ptr);
ptr = mytok(EW, ptr);
ptr = mytok(fixindicator, ptr);
ptr = mytok(satsUsed, ptr);
ptr = mytok(HDOP, ptr);
ptr = mytok(MSLalt, ptr);
ptr = mytok(Geoid, ptr);
ptr = mytok(GeoUnits, ptr); //works fine if I take this out
I also am handling the NULL pointer in the mytok function by just doing this:
ptr = mytok(time, ptr); if(ptr == NULL) {Serial.println("Out1"); return;}
ptr = mytok(latit1, ptr, '.'); if(ptr == NULL) {Serial.println("Out2"); return;}//get the first half of latitude
ptr = mytok(latit2, ptr); if(ptr == NULL) {Serial.println("Out3"); return;}//get the second half of latitude
ptr = mytok(NS, ptr); if(ptr == NULL) {Serial.println("Out4"); return;}
ptr = mytok(longit1, ptr, '.'); if(ptr == NULL) {Serial.println("Out5"); return;}
ptr = mytok(longit2, ptr); if(ptr == NULL) {Serial.println("Out6"); return;}
ptr = mytok(EW, ptr); if(ptr == NULL) {Serial.println("Out7"); return;}
ptr = mytok(fixindicator, ptr); if(ptr == NULL) {Serial.println("Out8"); return;}
ptr = mytok(satsUsed, ptr); if(ptr == NULL) {Serial.println("Out9"); return;}
ptr = mytok(HDOP, ptr); if(ptr == NULL) {Serial.println("Out10"); return;}
ptr = mytok(MSLalt, ptr); if(ptr == NULL) {Serial.println("Out11"); return;}
ptr = mytok(Geoid, ptr); if(ptr == NULL) {Serial.println("Out12"); return;}
//ptr = mytok(GeoUnits, ptr); if(ptr == NULL) {Serial.println("Out13"); return;}
Thanks for your help! Now if I can just figure out why the GPS is telling me that I am about 200 yards from my actual position and walking out in the middle of the water(at least according to google maps).
These are the coordinates from a short walk I took....uploaded them into google maps and apparently I can walk on water:
40.689712,-74.115570
40.689708,-74.115562
40.689701,-74.115539
40.689689,-74.115524
40.689689,-74.115516
40.689685,-74.115501
40.689682,-74.115486
40.689666,-74.115463
40.689659,-74.115447
40.689659,-74.115432
40.689655,-74.115417
40.689643,-74.115402
40.689640,-74.115379
40.689640,-74.115364
40.689640,-74.115348
40.689632,-74.115333
40.689628,-74.115310
40.689620,-74.115295
40.689609,-74.115272
40.689598,-74.115249
40.689586,-74.115226
40.689579,-74.115211
40.689571,-74.115196
40.689563,-74.115180
40.689559,-74.115165
40.689563,-74.115173
40.689579,-74.115196
40.689586,-74.115219
40.689594,-74.115242
40.689598,-74.115257
40.689605,-74.115264
40.689609,-74.115287
40.689613,-74.115303
40.689620,-74.115318
40.689628,-74.115333
40.689632,-74.115356
40.689636,-74.115379
40.689640,-74.115402
40.689647,-74.115432
40.689655,-74.115455
40.689659,-74.115478
40.689666,-74.115501
40.689682,-74.115509
40.689689,-74.115531
40.689697,-74.115554
40.689701,-74.115570
40.689704,-74.115600
40.689716,-74.115608
40.689723,-74.115623
40.689735,-74.115646
40.689743,-74.115661
40.689750,-74.115676
40.689762,-74.115684
40.689769,-74.115707
40.689777,-74.115722
40.689788,-74.115737
40.689796,-74.115760
40.689807,-74.115768
40.689815,-74.115791
40.689830,-74.115798
40.689838,-74.115806
40.689842,-74.115806
40.689842,-74.115791
40.689849,-74.115783
40.689853,-74.115776
40.689857,-74.115768
40.689865,-74.115760