public void SetupBasePos(ICommsSerial port, MyPointLatLngAlt basepos, int surveyindur = 0, double surveyinacc = 0, bool disable = false, bool movingbase = false) { if (movingbase) { disable = true; } System.Threading.Thread.Sleep(100); System.Threading.Thread.Sleep(100); if (surveyindur == 0) { surveyindur = 60; } if (surveyinacc == 0) { surveyinacc = 2; } if (disable) { var packet = generate(0x6, 0x71, ubx_cfg_tmode3.Disable); port.Write(packet, 0, packet.Length); return; } if (basepos == MyPointLatLngAlt.Zero) { // survey in config var packet = generate(0x6, 0x71, new ubx_cfg_tmode3((uint)surveyindur, surveyinacc)); port.Write(packet, 0, packet.Length); } else { byte[] data = new ubx_cfg_tmode3(basepos.Lat, basepos.Lng, basepos.Alt); var packet = generate(0x6, 0x71, data); port.Write(packet, 0, packet.Length); } }
public MyPointLatLngAlt(MyPointLatLngAlt point) { Lng = point.Lng; Lat = point.Lat; Alt = point.Alt; }