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

Method CalcOffroad

libs/routing/edge_estimator.cpp:593–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591}
592
593double EdgeEstimator::CalcOffroad(ms::LatLon const & from, ms::LatLon const & to, Purpose purpose) const
594{
595 auto const offroadSpeedKMpH = purpose == Purpose::Weight ? m_offroadSpeedKMpH.m_weight : m_offroadSpeedKMpH.m_eta;
596 if (offroadSpeedKMpH == kNotUsed)
597 return 0.0;
598
599 return TimeBetweenSec(from, to, KmphToMps(offroadSpeedKMpH));
600}
601
602// PedestrianEstimator -----------------------------------------------------------------------------
603class PedestrianEstimator final : public EdgeEstimator

Callers 4

CalcSegmentWeightMethod · 0.80
CalcOffroadWeightMethod · 0.80
CalcOffroadWeightMethod · 0.80
UNIT_TESTFunction · 0.80

Calls 2

KmphToMpsFunction · 0.85
TimeBetweenSecFunction · 0.70

Tested by 1

UNIT_TESTFunction · 0.64