osrm-backend/include/util/guidance/turn_bearing.hpp
Moritz Kobitzsch 5e167b8745 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.
2016-10-20 10:47:29 +02:00

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_ */