Changeset 51 in flair-src for trunk/lib/FlairSensorActuator/src/SimuGps.cpp
- Timestamp:
- 07/26/16 17:32:57 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/SimuGps.cpp
r15 r51 20 20 #include <string.h> 21 21 #include <GeoCoordinate.h> 22 #include <GpsData.h> 22 23 23 24 using std::string; … … 28 29 29 30 SimuGps::SimuGps(const FrameworkManager *parent, string name, 30 Gps::NMEAFlags_t NMEAFlags, uint8_t priority)31 : Thread(parent, name, priority), Gps(parent, name, NMEAFlags) {}31 NmeaGps::NMEAFlags_t NMEAFlags, uint8_t priority) 32 : Thread(parent, name, priority), NmeaGps(parent, name, NMEAFlags) {} 32 33 33 34 SimuGps::~SimuGps() { … … 37 38 38 39 void SimuGps::Run(void) { 39 char response[200] = {0};40 int size, result;41 40 // double lat=0; 41 char buf[500]; 42 nmeaGPGGA gga; 43 nmeaGPVTG vtg; 42 44 SetPeriodMS(500); 43 45 WarnUponSwitches(true); 44 46 47 gga.sig=1; 48 gga.satinuse=2; 49 gga.lat=49.402313; 50 gga.lon=2.795463; 51 52 vtg.spn=1; 53 vtg.dir=0; 54 45 55 while (!ToBeStopped()) { 46 56 WaitPeriod(); 57 58 nmea_gen_GPGGA(buf,sizeof(buf),&gga); 59 parseFrame(buf,sizeof(buf)); 47 60 position->SetCoordinates(49.402313, 2.795463, 0); 48 61 // lat+=.5;
Note:
See TracChangeset
for help on using the changeset viewer.