2015/05/16

Dependencies:   ADXL345 AigamozuControlPackets HMC5843 ITG3200 MBed_Adafruit-GPS-Library XBee agzIDLIST agz_common mbed

Fork of Aigamozu_collect_data by aigamozu

Files at this revision

API Documentation at this revision

Comitter:
s1200058
Date:
Mon May 18 05:29:32 2015 +0000
Parent:
4:a8a0421566d2
Commit message:
see for robot gps

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat May 16 17:25:58 2015 +0000
+++ b/main.cpp	Mon May 18 05:29:32 2015 +0000
@@ -135,14 +135,14 @@
         agz.nowStatus = GPS_AVAIL;
         
         if(flag){//初期値設定
-            if(myGPS->latitudeH>=36 && myGPS->latitudeH<=38 && myGPS->longitudeH>=138 && myGPS->longitudeH<=141){
+            if(myGPS->latitudeH>=36 && myGPS->latitudeH<=38 && myGPS->longitudeH>=138 && myGPS->longitudeH<=140){
                 flag = false;
                 x[0][0]=(double)myGPS->latitudeL;                        
                 x[0][1]=(double)myGPS->longitudeL;   
             } 
         }
         
-        if(myGPS->longitudeH<138 || myGPS->longitudeH>141 || myGPS->latitudeH<36 || myGPS->latitudeH>38){
+        if(myGPS->longitudeH<138 || myGPS->longitudeH>140 || myGPS->latitudeH<36 || myGPS->latitudeH>38){
             return;
         }
         //Kalman Filter
@@ -190,13 +190,13 @@
         agz.reNewBasePointKalman(id,&packetdata[29],&packetdata[37]);
         
         //debug
-        for(int i = 0; i < 1; i++){
-        printf("ROBOT:%d\n",i);
+   //     for(int i = 0; i < 1; i++){
+        printf("ROBOT:%d\n",id);
         printf("status:%d, latitude:%f,longitude:%f\nlatitudeK:%f,longitudeK:%f\n",
-            agz.get_base_status(i), agz.get_basePoint_lati(i),agz.get_basePoint_longi(i),
-            agz.get_basePointKalman_lati(i),agz.get_basePointKalman_longi(i)
+            agz.get_base_status(id), agz.get_basePoint_lati(id),agz.get_basePoint_longi(id),
+            agz.get_basePointKalman_lati(id),agz.get_basePointKalman_longi(id)
             );
-        }
+  //      }
     }
     //基地局からデータが来たとき
     if(SenderIDc >= 'a' && SenderIDc <= 'z'){