[routing] Update comments in bicycle weights and tests

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin 2025-02-02 10:54:05 +07:00
parent 199dd10c51
commit 0edc581acf
2 changed files with 7 additions and 3 deletions

View file

@ -27,7 +27,7 @@ HighwayBasedFactors const kDefaultFactors = GetOneFactorsForBicycleAndPedestrian
SpeedKMpH constexpr kSpeedOffroadKMpH = {1.5 /* weight */, 3.0 /* eta */};
SpeedKMpH constexpr kSpeedDismountKMpH = {2.0 /* weight */, 4.0 /* eta */};
// Applies only to contries where cycling is allowed on footways (by default the above dismount speed is used).
// Applies only to countries where cycling is allowed on footways (by default the above dismount speed is used).
SpeedKMpH constexpr kSpeedOnFootwayKMpH = {8.0 /* weight */, 10.0 /* eta */};
HighwayBasedSpeeds const kDefaultSpeeds = {
@ -176,8 +176,8 @@ VehicleModel::SurfaceInitList const kBicycleSurface = {
{{"psurface", "paved_bad"}, {0.8, 0.8}},
{{"psurface", "unpaved_good"}, {0.9, 0.9}},
{{"psurface", "unpaved_bad"}, {0.3, 0.3}},
// no dedicated cycleway, doesn't mean that bicycle is not allowed, just lower weight
// But why? If nocycleway is tagged explicitly means there is no cycling infra for sure.
// No dedicated cycleway doesn't mean that bicycle is not allowed, just lower weight.
// If nocycleway is tagged explicitly then there is no cycling infra for sure.
// Otherwise there is a small chance cycling infra is present though not mapped?
/// @todo(pastk): this heuristic is controversial, maybe remove completely?
{{"hwtag", "nocycleway"}, {0.95, 0.95}},

View file

@ -366,6 +366,10 @@ UNIT_CLASS_TEST(VehicleModelTest, BicycleModel_Speeds)
{cycleway, unpavedBad},
{path, unpavedGood}, // Its controversial what is preferrable: a good path or a bad cycleway
{path, yesBicycle, unpavedBad},
/// @todo(pastk): "nobicycle" is ignored in speed calculation atm, the routing is just forbidden there.
/// But "nobicycle" should result in a dismount speed instead, see https://github.com/organicmaps/organicmaps/issues/9784
// {footway, c.GetTypeByPath({"hwtag", "nobicycle"})},
// {path, c.GetTypeByPath({"hwtag", "nobicycle"})},
{path, unpavedBad},
};