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

Function GetSpeedMpS

libs/routing/edge_estimator.cpp:49–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49double GetSpeedMpS(EdgeEstimator::Purpose purpose, Segment const & segment, RoadGeometry const & road)
50{
51 SpeedKMpH const & speed = road.GetSpeed(segment.IsForward());
52 double const speedMpS = KmphToMps(purpose == EdgeEstimator::Purpose::Weight ? speed.m_weight : speed.m_eta);
53 ASSERT_GREATER(speedMpS, 0.0, (segment));
54 return speedMpS;
55}
56
57bool IsTransit(std::optional<HighwayType> type)
58{

Callers 2

CalcClimbSegmentFunction · 0.85
CalcSegmentWeightMethod · 0.85

Calls 3

KmphToMpsFunction · 0.85
GetSpeedMethod · 0.45
IsForwardMethod · 0.45

Tested by

no test coverage detected