| | |
| | | #ifndef RTKDRIVERTEST_RTK_H |
| | | #define RTKDRIVERTEST_RTK_H |
| | | |
| | | #include <string> |
| | | #include <sstream> |
| | | #include "../utils/num.h" |
| | | |
| | | typedef struct { |
| | | uint16_t gps_status; |
| | | int YY; |
| | |
| | | double altitude; |
| | | double speed; |
| | | double trackTure; |
| | | |
| | | std::string toString(void) { |
| | | std::stringstream sst; |
| | | |
| | | sst<<"GPS:"<<"qf="<<gps_status |
| | | <<" "<<2000+YY<<intw(MM, 2)<<intw(DD, 2)<<intw(hh,2)<<intw(mm, 2)<<intw(ss, 2)<<"."<<intw(mss, 2) |
| | | <<" satNum"<<satNum |
| | | <<" latitude="<<round(latitude, 6) |
| | | <<" longitude="<<round(longitude, 6) |
| | | <<" altitude="<<round(altitude, 3) |
| | | <<" speed="<<round(speed, 3) |
| | | <<" trackTure="<<round(trackTure, 3); |
| | | |
| | | return sst.str(); |
| | | } |
| | | }gpsStatus_t; |
| | | |
| | | typedef struct { |
| | |
| | | double roll; |
| | | double x; |
| | | double y; |
| | | |
| | | std::string toString(void) { |
| | | std::stringstream sst; |
| | | |
| | | sst<<"RTK:"<<"qf="<<qf |
| | | <<" "<<2000+YY<<intw(MM, 2)<<intw(DD, 2)<<intw(hh,2)<<intw(mm, 2)<<intw(ss, 2)<<"."<<intw(dss, 2) |
| | | <<" heading="<<round(heading, 3) |
| | | <<" pitch="<<round(pitch, 3) |
| | | <<" roll="<<round(roll, 3) |
| | | <<" x="<<round(x, 3) |
| | | <<" y="<<round(y, 3); |
| | | |
| | | return sst.str(); |
| | | } |
| | | }rtk_info; |
| | | |
| | | void RtkCommModeSel(int mode); |