|
CARLA
|
WGS84 <-> local ENU metres, a transverse Mercator centred on the origin. More...
#include <Frame.h>
Public Member Functions | |
| double | GetOriginLatitude () const |
| double | GetOriginLongitude () const |
| std::string | GetProjString () const |
| The +proj string written as the OpenDRIVE <geoReference>. | |
| LocalFrame ()=default | |
| LocalFrame (double origin_lat, double origin_lon) | |
| void | ToLocal (double lon, double lat, double &x, double &y) const |
| void | ToWGS84 (double x, double y, double &lon, double &lat) const |
Static Public Member Functions | |
| static LocalFrame | FromBoundingBox (double south, double west, double north, double east) |
Private Attributes | |
| double | _origin_lat = 0.0 |
| double | _origin_lon = 0.0 |
WGS84 <-> local ENU metres, a transverse Mercator centred on the origin.
Ported from twinmodel/frame.py, which gets the same projection from pyproj.
|
default |
Referenced by FromBoundingBox().
|
inline |
|
inlinestatic |
Definition at line 23 of file Frame.h.
References LocalFrame().
|
inline |
Definition at line 27 of file Frame.h.
References _origin_lat.
Referenced by twinmodel::BuildLaneGraph().
|
inline |
Definition at line 28 of file Frame.h.
References _origin_lon.
Referenced by twinmodel::BuildLaneGraph().
| std::string twinmodel::LocalFrame::GetProjString | ( | ) | const |
The +proj string written as the OpenDRIVE <geoReference>.
Definition at line 26 of file Frame.cpp.
References _origin_lat, and _origin_lon.
Referenced by twinmodel::ExportXodr().
| void twinmodel::LocalFrame::ToLocal | ( | double | lon, |
| double | lat, | ||
| double & | x, | ||
| double & | y | ||
| ) | const |
Definition at line 34 of file Frame.cpp.
References _origin_lat, _origin_lon, x, and y.
Referenced by twinmodel::BuildLaneGraph(), twinmodel::BuildSignals(), and osm2odr::ConvertOSMToOpenDRIVE().
| void twinmodel::LocalFrame::ToWGS84 | ( | double | x, |
| double | y, | ||
| double & | lon, | ||
| double & | lat | ||
| ) | const |
Definition at line 64 of file Frame.cpp.
References _origin_lat, _origin_lon, x, and y.
|
private |
Definition at line 38 of file Frame.h.
Referenced by GetOriginLatitude(), GetProjString(), ToLocal(), and ToWGS84().
|
private |
Definition at line 39 of file Frame.h.
Referenced by GetOriginLongitude(), GetProjString(), ToLocal(), and ToWGS84().