![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
GPS精度実験
Dependencies: ADXL345 AigamozuControlPackets_2016 HMC5843 ITG3200 MBed_Adafruit-GPS-Library2 XBee2 agzIDLIST_2016 mbed
Diff: main.cpp
- Revision:
- 3:693ea9476763
- Parent:
- 2:575479bf1302
--- a/main.cpp Wed Sep 14 11:03:42 2016 +0000 +++ b/main.cpp Fri Oct 14 07:58:59 2016 +0000 @@ -361,13 +361,13 @@ const int collect_Time = 1000; char SenderIDc; + wait_ms(2000); //GPS Send Command - myGPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCONLY); + myGPS.sendCommand(PMTK_SET_NMEA_OUTPUT_ALLDATA); myGPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); myGPS.sendCommand(PGCMD_ANTENNA); - - wait_ms(2000); - + wait_ms(2000); + //interrupt start refresh_Timer.start(); auto_Timer.start(); @@ -377,6 +377,11 @@ printf("start\n"); agz.auto_count = 0; + + // myGPS.count_[0] = 3; + // myGPS.count_[1] = 3; + // myGPS.count_[2] = 3; + myGPS.print_ok = 0; while (true) { @@ -403,7 +408,7 @@ } case STATUS_REQUEST: { Send_Status(SenderIDc); - printf("%c\n", SenderIDc); + // printf("%c\n", SenderIDc); break; } case CHANGE_MODE: { @@ -422,7 +427,9 @@ }//endifZB_RX_RESPONSE }//endifisAvailable - myGPS.read(); + + myGPS.read(); + //recive gps module //check if we recieved a new message from GPS, if so, attempt to parse it, if ( myGPS.newNMEAreceived() ) { @@ -451,11 +458,11 @@ //一定時間ごとに自分のGPSデータを取得し、AigamozuControlPacketsないのagzPointとagzPointKalmanに格納する - if (refresh_Timer.read_ms() >= 1000){ - refresh_Timer.reset(); +// if (refresh_Timer.read_ms() >= 1000){ + // refresh_Timer.reset(); //print_gps(count); - } + // } }