Add support for opposite approach request parameter (#6842)

* Added approach on the opposite side of the road.

* Additional test and docs coverage for opposite approach

---------

Co-authored-by: Aleksandrs Saveljevs <Aleksandrs.Saveljevs@gmail.com>
This commit is contained in:
Michael Bell
2024-04-03 19:59:15 +01:00
committed by GitHub
parent 367933fc1a
commit 8ef366e061
12 changed files with 400 additions and 38 deletions
@@ -166,8 +166,9 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar<Iterator, Signature>
qi::lit("bearings=") >
(-(qi::short_ > ',' > qi::short_))[ph::bind(add_bearing, qi::_r1, qi::_1)] % ';';
approach_type.add("unrestricted", engine::Approach::UNRESTRICTED)("curb",
engine::Approach::CURB);
approach_type.add("unrestricted", engine::Approach::UNRESTRICTED)(
"curb", engine::Approach::CURB)("opposite", engine::Approach::OPPOSITE);
approach_rule = qi::lit("approaches=") >
(-approach_type %
';')[ph::bind(&engine::api::BaseParameters::approaches, qi::_r1) = qi::_1];