-
Notifications
You must be signed in to change notification settings - Fork 43
Track Transmission Processor
Track Transmission Processor is a component specific to tracked vehicles. It takes care of preparing data for friction calculation and processing of reaction force from friction components. There are two variants of this component - "simple" and modular.
Simple version of component (TrackTransmissionProcessor) expect a torque, coming from the engine (could be constant or retrieved from curve) as an input parameter to update function. Torque is then used to integrate angular velocity of sprocket, taking into account moment of inertia of both sprocket and track:
SprocketAngularVelocity += EngineTorque / Sprocket&TrackMomentOfInertia * deltaTime
Using sprocket angular velocity and radius of sprocket we can calculate linear velocity of the track as:
TrackLinearVelocity = TrackForwardVector * SprocketAngularVelocity * SprocketRadius
Track forward vector is used to establish track's linear velocity in world space. Track linear velocity is used as one of the input parameters for friction calculation.
When friction is calculated some part of this force will influence rolling of the track itself, like for example in case when vehicle is rolling down the hill (meaning that track doesn't have to be powered to be affected by friction and start rolling). Such influence is passed from friction components to Track Transmission Processor as "Normalized Reaction Force". We de-normalize reaction force by multiplying it by track and sprocket mass, then using radius of sprocket we find reaction torque which will effect angular velocity of the sprocket and track:
ReactionTorque = ProjectVectorOnVector(ReactionForce * Sprocket&TrackMass, TrackForwardVector) * SprocketRadius
projection is necessary to make sure that track is influenced only by part of reaction force that is aligned with the track along X axis. Then we find new angular velocity as:
SprocketAngularVelocity += ReactionTorque / Sprocket&TrackMomentOfInertia * deltaTime
Modular version is build to be used with modular drive train components and doesn't integrate angular velocity by itself. It relies on velocity being integrated in one of the previous components in the chain. It will receive reaction force from friction components and pass it back into modular drive train chain of components after converting it into torque.
Both components can apply brakes to tracks and which will lower angular velocity of sprocket unless it's already at zero.
Another role of Track Transmission Processor is to provide information necessary for animating visual representation of the track.
- Internal Combustion Engine
- [Clutch] (https://github.com/BoredEngineer/MMT_Content/wiki/Clutch)
- [Gear Box] (https://github.com/BoredEngineer/MMT_Content/wiki/Gear-Box)
- [Differential] (https://github.com/BoredEngineer/MMT_Content/wiki/Differential)
- [Track Transmission Processor] (https://github.com/BoredEngineer/MMT_Content/wiki/Track-Transmission-Processor)