Open Rails

MSTSLocomotive Members

MSTSLocomotive overview

Protected Static Methods

ConvertFromPSI

Public Instance Constructors

MSTSLocomotive Constructor

Public Instance Fields

_AccelerationMpSS (inherited from TrainCar)
_PrevSpeedMpS (inherited from TrainCar)
_SpeedMpS (inherited from TrainCar)
AcceptMUSignals (inherited from TrainCar)
accumedAcceTime (inherited from TrainCar)
Adhesion1 (inherited from MSTSWagon)
Adhesion2 (inherited from MSTSWagon)
Adhesion3 (inherited from MSTSWagon)
AdhesionFilter
AdhesionK (inherited from MSTSWagon)
AlerterSnd
AntiSlip
AuxPowerOn (inherited from MSTSWagon)
AverageForceN
AxleInertiaKgm2 (inherited from MSTSWagon)
BailOff
Bell
BrakeEmergencyTimeFactorS
BrakeForceN (inherited from TrainCar)
BrakePipeChargingRatePSIpS
BrakePipeTimeFactorS
BrakeServiceTimeFactorS
BrakeSystem (inherited from TrainCar)
BrakeSystemPressureUnits
Cab3DShapeFileName (inherited from MSTSWagon)
Cab3DSoundFileName (inherited from MSTSWagon)
CabLightOn
CabSoundFileName
CabViewList
CabViewpoints (inherited from TrainCar)
CarHeatLossWpT (inherited from TrainCar)
CarHeatPipeAreaM2 (inherited from TrainCar)
CarHeatVolumeM3 (inherited from TrainCar)
CarHeightM (inherited from TrainCar)
CarID (inherited from TrainCar)
CarLengthM (inherited from TrainCar)
CarTunnelData (inherited from TrainCar)
CarWidthM (inherited from TrainCar)
CombinedControlSplitPosition
CombinedControlType
CommandStartTime
CompressorChargingRateM3pS
CompressorIsOn
CompressorRestartPressurePSI
ContinuousForceTimeFactor
controlUpdated
CouplerForceA (inherited from TrainCar)
CouplerForceB (inherited from TrainCar)
CouplerForceC (inherited from TrainCar)
CouplerForceG (inherited from TrainCar)
CouplerForceR (inherited from TrainCar)
CouplerForceU (inherited from TrainCar)
CouplerOverloaded (inherited from TrainCar)
Couplers (inherited from MSTSWagon)
CouplerSlack2M (inherited from TrainCar)
CouplerSlackM (inherited from TrainCar)
CurrentCurveRadius (inherited from TrainCar)
CurrentElevationPercent (inherited from TrainCar)
CurrentFilter
currentStiffness (inherited from TrainCar)
Curtius_KnifflerA (inherited from MSTSWagon)
Curtius_KnifflerB (inherited from MSTSWagon)
Curtius_KnifflerC (inherited from MSTSWagon)
CurveForceN (inherited from TrainCar)
CurveResistanceSpeedDependent (inherited from TrainCar)
CurveSpeedDependent (inherited from TrainCar)
CVFFileName
DavisAN (inherited from MSTSWagon)
DavisBNSpM (inherited from MSTSWagon)
DavisCNSSpMM (inherited from MSTSWagon)
DistanceM (inherited from TrainCar)
DistributorPresent (inherited from MSTSWagon) True if triple valve is capable of releasing brake gradually
DoorLeftOpen (inherited from MSTSWagon)
DoorRightOpen (inherited from MSTSWagon)
DriverWheelRadiusM (inherited from MSTSWagon)
DynamicBrake
DynamicBrakeAutoBailOff
DynamicBrakeController
DynamicBrakeDelayS
DynamicBrakeForceCurves
DynamicBrakeIntervention
DynamicBrakeSpeed1MpS
DynamicBrakeSpeed2MpS
DynamicBrakeSpeed3MpS
DynamicBrakeSpeed4MpS
EffectData
EmergencyButtonPressed
EmergencyCausesPowerDown
EmergencyCausesThrottleDown
EmergencyEngagesHorn
EmergencyReservoirPresent (inherited from MSTSWagon) True if vehicle is equipped with an additional emergency brake reservoir
EngineBrakeApplyRatePSIpS
EngineBrakeController
EngineBrakeIntervention
EngineBrakeReleaseRatePSIpS
EngineBrakeState
EngineOperatingProcedures
EngineType
EventHandlers (inherited from MSTSWagon)
FilteredMotiveForceN
Flipped (inherited from TrainCar)
FreightAnimFlag (inherited from MSTSWagon)
FreightAnimMaxLevelM (inherited from MSTSWagon)
FreightAnimMinLevelM (inherited from MSTSWagon)
FreightShapeFileName (inherited from MSTSWagon)
Friction0N (inherited from MSTSWagon)
FrictionForceN (inherited from TrainCar)
GearBoxController
GravityForceN (inherited from TrainCar)
HandBrakePresent (inherited from MSTSWagon) True if equipped with handbrake. (Not common for older steam locomotives.)
HasFreightAnim (inherited from TrainCar)
HasInsideView (inherited from TrainCar)
HasPassengerCapacity (inherited from TrainCar)
HasSmoothStruc
Headlight (inherited from TrainCar)
HeadOutViewpoints (inherited from TrainCar)
Horn
InitialMassKG (inherited from TrainCar)
IntakePointList (inherited from MSTSWagon)
InteriorShapeFileName (inherited from MSTSWagon)
InteriorSoundFileName (inherited from MSTSWagon)
IsDavisFriction (inherited from MSTSWagon)
IsDiesel
IsDriveable (inherited from TrainCar)
IsElectric
IsEngine (inherited from MSTSWagon)
IsFreight (inherited from TrainCar)
IsFrictionBearing (inherited from MSTSWagon)
IsLowSpeed (inherited from MSTSWagon)
IsLowTorqueRollerBearing (inherited from MSTSWagon)
IsMetric (inherited from TrainCar)
IsPartOfActiveTrain (inherited from TrainCar)
IsPassenger (inherited from MSTSWagon)
IsRollerBearing (inherited from MSTSWagon)
IsStandStill (inherited from MSTSWagon)
IsSteam
IsTender (inherited from TrainCar)
IsUK (inherited from TrainCar)
lastTime (inherited from TrainCar)
Lights (inherited from TrainCar)
LocalGearboxGearIndex (inherited from TrainCar)
LocalThrottlePercent (inherited from TrainCar)
LocomotiveAxle
MainPressureUnit
MainResChargingRatePSIpS
MainResPressurePSI
MainResVolumeM3
MainShapeFileName (inherited from MSTSWagon)
MainSoundFileName (inherited from MSTSWagon)
MassKG (inherited from TrainCar)
MaxContinuousForceN
MaxCurrentA
MaxDynamicBrakeForceN
MaxForceN
MaxMainResPressurePSI
MaxPowerW
MaxSpeedMpS
MilepostUnitsMetric
MirrorOpen (inherited from MSTSWagon)
MotiveForceN (inherited from TrainCar)
MotiveForceSmoothedN (inherited from TrainCar)
notificationReceived
NumWheelsAdhesionFactor
NumWheelsBrakingFactor (inherited from MSTSWagon)
ORTSFreightAnimData (inherited from TrainCar)
Pantographs (inherited from MSTSWagon)
Parts (inherited from TrainCar)
PassengerViewpoints (inherited from TrainCar)
PowerOn
PowerOnDelayS
prevElev (inherited from TrainCar)
PrevMotiveForceN (inherited from TrainCar)
prevTilted (inherited from TrainCar)
prevY (inherited from TrainCar)
prevY2 (inherited from TrainCar)
RealWagFilePath (inherited from TrainCar)
RealXNAMatrix (inherited from TrainCar)
RetainerPositions (inherited from MSTSWagon) Number of available retainer positions. (Used on freight cars, mostly.) Might be 0, 3 or 4.
Sander
SanderSpeedEffectUpToMpS
SanderSpeedOfMpS
ShowCab
Simulator (inherited from TrainCar)
SlipWarningThresholdPercent (inherited from MSTSWagon)
SoundSourceIDs (inherited from TrainCar)
SuperElevationMatrix (inherited from TrainCar)
sx (inherited from TrainCar)
sy (inherited from TrainCar)
sz (inherited from TrainCar)
ThrottleController
ThrottleIntervention
TotalForceN (inherited from TrainCar)
totalRotationX (inherited from TrainCar)
totalRotationZ (inherited from TrainCar)
TrackSoundDistSquared (inherited from TrainCar)
TrackSoundLocation (inherited from TrainCar)
TrackSoundType (inherited from TrainCar)
TractiveForceCurves
Train (inherited from TrainCar)
TrainBrakeController
TrainBrakeIntervention
TrainControlSystem
TunnelForceN (inherited from TrainCar)
TunnelResistanceDependent (inherited from TrainCar)
UiD (inherited from TrainCar)
UnloadingPartsOpen (inherited from MSTSWagon)
UsingRearCab
Variable1 (inherited from MSTSWagon)
Variable2 (inherited from MSTSWagon)
Variable3 (inherited from MSTSWagon)
Velocity (inherited from TrainCar)
VigilanceMonitor
WagFilePath (inherited from TrainCar)
WaitForAnimationReady (inherited from MSTSWagon)
WeightLoadController (inherited from MSTSWagon)
WheelAxles (inherited from TrainCar)
WheelAxlesLoaded (inherited from TrainCar)
WheelRadiusM (inherited from MSTSWagon)
WheelSlip (inherited from TrainCar)
WheelslipCausesThrottleDown
WheelSlipWarning (inherited from TrainCar)
WheelSpeedMpS (inherited from MSTSWagon)
Wiper
WorldPosition (inherited from TrainCar)

