From 4b51857b975cb708bf8bdada170a34a9b7ee19c4 Mon Sep 17 00:00:00 2001 From: artzha Date: Thu, 14 Nov 2024 18:02:26 -0600 Subject: [PATCH] [In progress] modifying gps utils --- math/gps_util.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/math/gps_util.h b/math/gps_util.h index 69bf4ca..92ff438 100644 --- a/math/gps_util.h +++ b/math/gps_util.h @@ -57,6 +57,12 @@ struct GPSTranslator { return true; } + void SetOrigin(double latitude, double longitude, double orientation) { + gps_origin_latitude = latitude; + gps_origin_longitude = longitude; + map_orientation = orientation; + } + Vector2d GPSToMetric(const double latitude, const double longitude) { const double theta = DegToRad(latitude); const double c = std::cos(theta);