| | |
| | | int test2() { |
| | | // IndirectAlg indirectAlg({ {{0.0, 0.0}, {1000.0, 0.0}}, {{1000.0, 0.0}, {1000.0, 1000.0}}, {{1000.0, 1000.0}, {0.0, 1000.0}}, {{0.0, 1000.0}, {0.0, 0.0}} }, 5, {1, 1}); |
| | | /** |
| | | * 第一个参数@points 组成观测区域的彼此相邻的点 |
| | | * 第二个参数@_keepTime 保持时间 |
| | | * 第三个参数@_direction 正确行进的方向方向 |
| | | * @points 组成观测区域的彼此相邻的点 |
| | | * @_direction 正确行进的方向方向 |
| | | * @_keepTime 保持时间 |
| | | * @ minDistance 最小移动距离 |
| | | */ |
| | | IndirectAlg indirectAlg((std::initializer_list<Point>){{0.0, 0.0}, {1000.0, 0.0}, {1000.0, 1000.0}, {0.0, 1000.0} }, 5, {1, 1}); |
| | | IndirectAlg indirectAlg((std::initializer_list<Point>){{0.0, 0.0}, {1000.0, 0.0}, {1000.0, 1000.0}, {0.0, 1000.0} }, |
| | | {1, 1}, 5, 1); |
| | | |
| | | int i = 0; |
| | | // time_t start_time; |
| | |
| | | |
| | | void test3() { |
| | | |
| | | std::ifstream fin("test3.txt"); |
| | | std::ifstream fin("test.txt"); |
| | | char line[1024]; |
| | | //std::string line; |
| | | char *targetIdStr; |
| | |
| | | //{"x":148,"y":45},{"x":148,"y":539},{"x":769,"y":539},{"x":769,"y":45} |
| | | //{148, 45}, {148, 539}, {769, 539}, {769, 45} |
| | | Record record; |
| | | IndirectAlg indirectAlg((std::initializer_list<Point>){}, 3, {621, 0}); |
| | | IndirectAlg indirectAlg((std::initializer_list<Point>){}, {621, 0}, 3, 0); |
| | | |
| | | // const char *delim = " "; |
| | | while(fin.getline(line, 1024)) { |
| | |
| | | // printf("key = %s, value=%s\n", key, value); |
| | | } |
| | | fin.close(); |
| | | sleep(30); |
| | | } |
| | | |
| | | |