Public Instance Properties

AccelerationMpSS (inherited from TrainCar)
CabRotationZ
Coupler (inherited from MSTSWagon)
Direction (inherited from TrainCar)
DynamicBrakePercent (inherited from TrainCar)
GearboxGearIndex (inherited from TrainCar)
HasFrontCab (inherited from TrainCar)
HasRearCab (inherited from TrainCar)
IsPlayerTrain (inherited from TrainCar)
MSTSBrakeSystem (inherited from MSTSWagon)
OdometerM
OdometerVisible
SpeedMpS (inherited from TrainCar)
TendersSteamLocomotive (inherited from MSTSWagon) Attached steam locomotive in case this wagon is a tender
ThrottlePercent (inherited from TrainCar)

Public Instance Methods

AddBogie (inherited from TrainCar)
AddWheelSet (inherited from TrainCar)
AdjustNotchedThrottle Used by commands to make a single adjustment.
AlerterPressed
AlerterResetOverloaded.
BrakeHoseConnect
ChangeGearDown
ChangeGearUp
ComputeMaxXZ (inherited from TrainCar)
ComputePosition (inherited from TrainCar)
ConfirmWheelslip
Copy This initializer is called when we are making a new copy of a car already loaded in memory. We use this one to speed up loading by eliminating the need to parse the wag file multiple times.
CopyControllerSettings Sets controler settings from other engine for cab switch
CopyCoupler (inherited from MSTSWagon)
DynamicBrakeChangeActiveState
DynamicBrakeChangeTo
EngineBrakeChangeTo
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
FindTendersSteamLocomotive (inherited from MSTSWagon)
GetCabFlipped
GetCentreofGravityM (inherited from MSTSWagon)
GetCombinedHandleValue Determines which sub-control of combined handle is active (based on its type), and returns the overall position considering the split position.
GetCouplerStiffnessNpM (inherited from MSTSWagon)
GetCouplerZeroLengthM (inherited from MSTSWagon)
GetDataOf
GetDebugStatus (inherited from TrainCar)
GetDriverWheelRadiusM (inherited from MSTSWagon)
GetDynamicBrakeStatus
GetEngineBrakeStatus
GetEngineType
GetFilledFraction To be overridden by MSTSSteamLocomotive and MSTSDieselLocomotive.
GetHashCode (inherited from Object)Serves as a hash function for a particular type.
GetLocoNumWheels
GetMaximumCouplerForceN (inherited from TrainCar)
GetMaximumCouplerSlack1M (inherited from MSTSWagon)
GetMaximumCouplerSlack2M (inherited from MSTSWagon)
GetMeasurementUnits (inherited from MSTSWagon)
GetRefillController To be overridden by MSTSSteamLocomotive and MSTSDieselLocomotive.
GetRigidWheelBaseM (inherited from MSTSWagon)
GetSanderOn
GetStatus (inherited from TrainCar)
GetTrackGaugeM (inherited from MSTSWagon)
GetTrainBrakeStatus
GetTrainHandbrakeStatus (inherited from MSTSWagon)
GetType (inherited from Object)Gets the type of the current instance.
GetUnbalancedSuperElevationM (inherited from MSTSWagon)
GetWagonNumWheels (inherited from MSTSWagon)
GetWagonType (inherited from MSTSWagon)
GetXNAMatrix (inherited from TrainCar)
Initialize Called just after the InitializeFromWagFile
InitializeMoving Set starting conditions when initial speed > 0
IsLeadLocomotive
IsOverTrough (inherited from TrainCar) Checks if traincar is over trough. Used to check if refill possible
LimitMotiveForceOverloaded. Adjusts the MotiveForce to account for adhesion limits If UseAdvancedAdhesion is true, dynamic adhesion model is computed If UseAdvancedAdhesion is false, the basic force limits are calculated the same way MSTS calculates them, but the weather handleing is different and Curtius-Kniffler curves are considered as a static limit
Load (inherited from MSTSWagon)
LoadFromWagFile This initializer is called when we haven't loaded this type of car before and must read it new from the wag file.
MoveParamsToAxle We are moving parameters from locomotive to axle.
OdometerReset Set odometer reference distance to actual travelled distance, and set measuring direction to the actual direction
OdometerToggle
OdometerToggleDirection
Parse Parse the wag file parameters required for the simulator and viewer classes
RefillImmediately To be overridden by MSTSSteamLocomotive and MSTSDieselLocomotive.
Refuel
Restore We are restoring a saved game. The TrainCar class has already been initialized. Restore the game state.
Save We are saving the game. Save anything that we'll need to restore the status later.
SetBailOff
SetCombinedHandleValue Determines which sub-control of combined handle is to be set when receiving a combined value. Combined value is in 0-1 range, where arrangement is [[1--throttle--0]split[0--dynamic|airbrake--1]].
SetDirection
SetDynamicBrakePercent
SetDynamicBrakeValue
SetEmergency
SetEngineBrakePercent
SetEngineBrakeValue
SetGearBoxValue
SetPower
SetThrottlePercent
SetThrottleValue
SetTrainBrakePercent
SetTrainBrakeValue
SetTrainHandbrake
SetTrainRetainers
SetUpWheels (inherited from TrainCar)
SetWagonHandbrake (inherited from MSTSWagon)
SignalEventOverloaded.
SignalEvent (inherited from MSTSWagon)Overloaded.
StartDynamicBrakeDecrease
StartDynamicBrakeIncrease
StartEngineBrakeDecrease
StartEngineBrakeIncrease
StartGearBoxDecrease
StartGearBoxIncrease
StartRefillingOrUnloading (inherited from MSTSWagon) Starts a continuous increase in controlled value.
StartReverseDecrease
StartReverseIncrease
StartThrottleDecreaseOverloaded.
StartThrottleIncreaseOverloaded.
StartThrottleToZero
StartTrainBrakeDecrease
StartTrainBrakeIncrease
StopDynamicBrakeDecrease
StopDynamicBrakeIncrease
StopEngineBrakeDecrease Ends change of brake value.
StopEngineBrakeIncrease Ends change of brake value.
StopGearBoxDecrease
StopGearBoxIncrease
StopThrottleDecrease
StopThrottleIncrease
StopTrainBrakeDecrease
StopTrainBrakeIncrease
SuperElevation (inherited from TrainCar)
SwitchToAutopilotControl
SwitchToPlayerControl
ThrottleChangeTo Used by commands to start a continuous adjustment.
ThrottleToZero
ToggleCabLight
ToggleDoorsLeft (inherited from MSTSWagon)
ToggleDoorsRight (inherited from MSTSWagon)
ToggleMirrors (inherited from MSTSWagon)
ToggleWipers
ToString (inherited from Object)Returns a string that represents the current object.
TrainBrakeChangeTo Used by commands to start a continuous adjustment.
Update This is a periodic update to calculate physics parameters and update the base class's MotiveForceN and FrictionForceN values based on throttle settings etc for the locomotive.
UpdateCarriageHeatLoss (inherited from TrainCar) This section calculates the heat loss in a carriage, and is used in conjunction with steam heating. Overall heat loss is made up of the following components - heat loss due to transmission through walls, windows, doors, floors and more (W) + heat loss caused by ventilation (W) + heat loss caused by infiltration (W)
UpdateCurveForce (inherited from TrainCar) Reads current curve radius and computes the CurveForceN friction. Can be overriden by calling base.UpdateCurveForce(); CurveForceN *= someCarSpecificCoef;
UpdateCurveSpeedLimit (inherited from TrainCar) Reads current curve radius and computes the maximum recommended speed around the curve based upon the superelevation of the track
UpdateSoundPosition (inherited from TrainCar)
UpdateTunnelForce (inherited from TrainCar) Tunnel force (resistance calculations based upon formula presented in papaer titled "Reasonable compensation coefficient of maximum gradient in long railway tunnels"

Protected Instance Fields

PreviousDynamicBrakeIntervention

Protected Instance Methods

Finalize (inherited from Object)Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.
ParseEffects
UpdateMotiveForce
UpdateParent Calls the Update method in the parent class MSTSWagon.

See Also

MSTSLocomotive Class | ORTS Namespace