Skip to content

Commit b64a436

Browse files
Sebastian Zęderowskixmfcx
Sebastian Zęderowski
authored andcommitted
feat(autoware_geography_utils): add support for local cartesian projection
Signed-off-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl>
1 parent 22fadad commit b64a436

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/autoware_geography_utils/src/lanelet2_projector.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ std::unique_ptr<lanelet::Projector> get_lanelet2_projector(const MapProjectorInf
5353
}
5454

5555
if (projector_info.projector_type == MapProjectorInfo::LOCAL_CARTESIAN) {
56-
lanelet::GPSPoint position{
56+
const lanelet::GPSPoint position{
5757
projector_info.map_origin.latitude, projector_info.map_origin.longitude,
5858
projector_info.map_origin.altitude};
59-
lanelet::Origin origin{position};
60-
lanelet::projection::LocalCartesianProjector projector{origin};
59+
const lanelet::Origin origin{position};
60+
const lanelet::projection::LocalCartesianProjector projector{origin};
6161
return std::make_unique<lanelet::projection::LocalCartesianProjector>(projector);
6262
}
6363

6464
throw std::invalid_argument(
6565
"Invalid map projector type: " + projector_info.projector_type +
66-
". Currently supported types: MGRS, LocalCartesianUTM, and TransverseMercator");
66+
". Currently supported types: MGRS, LocalCartesianUTM, LocalCartesian and TransverseMercator");
6767
}
6868

6969
} // namespace autoware::geography_utils

0 commit comments

Comments
 (0)