Ignore:
Timestamp:
07/26/16 17:32:57 (8 years ago)
Author:
Sanahuja Guillaume
Message:

gps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/SimuGps.cpp

    r15 r51  
    2020#include <string.h>
    2121#include <GeoCoordinate.h>
     22#include <GpsData.h>
    2223
    2324using std::string;
     
    2829
    2930SimuGps::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) {}
    3233
    3334SimuGps::~SimuGps() {
     
    3738
    3839void SimuGps::Run(void) {
    39   char response[200] = {0};
    40   int size, result;
    4140  // double lat=0;
     41  char buf[500];
     42  nmeaGPGGA gga;
     43  nmeaGPVTG vtg;
    4244  SetPeriodMS(500);
    4345  WarnUponSwitches(true);
    4446
     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
    4555  while (!ToBeStopped()) {
    4656    WaitPeriod();
     57
     58    nmea_gen_GPGGA(buf,sizeof(buf),&gga);
     59    parseFrame(buf,sizeof(buf));
    4760    position->SetCoordinates(49.402313, 2.795463, 0);
    4861    //      lat+=.5;
Note: See TracChangeset for help on using the changeset viewer.