Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 098d23e8 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

cycleGearbox: when accelerating: read next sampling point, when decelerating...

cycleGearbox: when accelerating: read next sampling point, when decelerating read last sampling point for current gear
parent 825cad81
No related branches found
No related tags found
No related merge requests found
......@@ -229,7 +229,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public IResponse Request(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, bool dryRun)
{
Log.Debug("Gearbox Power Request: torque: {0}, angularVelocity: {1}", outTorque, outAngularVelocity);
Gear = DataBus.CycleData.LeftSample.Gear;
Gear = DataBus.DriverBehavior == DrivingBehavior.Braking
? DataBus.CycleData.LeftSample.Gear
: DataBus.CycleData.RightSample.Gear;
var avgOutAngularVelocity = (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment