Axle – step 0032 – March 2010
Basically, SrrTrains vehicles are moved over the tracks by sending a deltaEss event to all axles of the vehicle.
The axle maintains a reference to the parent edge and increases/decreases the ess property, considering changes of the parent edge at the boundaries between two edges.
The provided track geometry takes the properties of the axle and their parent edge and calculates the transformation of each axle.
This transformation is an input to calculate the transformation of the vehicle, as well as it is an output to the user (model author), to display the axle at the right position and orientation.
The rotation of an axle is influenced by their parent drive.
SrrAxle is an external prototype that is available at the directory srr/.
<ProtoDeclare name="SrrAxle">
<ProtoInterface>
<field accessType='inputOutput' name='objType' type='SFString' value='SrrAxle'/>
<field accessType='inputOutput' name='version' type='SFFloat' value='0.0032'/>
<field accessType='inputOutput' name='axleType' type='SFInt32' value="0"/>
<field accessType='inputOutput' name='inverse' type='SFBool' value="false"/>
<field accessType='inputOutput' name='parentVehicle' type='SFNode'/>
<field accessType='inputOnly' name='basicInitialization' type='SFInt32'/>
<field accessType='outputOnly' name='basicallyInitialized' type='SFNode'/>
<field accessType='inputOutput' name='transformation' type='SFNode'/>
<field accessType='inputOutput' name='wheelRadius' type='SFFloat' value='1.0'/>
<field accessType='inputOutput' name='wheelAngle' type='SFFloat'/>
<field accessType='outputOnly' name='state' type='MFString'/>
<field accessType='inputOnly' name='setState' type='MFString'/>
<field accessType='inputOutput' name='gauge' type='MFFloat' value='1.43 1.44'/>
</ProtoInterface>
axleType, parentVehicle, basicInitialization, basicallyInitialized, state, setState
Those fields are used in the SRR Framework and in other SRR objects of the vehicle and need not be further described here.
inverse
has to be set by the user and indicates, whether the axle's local coordinate system is oriented “forward” or “backward” relative to the vehicle's coordinate system. This is especially important, if the rotation of the axle is visible.
transformation
Here the user has to provide an SrrTransformationA node. This node will be used to report the transformation of the axle from the track geometry to the vehicle model (user).
wheelRadius
Here the user provides the radius of the wheels of the axle in meters.
wheelAngle
This output can be used by the user to display the rotation of the axle. The value is between 0 and 2.pi. An increasing value indicates the axle rotating “forward” (if inverse = false) or “backward” (if inverse=true), relative to the vehicle.
gauge
Here the user gives an interval of the gauge in meters, that the axle can cope with. If the actual gauge of the track edge will be out of the interval, the vehicle will be derailed when entering the track edge (this check not yet implemented).