添加航点表格

This commit is contained in:
hm
2022-04-25 18:34:32 +08:00
parent 24532b3308
commit 611caec215
10 changed files with 201 additions and 71 deletions
+18 -8
View File
@@ -1828,7 +1828,7 @@ void OPMapWidget::WPLoad(QString path)//带文件目录参数
float param3 = params.at(2).toDouble();
float param4 = params.at(3).toDouble();
int32_t x = params.at(4).toDouble() * 10e6;
int32_t y = params.at(5).toDouble() * 10e6;;
int32_t y = params.at(5).toDouble() * 10e6;
float z = params.at(6).toDouble();
internals::PointLatLng LatLng;
@@ -1844,7 +1844,7 @@ void OPMapWidget::WPLoad(QString path)//带文件目录参数
emit setWPProperty(param1,param2,param3,param4,
x,y,z,
seq,
currentGroup,//当前组
mission_type,//当前组
command,
0,
0,
@@ -1881,14 +1881,24 @@ void OPMapWidget::WPSave(QString path)//带文件目录参数
//geoFence节点写入 mission type == 1,2
{
QJsonArray circles;
QJsonArray polygons;
//判断围栏数量大于0时写入,否则不写
QJsonArray circles;
QJsonArray polygons;
{
QJsonArray polygon;
QJsonObject polygonObj;
polygonObj["inclusion"] = true;
polygonObj["polygon"] = polygon;
polygonObj["version"] = 1;
polygons.append(polygonObj);
geoFence.insert("circles",circles);
geoFence.insert("polygons",polygons);
geoFence.insert("version",2);
}
geoFence.insert("circles",circles);
geoFence.insert("polygons",polygons);
geoFence.insert("version",2);
//mission节点写入 (mission type == 3...)
{