-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Moritz Kobitzsch
committed
Sep 20, 2016
1 parent
b988317
commit d0d470a
Showing
7 changed files
with
191 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef OSRM_TURN_PENALTY_HPP_ | ||
#define OSRM_TURN_PENALTY_HPP_ | ||
|
||
/* The turn functions offered by osrm come in two variations. One uses a basic angle. The other one | ||
* offers a list of additional entries to improve the turn penalty */ | ||
|
||
namespace osrm | ||
{ | ||
namespace extractor | ||
{ | ||
|
||
// properties describing the turn | ||
struct TurnProperties | ||
{ | ||
// the turn angle between the ingoing/outgoing segments | ||
double angle; | ||
// the radius of the turn at the curve (approximated) | ||
double radius; | ||
// the turn is crossing through opposing traffic | ||
bool crossing_through_traffic; | ||
// indicate if the turn needs to be announced or if it is a turn following the obvious road | ||
bool requires_announcement; | ||
}; | ||
|
||
// properties describing intersection related penalties | ||
struct IntersectionProperties | ||
{ | ||
// is the turn at a traffic light | ||
bool traffic_light; | ||
// is the turn at a stop-light | ||
bool stop_sign; | ||
// is the turn following a right-of-way situation | ||
bool right_of_way; | ||
}; | ||
|
||
// information about the segments coming in/out of the intersection | ||
struct TurnSegment | ||
{ | ||
double length_in_meters; | ||
double speed_in_meters_per_second; | ||
}; | ||
|
||
} // namespace extractor | ||
} // namespace osrm | ||
|
||
#endif // OSRM_TURN_PENALTY_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.