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.
31 lines
457 B
C++
31 lines
457 B
C++
#ifndef OSRM_INCLUDE_UTIL_TURN_BEARING_HPP_
|
|
#define OSRM_INCLUDE_UTIL_TURN_BEARING_HPP_
|
|
|
|
#include <cstdint>
|
|
|
|
namespace osrm
|
|
{
|
|
namespace util
|
|
{
|
|
namespace guidance
|
|
{
|
|
|
|
#pragma pack(push, 1)
|
|
class TurnBearing
|
|
{
|
|
public:
|
|
TurnBearing(const double value = 0);
|
|
|
|
double Get() const;
|
|
|
|
private:
|
|
std::uint8_t bearing;
|
|
};
|
|
#pragma pack(pop)
|
|
|
|
} // namespace guidance
|
|
} // namespace util
|
|
} // namespace osrm
|
|
|
|
#endif /* OSRM_INCLUDE_UTIL_TURN_BEARING_HPP_ */
|