Ejemplo n.º 1
0
        public GearBox(GearBox copy, DieselEngine de)
        {
            mstsParams   = new MSTSGearBoxParams(copy.mstsParams);
            DieselEngine = de;

            if (mstsParams != null)
            {
                if ((!mstsParams.IsInitialized) && (mstsParams.AtLeastOneParamFound))
                {
                    Trace.TraceWarning("Some of the gearbox parameters are missing! Default physics will be used.");
                }
                for (int i = 0; i < mstsParams.GearBoxNumberOfGears; i++)
                {
                    Gears.Add(new Gear(this));
                    Gears[i].BackLoadForceN      = mstsParams.GearBoxBackLoadForceN;
                    Gears[i].CoastingForceN      = mstsParams.GearBoxCoastingForceN;
                    Gears[i].DownGearProportion  = mstsParams.GearBoxDownGearProportion;
                    Gears[i].IsDirectDriveGear   = (mstsParams.GearBoxDirectDriveGear == mstsParams.GearBoxNumberOfGears);
                    Gears[i].MaxSpeedMpS         = mstsParams.GearBoxMaxSpeedForGearsMpS[i];
                    Gears[i].MaxTractiveForceN   = mstsParams.GearBoxMaxTractiveForceForGearsN[i];
                    Gears[i].OverspeedPercentage = mstsParams.GearBoxOverspeedPercentageForFailure;
                    Gears[i].UpGearProportion    = mstsParams.GearBoxUpGearProportion;
                    Gears[i].Ratio = mstsParams.GearBoxMaxSpeedForGearsMpS[i] / DieselEngine.MaxRPM;
                }
                GearBoxOperation         = mstsParams.GearBoxOperation;
                OriginalGearBoxOperation = mstsParams.GearBoxOperation;
            }
        }
Ejemplo n.º 2
0
        public GearBox(GearBox copy, DieselEngine de)
        {
            mstsParams   = new MSTSGearBoxParams(copy.mstsParams);
            DieselEngine = de;

            CopyFromMSTSParams(DieselEngine);
        }
Ejemplo n.º 3
0
 public MSTSGearBoxParams(MSTSGearBoxParams copy)
 {
     GearBoxNumberOfGears                 = copy.GearBoxNumberOfGears;
     GearBoxDirectDriveGear               = copy.GearBoxDirectDriveGear;
     GearBoxOperation                     = copy.GearBoxOperation;
     GearBoxEngineBraking                 = copy.GearBoxEngineBraking;
     GearBoxMaxSpeedForGearsMpS           = new List <float>(copy.GearBoxMaxSpeedForGearsMpS);
     GearBoxMaxTractiveForceForGearsN     = new List <float>(copy.GearBoxMaxTractiveForceForGearsN);
     GearBoxOverspeedPercentageForFailure = copy.GearBoxOverspeedPercentageForFailure;
     GearBoxBackLoadForceN                = copy.GearBoxBackLoadForceN;
     GearBoxCoastingForceN                = copy.GearBoxCoastingForceN;
     GearBoxUpGearProportion              = copy.GearBoxUpGearProportion;
     GearBoxDownGearProportion            = copy.GearBoxDownGearProportion;
     initLevel = copy.initLevel;
 }
Ejemplo n.º 4
0
 public void Copy(MSTSGearBoxParams copy)
 {
     GearBoxNumberOfGears                 = copy.GearBoxNumberOfGears;
     GearBoxDirectDriveGear               = copy.GearBoxDirectDriveGear;
     GearBoxType                          = copy.GearBoxType;
     ClutchType                           = copy.ClutchType;
     GearBoxOperation                     = copy.GearBoxOperation;
     GearBoxEngineBraking                 = copy.GearBoxEngineBraking;
     GearBoxMaxSpeedForGearsMpS           = new List <float>(copy.GearBoxMaxSpeedForGearsMpS);
     GearBoxChangeUpSpeedRpM              = new List <float>(copy.GearBoxChangeUpSpeedRpM);
     GearBoxChangeDownSpeedRpM            = new List <float>(copy.GearBoxChangeDownSpeedRpM);
     GearBoxMaxTractiveForceForGearsN     = new List <float>(copy.GearBoxMaxTractiveForceForGearsN);
     GearBoxTractiveForceAtSpeedN         = new List <float>(copy.GearBoxTractiveForceAtSpeedN);
     GearBoxOverspeedPercentageForFailure = copy.GearBoxOverspeedPercentageForFailure;
     GearBoxBackLoadForceN                = copy.GearBoxBackLoadForceN;
     GearBoxCoastingForceN                = copy.GearBoxCoastingForceN;
     GearBoxUpGearProportion              = copy.GearBoxUpGearProportion;
     GearBoxDownGearProportion            = copy.GearBoxDownGearProportion;
     FreeWheelFitted                      = copy.FreeWheelFitted;
     initLevel = copy.initLevel;
 }