computewaypoints.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef COMPUTEWAYPOINTS_H
  2. #define COMPUTEWAYPOINTS_H
  3. #include <QMutex>
  4. #include <QWaitCondition>
  5. #include <thread>
  6. #include <iostream>
  7. #include "math/gnss_coordinate_convert.h"
  8. #include "gpsimu.pb.h"
  9. #include "mapdata.pb.h"
  10. #include "modulecomm.h"
  11. class ComputeWayPoints
  12. {
  13. public:
  14. ComputeWayPoints();
  15. ~ComputeWayPoints();
  16. private:
  17. iv::gps::gpsimu mgpsimu;
  18. QMutex mMutexgpsimu;
  19. bool mbGPSIMUUpdate = false;
  20. iv::map::tracemap mtracemap;
  21. QMutex mMutexTraceMap;
  22. bool mbHaveMap = false;
  23. QMutex mMutexWait;
  24. QWaitCondition mwc;
  25. bool mbCompute = true;
  26. void ThreadCompute();
  27. std::thread * mpthread;
  28. void ListenGPSIMU(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
  29. void ListenNewTraceMap(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
  30. int FindWayPoints(iv::map::tracemap & xtracemap);
  31. void * mpagpsimu;
  32. void * mpanewtrace;
  33. void * mpawaypoints;
  34. double mfVel = 15.0;
  35. };
  36. #endif // COMPUTEWAYPOINTS_H