geo: refactoring on comments and usage

This commit is contained in:
Matthias Grob
2021-10-20 15:07:18 +02:00
parent 8db7a6225b
commit 10ceea2fe6
16 changed files with 49 additions and 87 deletions
+1 -5
View File
@@ -195,11 +195,7 @@ void EstimatorInterface::setGpsData(const gps_message &gps)
// Only calculate the relative position if the WGS-84 location of the origin is set
if (collect_gps(gps)) {
float lpos_x = 0.0f;
float lpos_y = 0.0f;
_pos_ref.project((gps.lat / 1.0e7), (gps.lon / 1.0e7), lpos_x, lpos_y);
gps_sample_new.pos(0) = lpos_x;
gps_sample_new.pos(1) = lpos_y;
gps_sample_new.pos = _pos_ref.project((gps.lat / 1.0e7), (gps.lon / 1.0e7));
} else {
gps_sample_new.pos(0) = 0.0f;