QC Control software

Dependencies:   mbed

Fork of dgps by Colin Stearns

Committer:
krobertson
Date:
Tue Apr 22 04:26:31 2014 +0000
Revision:
20:81d5655fecc2
Parent:
15:e3e03a9df89e
Child:
32:9cb7bc3fc9e0
send and receive commands.; waypoint processing; get locationions; send images

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dylanembed123 14:6be57da62283 1 #ifndef _HANDLE_GPS_H_
dylanembed123 14:6be57da62283 2 #define _HANDLE_GPS_H_
dylanembed123 7:c75d5e5e6bfc 3
dylanembed123 7:c75d5e5e6bfc 4 #include "adapt/usb.h"
dylanembed123 9:da906eeac51e 5 #include "adapt/gps.h"
dylanembed123 14:6be57da62283 6
dylanembed123 9:da906eeac51e 7 #include <string>
dylanembed123 9:da906eeac51e 8 #include <sstream>
dylanembed123 14:6be57da62283 9 #include "dataLocation.h"
dylanembed123 14:6be57da62283 10 #include <mbed.h>
dylanembed123 14:6be57da62283 11 #include "gps.h"
krobertson 20:81d5655fecc2 12 #include "packet.h"
dylanembed123 14:6be57da62283 13 #define MAXREADIN 256
dylanembed123 14:6be57da62283 14
krobertson 20:81d5655fecc2 15 typedef struct _Point{
krobertson 20:81d5655fecc2 16 double lat;
krobertson 20:81d5655fecc2 17 double lon;
krobertson 20:81d5655fecc2 18 } Point;
krobertson 20:81d5655fecc2 19
dylanembed123 7:c75d5e5e6bfc 20 class GPSHandle{
dylanembed123 7:c75d5e5e6bfc 21 private:
dylanembed123 14:6be57da62283 22 //GPS gps;
dylanembed123 7:c75d5e5e6bfc 23 bool initialized;
dylanembed123 7:c75d5e5e6bfc 24
dylanembed123 7:c75d5e5e6bfc 25 /// \brief Setup
dylanembed123 7:c75d5e5e6bfc 26 void setup();
dylanembed123 7:c75d5e5e6bfc 27 /// \brief Check if it is time to update
dylanembed123 7:c75d5e5e6bfc 28 bool check();
dylanembed123 7:c75d5e5e6bfc 29 public:
dylanembed123 7:c75d5e5e6bfc 30 /// \brief Constructor
dylanembed123 9:da906eeac51e 31 GPSHandle():initialized(false){}
dylanembed123 9:da906eeac51e 32
dylanembed123 9:da906eeac51e 33 void sendGpsCommand(std::string command);
stearnsc 8:28b866df62cf 34
stearnsc 8:28b866df62cf 35 //handle incoming com from GPS hardware
stearnsc 8:28b866df62cf 36 void handleUpdate();
stearnsc 8:28b866df62cf 37
dylanembed123 7:c75d5e5e6bfc 38 /// \brief Run an instance of this
dylanembed123 7:c75d5e5e6bfc 39 void run();
krobertson 20:81d5655fecc2 40
krobertson 20:81d5655fecc2 41 /// \brief sends the current location
krobertson 20:81d5655fecc2 42 void sendLoc();
krobertson 20:81d5655fecc2 43
krobertson 20:81d5655fecc2 44 /// \brief checks if in image area
krobertson 20:81d5655fecc2 45 bool if_image_location();
krobertson 20:81d5655fecc2 46
krobertson 20:81d5655fecc2 47 /// \brief read in the waypoints
krobertson 20:81d5655fecc2 48 char readWaypoints();
krobertson 20:81d5655fecc2 49
krobertson 20:81d5655fecc2 50 static GPSHandle* hand;
krobertson 20:81d5655fecc2 51 static GPSHandle& getGPSHand(){
krobertson 20:81d5655fecc2 52 if(hand == NULL){
krobertson 20:81d5655fecc2 53 hand = new GPSHandle();
krobertson 20:81d5655fecc2 54 }
krobertson 20:81d5655fecc2 55 return *hand;
krobertson 20:81d5655fecc2 56 }
dylanembed123 7:c75d5e5e6bfc 57 };
dylanembed123 14:6be57da62283 58
dylanembed123 7:c75d5e5e6bfc 59 #endif