Skip to content
Snippets Groups Projects

#180 - PCM Correct agent's position to rear axle

Merged #180 - PCM Correct agent's position to rear axle
All threads resolved!
All threads resolved!
/********************************************************************************
* Copyright (c) 2017-2021 ITK Engineering GmbH
*
* 2023 Hexad GmbH
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
@@ -24,10 +24,11 @@ const QString OpenScenarioWriter::CreateScenarioFile(const QString &scenarioFile
const std::vector<PCM_Trajectory *> &trajectories = simSet->GetTrajectories();
for (size_t i = 0; i < trajectories.size(); i++)
{
{
// Position Shift COG to middle rear axle
+2
trajectories.at(i)->ShiftForward(participants.at(i)->GetDistcgfa().toDouble() - participants.at(i)->GetWheelbase().toDouble());
scenarioConfig.AddTrajectory(i, trajectories.at(i));
}
return WriteScenarioFile(scenarioFile, scenarioConfig);
}
Loading