yy1717
2020-03-05 51ffd5f72664b286c8273e97f7dc81bca4fff85a
更新地图
1个文件已修改
26 ■■■■ 已修改文件
lib/src/main/cpp/driver_test.cpp 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/driver_test.cpp
@@ -443,7 +443,7 @@
                RtkBuffer[index].mm, RtkBuffer[index].ss, RtkBuffer[index].dss);
        brief.qf = RtkBuffer[index].qf;
        brief.map_id = 863;//GetMapId(CurrExamMapIndex, MapList, MapNum);
        brief.map_id = 867;//GetMapId(CurrExamMapIndex, MapList, MapNum);
        brief.move = move;
        brief.speed = speed * 3.6;
        brief.heading = RtkBuffer[index].heading;
@@ -883,18 +883,18 @@
//                    return i;
//            }
//        }
        if (mapList[i].type == MAP_TYPE_CURVE) {
            Line startLine;
            Line carAxial;
            MakeLine(&startLine, &mapList[i].map.point[0], &mapList[i].map2.point[0]);
            MakeLine(&carAxial, &car->carXY[car->axial[AXIAL_FRONT]], &car->carXY[car->axial[AXIAL_REAR]]);
            if (IntersectionOf(startLine, carAxial) == GM_Intersection) {
                if (DistanceOf(car->carXY[car->axial[AXIAL_FRONT]], startLine) > 0.1)
                    return i;
            }
        }
//        if (mapList[i].type == MAP_TYPE_CURVE) {
//            Line startLine;
//            Line carAxial;
//
//            MakeLine(&startLine, &mapList[i].map.point[0], &mapList[i].map2.point[0]);
//            MakeLine(&carAxial, &car->carXY[car->axial[AXIAL_FRONT]], &car->carXY[car->axial[AXIAL_REAR]]);
//
//            if (IntersectionOf(startLine, carAxial) == GM_Intersection) {
//                if (DistanceOf(car->carXY[car->axial[AXIAL_FRONT]], startLine) > 0.1)
//                    return i;
//            }
//        }
    }
    return -1;
}