예제 #1
0
 private void RTKDataShow(object sender, EventArgs e)
 {
     dataGridView_RTK.Rows[0].Cells["GPStime"].Value      = GPGGA.GetInstance().UTCtime;
     dataGridView_RTK.Rows[0].Cells["Latitude"].Value     = GPGGA.GetInstance().Latitude;
     dataGridView_RTK.Rows[0].Cells["Longitude"].Value    = GPGGA.GetInstance().Longitude;
     dataGridView_RTK.Rows[0].Cells["MsgStatus"].Value    = GPGGA.GetInstance().MsgStatus;
     dataGridView_RTK.Rows[0].Cells["PlanetNum"].Value    = GPGGA.GetInstance().PlanetNum;
     dataGridView_RTK.Rows[0].Cells["DiffCorDelay"].Value = GPGGA.GetInstance().DiffCorDelay;
     dataGridView_RTK.Rows[0].Cells["Yaw"].Value          = HEADINGA.GetInstance().Yaw;
 }
예제 #2
0
        private void RTKDataDecode(string[] dat)
        {
            switch (dat[0])
            {
            case "#HEADINGA":
                if (dat.Length == 26)
                {
                    HEADINGA.GetInstance().Yaw = Convert.ToSingle(dat[12]);;
                }
                break;

            case "$GPGGA":
                if (dat.Length == 15)
                {
                    GPGGA.GetInstance().LogHeader        = dat[0];
                    GPGGA.GetInstance().UTCtime          = Convert.ToSingle(dat[1]);
                    GPGGA.GetInstance().Latitude         = Convert.ToSingle(dat[2]);
                    GPGGA.GetInstance().LatitudeDir      = dat[3];
                    GPGGA.GetInstance().Longitude        = Convert.ToSingle(dat[4]);
                    GPGGA.GetInstance().LongitudeDir     = dat[5];
                    GPGGA.GetInstance().MsgStatus        = (byte)dat[6].ToInt32();
                    GPGGA.GetInstance().PlanetNum        = (byte)dat[7].ToInt32();
                    GPGGA.GetInstance().DopLevel         = dat[8].ToLong();
                    GPGGA.GetInstance().AntennaPlanetNum = dat[9].ToLong();
                    GPGGA.GetInstance().AntennaUnit      = dat[10];
                    GPGGA.GetInstance().SeaPlanetNum     = dat[11].ToLong();
                    GPGGA.GetInstance().SeaUnit          = dat[12];
                    GPGGA.GetInstance().DiffCorDelay     = (byte)dat[13].ToInt32();
                    //GPGGA.GetInstance().ReferenceId        = dat[14];
                    //GPGGA.GetInstance().Crc                = (byte)dat[15].ToInt32();
                }
                break;

            case "$GPRMC":
                break;

            default:
                break;
            }
        }