mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
[traffic] Eliminate any ETA calculations, always return weight
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -580,11 +580,8 @@ double RoutingTraffDecoder::TraffEstimator::GetFerryLandingPenalty(Purpose /* pu
|
|||||||
}
|
}
|
||||||
|
|
||||||
double RoutingTraffDecoder::TraffEstimator::CalcOffroad(ms::LatLon const & from, ms::LatLon const & to,
|
double RoutingTraffDecoder::TraffEstimator::CalcOffroad(ms::LatLon const & from, ms::LatLon const & to,
|
||||||
Purpose purpose) const
|
Purpose /* purpose */) const
|
||||||
{
|
{
|
||||||
if (purpose == Purpose::ETA)
|
|
||||||
return 0.0;
|
|
||||||
|
|
||||||
double result = ms::DistanceOnEarth(from, to);
|
double result = ms::DistanceOnEarth(from, to);
|
||||||
|
|
||||||
result *= kOffroadPenalty;
|
result *= kOffroadPenalty;
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ public:
|
|||||||
* @param purpose The purpose for which the result is to be used.
|
* @param purpose The purpose for which the result is to be used.
|
||||||
* @return Travel time in seconds.
|
* @return Travel time in seconds.
|
||||||
*/
|
*/
|
||||||
double CalcOffroad(ms::LatLon const & from, ms::LatLon const & to, Purpose purpose) const override;
|
double CalcOffroad(ms::LatLon const & from, ms::LatLon const & to, Purpose /* purpose */) const override;
|
||||||
double CalcSegmentWeight(routing::Segment const & segment, routing::RoadGeometry const & road, Purpose /* purpose */) const override;
|
double CalcSegmentWeight(routing::Segment const & segment, routing::RoadGeometry const & road, Purpose /* purpose */) const override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user