A-SW Hub / Repositories
Local Gitea · READ ONLY
← 저장소 Repositories
REPOSITORY

jbnu/global-localization Private

[참조 MVP] GIS 기반 전역 측위 A-SW — WGS84 좌표를 기준점 중심의 농경지 로컬 좌표계로 변환합니다.

https://git.agrithing.ai/jbnu/global-localization.git
6 commits
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};}}