private void writeInformation(string settingPath) //将初始化信息写入文件中,待调用SDK接口初始化使用 { squareBoundary overBoundary = radarArea.getSquareBoundary(); FileStream file = new FileStream(settingPath, FileMode.Create, FileAccess.Write); StreamWriter write = new StreamWriter(file); write.WriteLine("[LiDarKeyName]"); write.WriteLine("driverType={0}", (int)connectType.connectType); write.WriteLine("serialPort={0}", connectType.serialPort); write.WriteLine("serialBaudrate={0}", connectType.serialBaudrate); write.WriteLine("intensities={0}", 0); write.WriteLine("exposure={0}", 0); write.WriteLine("heartBeat={0}", 0); write.WriteLine("autoReconnect={0}", 0); write.WriteLine("sampleRate={0}", sampleRate); write.WriteLine("scanFreq={0}", scanFreq); write.WriteLine("MAX_COM={0}", connectType.maxCOM); write.WriteLine("[LiDarRangeKeyName]"); write.WriteLine("Max_x={0}", overBoundary.xMax); write.WriteLine("Min_x={0}", overBoundary.xMin); write.WriteLine("Max_y={0}", overBoundary.yMax); write.WriteLine("Min_y={0}", overBoundary.yMin); write.WriteLine("[LiDarPoseKeyName]"); write.WriteLine("pose_x={0}", radarPosition.radarPositionX); write.WriteLine("pose_y={0}", radarPosition.radarPositionY); write.WriteLine("pose_theta={0}", radarPosition.radarTheta); if (ifReversion) { write.WriteLine("pose_reversion=1"); } else { write.WriteLine("pose_reversion=0"); } write.Close(); file.Close(); }
public squareArea(ref squareArea area) { boundary = area.getSquareBoundary(); }
public squareArea(squareBoundary Boundary) { boundary = Boundary; }