|
|
@ -7794,7 +7794,7 @@ void CGISDlg::ShowEditSaveDlg()
|
|
|
|
filename = dlg.GetPathName();
|
|
|
|
filename = dlg.GetPathName();
|
|
|
|
//保存文件
|
|
|
|
//保存文件
|
|
|
|
FILE* fp = fopen(filename,"w");
|
|
|
|
FILE* fp = fopen(filename,"w");
|
|
|
|
fprintf(fp,"%d, 0, %lf, %lf, %.2lf, 0, 00, 03\n", m_editLineDataGroup.lineID, 0.0, 0.0, 0.0);
|
|
|
|
fprintf(fp,"%d, 0, %.7f, %.7f, %.2f, 0, 00, 03\n", m_editLineDataGroup.lineID, 0.0, 0.0, 0.0);
|
|
|
|
int n_linePts = m_editLineDataGroup.pointNum;
|
|
|
|
int n_linePts = m_editLineDataGroup.pointNum;
|
|
|
|
for (int i=1;i<=n_linePts;i++)
|
|
|
|
for (int i=1;i<=n_linePts;i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -7803,22 +7803,22 @@ void CGISDlg::ShowEditSaveDlg()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (circlingPointID==i-1) //盘旋点
|
|
|
|
if (circlingPointID==i-1) //盘旋点
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(fp,"%d, %d, %lf, %lf, %.2lf, 0, 01, 03\n", m_editLineDataGroup.lineID, i, linePt.dX, linePt.dY,linePt.nH);
|
|
|
|
fprintf(fp,"%d, %d, %.7f, %.7f, %.2f, 0, 01, 03\n", m_editLineDataGroup.lineID, i, linePt.dX, linePt.dY,linePt.nH);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(fp,"%d, %d, %lf, %lf, %.2lf, 0, 00, 03\n", m_editLineDataGroup.lineID, i, linePt.dX, linePt.dY,linePt.nH);
|
|
|
|
fprintf(fp,"%d, %d, %.7f, %.7f, %.2f, 0, 00, 03\n", m_editLineDataGroup.lineID, i, linePt.dX, linePt.dY,linePt.nH);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (i==n_linePts-1)
|
|
|
|
else if (i==n_linePts-1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (m_lineSelectedID==11 && g_b981CDesktop) //回收航线
|
|
|
|
if (m_lineSelectedID==11 && g_b981CDesktop) //回收航线
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(fp,"%d, %d, %lf, %lf, %.2lf, 0, 00, 07\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
fprintf(fp,"%d, %d, %.7f, %.7f, %.2f, 0, 00, 07\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(fp,"%d, %d, %lf, %lf, %.2lf, 0, 00, 03\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
fprintf(fp,"%d, %d, %.7f, %.7f, %.2f, 0, 00, 03\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -7826,17 +7826,17 @@ void CGISDlg::ShowEditSaveDlg()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (m_lineSelectedID==11 && g_b981CDesktop) //回收航线
|
|
|
|
if (m_lineSelectedID==11 && g_b981CDesktop) //回收航线
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(fp,"%d, %d, %lf, %lf, %.2lf, 0, 00, 0B\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
fprintf(fp,"%d, %d, %.7f, %.7f, %.2f, 0, 00, 0B\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (linePt.ch1==2) //开合航线
|
|
|
|
if (linePt.ch1==2) //开合航线
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(fp,"%d, %d, %lf, %lf, %.2lf, 0, 02, 01\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
fprintf(fp,"%d, %d, %.7f, %.7f, %.2f, 0, 02, 01\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(fp,"%d, %d, %lf, %lf, %.2lf, 0, 00, 01\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
fprintf(fp,"%d, %d, %.7f, %.7f, %.2f, 0, 00, 01\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -7917,17 +7917,17 @@ void CGISDlg::ShowSaveZoneDlg(double* xPoints,double* yPoints)
|
|
|
|
filename = dlg.GetPathName();
|
|
|
|
filename = dlg.GetPathName();
|
|
|
|
//保存文件
|
|
|
|
//保存文件
|
|
|
|
FILE* fp = fopen(filename,"w");
|
|
|
|
FILE* fp = fopen(filename,"w");
|
|
|
|
fprintf(fp,"%d, 0, %lf, %lf, %.2lf, 0, 00, 03\n", zoneID, 0.0, 0.0, 0.0);
|
|
|
|
fprintf(fp,"%d, 0, %.7f, %.7f, %.2f, 0, 00, 03\n", zoneID, 0.0, 0.0, 0.0);
|
|
|
|
fprintf(fp,"%d, 1, %lf, %lf, %.2lf, 0, 00, 03\n", zoneID, xPoints[0], yPoints[0], height);
|
|
|
|
fprintf(fp,"%d, 1, %.7f, %.7f, %.2f, 0, 00, 03\n", zoneID, xPoints[0], yPoints[0], height);
|
|
|
|
fprintf(fp,"%d, 2, %lf, %lf, %.2lf, 0, 00, 03\n", zoneID, xPoints[1], yPoints[1], height);
|
|
|
|
fprintf(fp,"%d, 2, %.7f, %.7f, %.2f, 0, 00, 03\n", zoneID, xPoints[1], yPoints[1], height);
|
|
|
|
fprintf(fp,"%d, 3, %lf, %lf, %.2lf, 0, 00, 03\n", zoneID, xPoints[2], yPoints[2], height);
|
|
|
|
fprintf(fp,"%d, 3, %.7f, %.7f, %.2f, 0, 00, 03\n", zoneID, xPoints[2], yPoints[2], height);
|
|
|
|
if (zoneType==0) //限飞区
|
|
|
|
if (zoneType==0) //限飞区
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(fp,"%d, 4, %lf, %lf, %.2lf, 0, 0D, 01\n", zoneID, xPoints[3], yPoints[3], height);
|
|
|
|
fprintf(fp,"%d, 4, %.7f, %.7f, %.2f, 0, 0D, 01\n", zoneID, xPoints[3], yPoints[3], height);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (zoneType==1) //禁飞区
|
|
|
|
else if (zoneType==1) //禁飞区
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(fp,"%d, 4, %lf, %lf, %.2lf, 0, 0C, 01\n", zoneID, xPoints[3], yPoints[3], height);
|
|
|
|
fprintf(fp,"%d, 4, %.7f, %.7f, %.2f, 0, 0C, 01\n", zoneID, xPoints[3], yPoints[3], height);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fclose(fp);
|
|
|
|
fclose(fp);
|
|
|
|