refactor merging of segregated roads
adjust to generalFindMaximum function moved parallel detection to ratio/absolute based regression testing considerably improved detection quality using normalised regression lines only follow initial direction/narrow turns for parallel detection
This commit is contained in:
@@ -34,7 +34,7 @@ void ConnectedRoad::mirror()
|
||||
DirectionModifier::MaxDirectionModifier,
|
||||
"The list of mirrored modifiers needs to match the available modifiers in size.");
|
||||
|
||||
if (angularDeviation(angle, 0) > std::numeric_limits<double>::epsilon())
|
||||
if (util::angularDeviation(angle, 0) > std::numeric_limits<double>::epsilon())
|
||||
{
|
||||
angle = 360 - angle;
|
||||
instruction.direction_modifier = mirrored_modifiers[instruction.direction_modifier];
|
||||
@@ -48,6 +48,26 @@ ConnectedRoad ConnectedRoad::getMirroredCopy() const
|
||||
return copy;
|
||||
}
|
||||
|
||||
std::string toString(const IntersectionShapeData &shape)
|
||||
{
|
||||
std::string result =
|
||||
"[shape] " + std::to_string(shape.eid) + " bearing: " + std::to_string(shape.bearing);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string toString(const IntersectionViewData &view)
|
||||
{
|
||||
std::string result = "[view] ";
|
||||
result += std::to_string(view.eid);
|
||||
result += " allows entry: ";
|
||||
result += std::to_string(view.entry_allowed);
|
||||
result += " angle: ";
|
||||
result += std::to_string(view.angle);
|
||||
result += " bearing: ";
|
||||
result += std::to_string(view.bearing);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string toString(const ConnectedRoad &road)
|
||||
{
|
||||
std::string result = "[connection] ";
|
||||
|
||||
Reference in New Issue
Block a user