| | |
| | | #include "../utils/num.h" |
| | | #include "../driver_test.h" |
| | | #include "../test_common/car_sensor.h" |
| | | #include "../test_items2/stop_car.h" |
| | | #include "../test_items2/operate_gear.h" |
| | | #include "../test_items2/drive_straight.h" |
| | | #include "../rtk_module/virtual_rtk.h" |
| | | |
| | | #define PARSE_BUFF_SIZE 4096 |
| | |
| | | case GPS_UPDATE_EVT: { |
| | | const gpsStatus_t *gps = (gpsStatus_t *) data; |
| | | |
| | | DEBUG("GPS: %s", const_cast<gpsStatus_t *>(gps)->toString().c_str()); |
| | | // DEBUG("GPS: %s", const_cast<gpsStatus_t *>(gps)->toString().c_str()); |
| | | |
| | | gbf.qf = gps->gps_status; |
| | | gbf.latitude = gps->latitude; |
| | |
| | | uint32_t ost = AppTimer_GetTickCount(); |
| | | uint32_t ost1 = ost; |
| | | |
| | | const rtk_info *rtk = (rtk_info *) data; |
| | | const rtk_info_t *rtk = (rtk_info_t *) data; |
| | | |
| | | DEBUG("RTK: %s", const_cast<rtk_info *>(rtk)->toString().c_str()); |
| | | // DEBUG("RTK: %s", const_cast<rtk_info_t *>(rtk)->toString().c_str()); |
| | | |
| | | rbf.qf = rtk->qf; |
| | | rbf.coord_x = rtk->y; |
| | |
| | | rbf.coord_y_dir = 'E'; |
| | | rbf.rtcm_length = rtcmLength; |
| | | |
| | | sprintf(rbf.utc, "%04d%02d%02d%02d%02d%02d.%02d", 2000 + rtk->YY, rtk->MM, rtk->DD, |
| | | rtk->hh, rtk->mm, rtk->ss, rtk->dss); |
| | | struct TimeStructure ts; |
| | | |
| | | TimeBreakdown(rtk->utc_time / 1000, &ts); |
| | | sprintf(rbf.utc, "%04d%02d%02d%02d%02d%02d.%02d", ts.Year, ts.Month, ts.Day, |
| | | ts.Hour, ts.Minute, ts.Second, (rtk->utc_time % 1000) / 10); |
| | | if (!strcmp(rbf.utc, gbf.utc)) { |
| | | rbf.sat_num = gbf.sat_num; |
| | | rbf.latitude = gbf.latitude; |
| | |
| | | |
| | | ost1 = AppTimer_GetTickCount() - ost1; |
| | | |
| | | UpdateRTKInfo(rtk); |
| | | if (rtk->qf == 3) |
| | | UpdateRTKInfo(rtk); |
| | | |
| | | ost = AppTimer_GetTickCount() - ost; |
| | | |