Move guidance turn generation out of EBGF

This commit is contained in:
Michael Krasnyk
2018-01-08 19:12:06 +01:00
parent 988b6e3311
commit 10de243556
29 changed files with 630 additions and 628 deletions
+1 -1
View File
@@ -78,5 +78,5 @@ std::size_t BearingClass::findMatchingBearing(const double bearing) const
}
} // namespace guidance
} // namespace extractor
} // namespace util
} // namespace osrm
+1 -1
View File
@@ -37,5 +37,5 @@ bool EntryClass::operator<(const EntryClass &other) const
}
} // namespace guidance
} // namespace extractor
} // namespace util
} // namespace osrm
-25
View File
@@ -1,25 +0,0 @@
#include "util/guidance/turn_bearing.hpp"
#include <boost/assert.hpp>
namespace osrm
{
namespace util
{
namespace guidance
{
constexpr double bearing_scale = 360.0 / 256.0;
// discretizes a bearing into distinct units of 1.4 degrees
TurnBearing::TurnBearing(const double value) : bearing(value / bearing_scale)
{
BOOST_ASSERT_MSG(value >= 0 && value < 360.0,
"Bearing value needs to be between 0 and 360 (exclusive)");
}
double TurnBearing::Get() const { return bearing * bearing_scale; }
} // namespace guidance
} // namespace util
} // namespace osrm