Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JuPedSim] Speed adjustment #14269

Merged
merged 4 commits into from
Jan 29, 2024
Merged

[JuPedSim] Speed adjustment #14269

merged 4 commits into from
Jan 29, 2024

Conversation

bcoueraud87
Copy link
Contributor

Solved this issue (second solution was favored).

state->setAngle(atan2(orientation.y, orientation.x));

// Find on which edge the pedestrian is, using route's forward-looking edges because of how moveToXY is written.
Position newPosition(position.x, position.y);
ConstMSEdgeVector route = stage->getEdges();
const int routeIndex = (int)(stage->getRouteStep() - stage->getRoute().begin());
ConstMSEdgeVector forwardRoute = ConstMSEdgeVector(route.begin() + routeIndex, route.end());
double bestDistance = std::numeric_limits<double>::max();
const double bestDistance = std::numeric_limits<double>::max();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bcoueraud87 this should not be const

@behrisch behrisch merged commit da403e5 into eclipse-sumo:main Jan 29, 2024
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants