forward

Dependencies:   VNH5019

Fork of AigamozuControlPackets by aigamozu

Revision:
13:a5bc425540a7
Parent:
11:4d71c9cc3b4a
Child:
17:a6fa8cc96d94
diff -r eaab0ccb9255 -r a5bc425540a7 AigamozuControlPackets.h
--- a/AigamozuControlPackets.h	Mon Apr 13 11:33:06 2015 +0000
+++ b/AigamozuControlPackets.h	Mon Apr 20 10:36:16 2015 +0000
@@ -11,7 +11,7 @@
 
 #define vertex2D vector2D
 
-enum COMMAND_TYPE {MANUAL = 'M', STATUS_REQUEST = 'S', CHANGE_MODE = 'C', RECEIVE_STATUS = 'R'};
+enum COMMAND_TYPE {MANUAL = 'M', STATUS_REQUEST = 'S', CHANGE_MODE = 'C', RECEIVE_STATUS = 'R',RECEIVE_KALMAN = 'K'};
 enum MODE {STANDBY_MODE = 0, MANUAL_MODE = 1,AUTO_MODE = 2,AUTO_GPS_MODE = 3};
 enum STATUS {GPS_AVAIL = 0, GPS_UNAVAIL = 1,GPS_OUT_AREA = 2};
 
@@ -41,6 +41,7 @@
     
     //Create Packet: Robot -> Controller/Base 
     void createReceiveStatusCommand(uint8_t fromID,uint8_t toID,long latitudeH,long latitudeL,long longitudeH,long longitudeL);
+    void createReceiveStatusCommandwithKalman(uint8_t fromID,uint8_t toID,long latitudeH,long latitudeL,long longitudeH,long longitudeL);
     //uint8_t* createAckPacket(uint8_t fromID,uint8_t toID);
     
     //using create packet
@@ -61,9 +62,11 @@
     int packetLength;
     
     
+    void reNewRobotPointKalman(long latitudeH,long latitudeL,long longitudeH,long longitudeL);
+    void reNewBasePointKalman(int id, long latitudeH,long latitudeL,long longitudeH,long longitudeL);
     void reNewRobotPoint(long latitudeH,long latitudeL,long longitudeH,long longitudeL);
     void reNewBasePoint(int id, long latitudeH,long latitudeL,long longitudeH,long longitudeL);
-    
+        
     //--------PRIVATE-----------//
     private:
     //
@@ -80,10 +83,12 @@
     void gpsAuto();
     
     vector2D agzPoint;
+    vector2D agzPointKalman;
     vector2D sub_vector( const vector2D& a, const vector2D& b );
     bool checkGpsHit( vertex2D A, vertex2D B, vertex2D C, vertex2D P);
     
     vector2D basePoint[4];
+    vector2D basePointKalman[4];
     
     };