REPOSITORY
jbnu/global-localization Private
[참조 MVP] GIS 기반 전역 측위 A-SW — WGS84 좌표를 기준점 중심의 농경지 로컬 좌표계로 변환합니다.
https://git.agrithing.ai/jbnu/global-localization.git 6f0a9d5 feat: adopt cpp VPU SDV reference implementation
173c090 ci: add language-specific static and dynamic analysis
48fb69a docs: define component scope and interface contract
ebf3a8d ci: verify contract tests and evidence package
9f68bc8 feat: add executable reference MVP
ac3fd1d docs: define component scope and interface contract
1 items · main
·/ src/component.cpp
text · 411 B · 4428e17 Download
#include "component.hpp"#include <cmath>namespace asw {LocalPose to_local(double origin_lat, double origin_lon, double latitude, double longitude) { constexpr double radius = 6378137.0; constexpr double pi = 3.14159265358979323846; const double lat0 = origin_lat * pi / 180.0; return {(longitude - origin_lon) * pi / 180.0 * radius * std::cos(lat0), (latitude - origin_lat) * pi / 180.0 * radius};}}