MCPcopy Create free account
hub / github.com/comaps/comaps / ToVector

Function ToVector

libs/geometry/distance_on_sphere.cpp:32–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32m3::Point<double> ToVector(LatLon const & ll)
33{
34 double const lat = math::DegToRad(ll.m_lat);
35 double const lon = math::DegToRad(ll.m_lon);
36 return {kEarthRadiusMeters * cos(lat) * cos(lon), kEarthRadiusMeters * cos(lat) * sin(lon),
37 kEarthRadiusMeters * sin(lat)};
38}
39
40} // namespace ms

Callers 1

getTurnPenaltyMethod · 0.85

Calls 1

DegToRadFunction · 0.85

Tested by

no test coverage detected