car_status.cpp 419 B

123456789101112131415161718192021222324
  1. #include "car_status.h"
  2. #ifdef linux
  3. unsigned long GetTickCount()
  4. {
  5. struct timespec ts;
  6. clock_gettime(CLOCK_MONOTONIC,&ts);
  7. return (ts.tv_sec * 1000 + ts.tv_nsec/(1000*1000) );
  8. }
  9. #endif
  10. iv::CarStatus::CarStatus()
  11. {
  12. speed = 0;
  13. braking_pressure = 0;
  14. wheel_angle = 0;
  15. location = boost::shared_ptr<iv::GPS_INS>(new iv::GPS_INS);
  16. mRunTime.start();
  17. }
  18. iv::CarStatus::~CarStatus()
  19. {
  20. }