REPOSITORY
kitech/path-generation-asw Private
[참조 MVP] 작업경로 생성 A-SW — 직사각형 농경지와 작업 폭으로 왕복형 커버리지 경로를 생성합니다.
https://git.agrithing.ai/kitech/path-generation-asw.git c194442 feat: adopt cpp ACU SDV reference implementation
af7820a ci: add language-specific static and dynamic analysis
a25733b docs: define component scope and interface contract
3a25789 ci: verify contract tests and evidence package
9560b9d feat: add executable reference MVP
3d9ebb3 docs: define component scope and interface contract
1 items · main
·/ src/component.cpp
text · 636 B · 5e9cac8 Download
#include "component.hpp"#include <stdexcept>namespace asw {std::vector<Point> generate_path(double width, double height, double spacing, double headland) { if (width <= 0 || height <= 0 || spacing <= 0 || headland < 0 || headland * 2 >= width || headland * 2 >= height) throw std::invalid_argument("invalid field geometry"); std::vector<Point> points; bool forward = true; for (double y = headland; y <= height - headland + 1e-9; y += spacing) { points.push_back({forward ? headland : width - headland, y}); points.push_back({forward ? width - headland : headland, y}); forward = !forward; } return points;}}