Turn Angles in OSRM were computed using a lookahead of 10 meters.
This PR adds more advanced coordinate extraction, analysing the road to detect offsets due to OSM way modelling. In addition it improves the handling of bearings. Right now OSM reports bearings simply based on the very first coordinate along a way. With this PR, we store the bearings for a turn correctly, making the bearings for turns correct.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "engine/datafacade/datafacade_base.hpp"
|
||||
#include "util/guidance/bearing_class.hpp"
|
||||
#include "util/guidance/entry_class.hpp"
|
||||
#include "util/guidance/turn_bearing.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
namespace osrm
|
||||
@@ -193,7 +194,7 @@ class MockDataFacade final : public engine::datafacade::BaseDataFacade
|
||||
const int /*bearing_range*/) const override
|
||||
{
|
||||
return {};
|
||||
};
|
||||
}
|
||||
|
||||
unsigned GetCheckSum() const override { return 0; }
|
||||
bool IsCoreNode(const NodeID /* id */) const override { return false; }
|
||||
@@ -205,9 +206,18 @@ class MockDataFacade final : public engine::datafacade::BaseDataFacade
|
||||
std::size_t GetCoreSize() const override { return 0; }
|
||||
std::string GetTimestamp() const override { return ""; }
|
||||
bool GetContinueStraightDefault() const override { return true; }
|
||||
BearingClassID GetBearingClassID(const NodeID /*id*/) const override { return 0; };
|
||||
BearingClassID GetBearingClassID(const NodeID /*id*/) const override { return 0; }
|
||||
EntryClassID GetEntryClassID(const EdgeID /*id*/) const override { return 0; }
|
||||
|
||||
util::guidance::TurnBearing PreTurnBearing(const EdgeID /*eid*/) const override final
|
||||
{
|
||||
return util::guidance::TurnBearing{0.0};
|
||||
}
|
||||
util::guidance::TurnBearing PostTurnBearing(const EdgeID /*eid*/) const override final
|
||||
{
|
||||
return util::guidance::TurnBearing{0.0};
|
||||
}
|
||||
|
||||
bool hasLaneData(const EdgeID /*id*/) const override final { return true; };
|
||||
util::guidance::LaneTupleIdPair GetLaneData(const EdgeID /*id*/) const override final
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user