From 00c07fb94c6927f3bb8ebfec383a33936f04447b Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期五, 22 五月 2020 19:01:18 +0800
Subject: [PATCH] 坐标
---
lib/src/main/cpp/driver_test.cpp | 165 -------------------------------------------------------
1 files changed, 0 insertions(+), 165 deletions(-)
diff --git a/lib/src/main/cpp/driver_test.cpp b/lib/src/main/cpp/driver_test.cpp
index 233b416..d7ef572 100644
--- a/lib/src/main/cpp/driver_test.cpp
+++ b/lib/src/main/cpp/driver_test.cpp
@@ -65,11 +65,7 @@
static LIST_AREA_MAP AreaMapList;
-static Polygon RoadMapPoints;
static road_exam_map RoadMap;
-
-static LIST_ROAD_MAP RoadMapList;
-
static int exam_dummy_light;
@@ -109,10 +105,6 @@
AreaMapList.clear();
- RoadMapPoints.num = 0;
- RoadMapPoints.point = NULL;
-
-// RoadMapList.clear();
RoadMap.roads.clear();
RoadMap.specialAreas.clear();
RoadMap.triggerLines.clear();
@@ -210,162 +202,6 @@
RoadMap.triggerLines.assign(map.triggerLines.begin(), map.triggerLines.end());
DEBUG("寰楀埌鏂扮殑璺�冨湴鍥� 璺暟閲� %d 鐗规畩鍖哄煙鏁伴噺 %d 瑙﹀彂绾挎暟閲� %d", RoadMap.roads.size(), RoadMap.specialAreas.size(), RoadMap.triggerLines.size());
-}
-
-void SetRoadMapPoints(vector<double> &mapPoints)
-{
- DEBUG("鍔犲叆璺�冨湴鍥剧偣闆嗗悎 num = %d", mapPoints.size()/2);
-
- RoadMapPoints.num = mapPoints.size()/2;
-
- if (RoadMapPoints.num > 0) {
- RoadMapPoints.point = (PointF *)malloc(sizeof(PointF) * RoadMapPoints.num);
- for (int i = 0; i < RoadMapPoints.num; ++i) {
- RoadMapPoints.point[i].X = mapPoints[i*2];
- RoadMapPoints.point[i].Y = mapPoints[i*2+1];
- }
- }
-}
-
-void AddRoadMapParent(int id, int type, string tts, int stopFlag,
- vector<vector<int>> &redLines,
- vector<vector<int>> &redAreas,
- vector<vector<int>> &greenLines,
- vector<vector<int>> &triggerLines,
- vector<vector<int>> &roadEdgeLines,
- vector<int> area,
- vector<int> stopLine)
-{
-/* struct road_exam_map newMap;
-
- newMap.id = id;
- newMap.type = type;
- newMap.tts = tts;
- newMap.flagStop = stopFlag;
-
- DEBUG("鍔犲叆璺�冨湴鍥句俊鎭� id = %d type = %d", id, type);
-
- if (!tts.empty()) {
- DEBUG("TTS 淇℃伅 = %s", tts.c_str());
- }
-
- if ((newMap.redLineNum = redLines.size()) > 0) {
- newMap.redLine = (Polygon *) malloc(sizeof(Polygon) * newMap.redLineNum);
-
- DEBUG("绾㈢嚎 %d 鏍�", newMap.redLineNum);
-
- for (int i = 0; i < newMap.redLineNum; ++i) {
- newMap.redLine[i].num = redLines[i].size();
- newMap.redLine[i].point = (PointF *) malloc(sizeof(PointF) * newMap.redLine[i].num);
-
- DEBUG(" 缁撶偣 %d 涓�", newMap.redLine[i].num);
-
- for (int j = 0; j < newMap.redLine[i].num; ++j) {
- newMap.redLine[i].point[j] = RoadMapPoints.point[redLines[i][j]];
- }
- }
- } else {
- newMap.redLine = NULL;
- }
-
- if ((newMap.redAreaNum = redAreas.size()) > 0) {
- newMap.redArea = (Polygon *) malloc(sizeof(Polygon) * newMap.redAreaNum);
-
- DEBUG("绾㈠尯 %d 涓�", newMap.redAreaNum);
-
- for (int i = 0; i < newMap.redAreaNum; ++i) {
- newMap.redArea[i].num = redAreas[i].size();
- newMap.redArea[i].point = (PointF *) malloc(sizeof(PointF) * newMap.redLine[i].num);
-
- DEBUG(" 缁撶偣 %d 涓�", newMap.redArea[i].num);
-
- for (int j = 0; j < newMap.redArea[i].num; ++j) {
- newMap.redArea[i].point[j] = RoadMapPoints.point[redAreas[i][j]];
- }
- }
- } else {
- newMap.redArea = NULL;
- }
-
- if ((newMap.greenLineNum = greenLines.size()) > 0) {
- newMap.greenLine = (Polygon *) malloc(sizeof(Polygon) * newMap.greenLineNum);
-
- DEBUG("缁跨嚎 %d 鏍�", newMap.greenLineNum);
- for (int i = 0; i < newMap.greenLineNum; ++i) {
- newMap.greenLine[i].num = greenLines[i].size();
- newMap.greenLine[i].point = (PointF *) malloc(sizeof(PointF) * newMap.greenLine[i].num);
-
- DEBUG(" 缁撶偣 %d 涓�", newMap.greenLine[i].num);
- for (int j = 0; j < newMap.greenLine[i].num; ++j) {
- newMap.greenLine[i].point[j] = RoadMapPoints.point[greenLines[i][j]];
- }
- }
- } else {
- newMap.greenLine = NULL;
- }
-
- if ((newMap.triggerLineNum = triggerLines.size()) > 0) {
- newMap.triggerLine = (struct trigger_line_t *) malloc(sizeof(struct trigger_line_t) * newMap.triggerLineNum);
-
- DEBUG("瑙﹀彂绾� %d 鏍�", newMap.triggerLineNum);
-
- for (int i = 0; i < newMap.triggerLineNum; ++i) {
- newMap.triggerLine[i].line.num = triggerLines[i].size() - 1;
- newMap.triggerLine[i].line.point = (PointF *) malloc(sizeof(PointF) * newMap.triggerLine[i].line.num);
-
- DEBUG(" 缁撶偣 %d 涓�, 瑙﹀彂 id = %d", newMap.triggerLine[i].line.num, triggerLines[i][0]);
-
- newMap.triggerLine[i].triggerMapId = triggerLines[i][0];
- for (int j = 0; j < newMap.triggerLine[i].line.num; ++j) {
- newMap.triggerLine[i].line.point[j] = RoadMapPoints.point[triggerLines[i][j+1]];
- }
- }
- } else {
- newMap.triggerLine = NULL;
- }
-
- if ((newMap.roadEdgeLineNum = roadEdgeLines.size()) > 0) {
- newMap.roadEdgeLine = (Polygon *) malloc(sizeof(Polygon) * newMap.roadEdgeLineNum);
-
- DEBUG("閬撹矾杈圭嚎 %d 鏍�", newMap.roadEdgeLineNum);
- for (int i = 0; i < newMap.roadEdgeLineNum; ++i) {
- newMap.roadEdgeLine[i].num = roadEdgeLines[i].size();
- newMap.roadEdgeLine[i].point = (PointF *) malloc(sizeof(PointF) * newMap.roadEdgeLine[i].num);
-
- DEBUG(" 缁撶偣 %d 涓�", newMap.roadEdgeLine[i].num);
- for (int j = 0; j < newMap.roadEdgeLine[i].num; ++j) {
- newMap.roadEdgeLine[i].point[j] = RoadMapPoints.point[roadEdgeLines[i][j]];
- }
- }
- } else {
- newMap.roadEdgeLine = NULL;
- }
-
- if (area.size() > 0) {
- newMap.area.num = area.size();
- newMap.area.point = (PointF *) malloc(sizeof(PointF) * newMap.area.num);
-
- DEBUG("瀛愰」鐩尯鍩熺偣 %d 涓�", newMap.area.num);
- for (int i = 0; i < newMap.area.num; ++i) {
- newMap.area.point[i] = RoadMapPoints.point[area[i]];
- }
- } else {
- newMap.area.point = NULL;
- newMap.area.num = 0;
- }
-
- if (stopLine.size() == 2) {
- newMap.stopLine.X1 = RoadMapPoints.point[stopLine[0]].X;
- newMap.stopLine.Y1 = RoadMapPoints.point[stopLine[0]].Y;
- newMap.stopLine.X2 = RoadMapPoints.point[stopLine[1]].X;
- newMap.stopLine.Y2 = RoadMapPoints.point[stopLine[1]].Y;
- DEBUG("寰楀埌鍋滄绾� (%f,% f) --- (%f, %f)", newMap.stopLine.X1,
- newMap.stopLine.Y1,
- newMap.stopLine.X2,
- newMap.stopLine.Y2);
- }
-
- RoadMapList.push_back(newMap);*/
}
void SetCarMeasurePoint(double *basePoint, int *axial, int *left_front_tire,
@@ -784,7 +620,6 @@
if (ExamType != TEST_TYPE_AREA) {
if (exam_dummy_light == 2) {
-// TestRoadGeneral(RoadMapList, CarModel, CarModelList, speed, move, rtkTime);
TestRoadGeneral(RoadMap, CarModel, CarModelList, speed, move, rtkTime);
}
} else {
--
Gitblit v1.8.0