| | |
| | | #include "../native-lib.h" |
| | | #include "../jni_log.h" |
| | | #include "road_exam.h" |
| | | #include "../master/comm_if.h" |
| | | #include <cmath> |
| | | |
| | | #define DEBUG(fmt, args...) LOGD("<drive_straight> <%s>: " fmt, __func__, ##args) |
| | |
| | | |
| | | MakeLine(&road_edge, &RoadMapList[index].roadEdgeLine[0].point[0], &RoadMapList[index].roadEdgeLine[0].point[1]); |
| | | |
| | | { |
| | | double l1 = DistanceOf(car->carXY[car->right_front_tire[TIRE_OUTSIDE]], road_edge); |
| | | |
| | | double l2 = DistanceOf(car->carXY[car->right_rear_tire[TIRE_OUTSIDE]], road_edge); |
| | | |
| | | MA_SendDistance(-1, (l1+l2)/2.0); |
| | | } |
| | | |
| | | if (!crossStartLine) { |
| | | PointF p1, p2; |
| | | |