yy1717
2022-12-08 f7a18ec4494b9c5c9ef3fd440bbf68ffc6425e18
lib/src/main/cpp/rtk_module/rtk.h
@@ -5,6 +5,10 @@
#ifndef RTKDRIVERTEST_RTK_H
#define RTKDRIVERTEST_RTK_H
#include <string>
#include <sstream>
#include "../utils/num.h"
typedef struct {
    uint16_t gps_status;
    int YY;
@@ -21,6 +25,21 @@
    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 {
@@ -37,6 +56,20 @@
    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);