Skip to content

Commit

Permalink
initialize origin to a non-default one to avoid throwing the exceptio…
Browse files Browse the repository at this point in the history
…n by IOHandler::handleDefaultProjector
  • Loading branch information
mantkiew committed Dec 5, 2023
1 parent 33e797a commit 4da1fb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lanelet2_projection/include/lanelet2_projection/Geocentric.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ namespace projection {

class GeocentricProjector : public Projector {
public:
// initialize the origin so that it's not the default one which causes
// IOHandler::handleDefaultProjector to throw an exception
GeocentricProjector() : Projector{Origin({90.0, 0.0, -6356752.3})} {}
BasicPoint3d forward(const GPSPoint& gps) const override;
GPSPoint reverse(const BasicPoint3d& enu) const override;
};
Expand Down

0 comments on commit 4da1fb3

Please sign in to comment.