2016-04-11 06:51:06 -04:00
|
|
|
#include "extractor/guidance/intersection_scenario_three_way.hpp"
|
2016-05-27 15:05:04 -04:00
|
|
|
#include "extractor/guidance/constants.hpp"
|
2016-04-11 06:51:06 -04:00
|
|
|
#include "extractor/guidance/toolkit.hpp"
|
|
|
|
|
2016-04-18 07:41:19 -04:00
|
|
|
#include "util/guidance/toolkit.hpp"
|
|
|
|
|
|
|
|
using osrm::util::guidance::angularDeviation;
|
|
|
|
|
2016-04-11 06:51:06 -04:00
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace extractor
|
|
|
|
{
|
|
|
|
namespace guidance
|
|
|
|
{
|
|
|
|
|
|
|
|
bool isEndOfRoad(const ConnectedRoad &,
|
|
|
|
const ConnectedRoad &possible_right_turn,
|
|
|
|
const ConnectedRoad &possible_left_turn)
|
|
|
|
{
|
|
|
|
return angularDeviation(possible_right_turn.turn.angle, 90) < NARROW_TURN_ANGLE &&
|
|
|
|
angularDeviation(possible_left_turn.turn.angle, 270) < NARROW_TURN_ANGLE &&
|
|
|
|
angularDeviation(possible_right_turn.turn.angle, possible_left_turn.turn.angle) >
|
|
|
|
2 * NARROW_TURN_ANGLE;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace guidance
|
|
|
|
} // namespace extractor
|
|
|
|
} // namespace osrm
|