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

Method GetCurrentSpeedLimit

libs/routing/routing_session.cpp:390–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390double RoutingSession::GetCurrentSpeedLimit() const
391{
392 if (!m_route->IsValid())
393 return -1;
394
395 SpeedInUnits speedLimit;
396 m_route->GetCurrentSpeedLimit(speedLimit);
397 if (speedLimit.IsNumeric())
398 return measurement_utils::KmphToMps(speedLimit.GetSpeedKmPH());
399 else if (speedLimit.GetSpeed() == kNoneMaxSpeed)
400 return 0;
401 else
402 return -1.0;
403}
404
405void RoutingSession::GetRouteFollowingInfo(FollowingInfo & info) const
406{

Callers

nothing calls this directly

Calls 5

KmphToMpsFunction · 0.85
IsNumericMethod · 0.80
GetSpeedKmPHMethod · 0.80
IsValidMethod · 0.45
GetSpeedMethod · 0.45

Tested by

no test coverage detected