ehem. OMSI - Forum
Würden Sie gerne auf diese Nachricht reagieren? Erstellen Sie einen Account in wenigen Klicks oder loggen Sie sich ein, um fortzufahren.
ehem. OMSI - Forum

Dieses Forum wurde geschlossen. Das neue Forum befindet sich auf www.omnibussimulator.de/forum !
 
StartseiteStartseite  Neueste BilderNeueste Bilder  SuchenSuchen  AnmeldenAnmelden  LoginLogin  

 

 Speed Governor (KPH)

Nach unten 
2 verfasser
AutorNachricht
krtz07




Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 38
Ort : Philadelphia PA

Speed Governor (KPH) Empty
BeitragThema: Speed Governor (KPH)   Speed Governor (KPH) Icon_minitimeSo 17 Apr - 15:39

Well after driving buses on my route for an little over an month now, there were some steep hills in there. Well I have grown annoyed at the fact that the engine was still at full throttle yet the bus was not moving and the engine braking component was not kicking in. So I've decided to implement an speed governor for well whatever bus it can be installed on. Yes, I do not like speed governors but they do give out realism. For now, 72 kph, sounds extremely smooth with this mod implement, if there is any response, I could do an RPM governor as well.

For installation open up the engine OSC file, look for (marco:engine_frame)

Drop this code below (M.L.engine_consumption)

Code:
(M.L.speed_governor)

Next, look for




Code:
{macro:engine_speedcontrol}

   (L.L.engine_n) (C.L.engine_governed_idle_RPM) <
   {if}
      (L.L.engine_additional_throttle) (L.S.Timegap) 0.2 * + (S.L.engine_additional_throttle)
   {else}
      (L.L.engine_additional_throttle) (L.S.Timegap) 0.2 * - 0 max (S.L.engine_additional_throttle)
   {endif}

   (L.L.engine_internal_throttle) (L.L.engine_additional_throttle) + 1 min 0 max (S.L.engine_internal_throttle)

{end}

Paste this code below it
Code:
{macro:speed_governor}


   (L.L.engine_throttle_injection)
      
      {if}
   

       (L.L.Velocity) (F.L.governor) (S.L.engine_throttle_injection)
       
   
      (L.L.throttle) s1 (L.L.engine_throttle_injection) s2 l1 l2 * (S.L.engine_throttle_injection)
     

      
   {endif}


Finally go to any engine_consistfile, and drop this into there, it does not matter of the placement
Code:

[newcurve]
governor
[pnt]
-100.00
1

[pnt]
71.00
1

[pnt]
72
0

To explain it,

[pnt]
-100.00
1
is just an protection value to make sure that the script does what it is suppose to go.


[pnt]
71.00
1

The Governor kicks in at 71 kph, if the throttle is at 100%, then it will be at 100% then start limiting it down above 71 kph.

[pnt]
72
0

72 is in kph and the 0 value represents the amount of throttle_injection into the engine. 0 means no throttle injection, therefore the engine brake will come on. I could even do a script to simulate the retarder to kick in as well, if the overage exceeds an certain kph.
Nach oben Nach unten
http://www.philadelphiatransitvehicles.info
DariusB




Anzahl der Beiträge : 46
Anmeldedatum : 20.02.11

Speed Governor (KPH) Empty
BeitragThema: Re: Speed Governor (KPH)   Speed Governor (KPH) Icon_minitimeDo 21 Apr - 19:55

Nice one!
I think it only works on the 202?
Do you know how to script that the governor is only active when the key is plugged in?
Nach oben Nach unten
krtz07




Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 38
Ort : Philadelphia PA

Speed Governor (KPH) Empty
BeitragThema: Re: Speed Governor (KPH)   Speed Governor (KPH) Icon_minitimeDo 21 Apr - 20:33

DariusB schrieb:
Nice one!
I think it only works on the 202?
Do you know how to script that the governor is only active when the key is plugged in?
When the "battery" is cut off? sure that should not be any problem to script out.
Nach oben Nach unten
http://www.philadelphiatransitvehicles.info
DariusB




Anzahl der Beiträge : 46
Anmeldedatum : 20.02.11

Speed Governor (KPH) Empty
BeitragThema: Re: Speed Governor (KPH)   Speed Governor (KPH) Icon_minitimeDo 21 Apr - 20:51

Okay you just add

(L.L.elec_busbar_main_sw) {if}

after

{macro:speed_governor}

and don't forget the {endif} in the end.

Btw, i'll be in Philly next month Smile
Nach oben Nach unten
krtz07




Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 38
Ort : Philadelphia PA

Speed Governor (KPH) Empty
BeitragThema: Re: Speed Governor (KPH)   Speed Governor (KPH) Icon_minitimeDo 21 Apr - 21:04

DariusB schrieb:
Okay you just add

(L.L.elec_busbar_main_sw) {if}

after

{macro:speed_governor}

and don't forget the {endif} in the end.

Btw, i'll be in Philly next month Smile
yea
Nach oben Nach unten
http://www.philadelphiatransitvehicles.info
krtz07




Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 38
Ort : Philadelphia PA

Speed Governor (KPH) Empty
BeitragThema: Re: Speed Governor (KPH)   Speed Governor (KPH) Icon_minitimeDi 26 Apr - 21:11

DariusB schrieb:
Okay you just add

(L.L.elec_busbar_main_sw) {if}

after

{macro:speed_governor}

and don't forget the {endif} in the end.

Btw, i'll be in Philly next month Smile
Awesome, hope you enjoy it here in Philadelphia and get to ride on some of the equipment here. The speed limiter should work on all of the buses, including the cars! Very Happy
Nach oben Nach unten
http://www.philadelphiatransitvehicles.info
DariusB




Anzahl der Beiträge : 46
Anmeldedatum : 20.02.11

Speed Governor (KPH) Empty
BeitragThema: Re: Speed Governor (KPH)   Speed Governor (KPH) Icon_minitimeDi 26 Apr - 23:07

Thanks.
Yes it works on all vehicles, it was my mistake.
Nach oben Nach unten
Gesponserte Inhalte





Speed Governor (KPH) Empty
BeitragThema: Re: Speed Governor (KPH)   Speed Governor (KPH) Icon_minitime

Nach oben Nach unten
 
Speed Governor (KPH)
Nach oben 
Seite 1 von 1
 Ähnliche Themen
-
» Need For Speed World
» Speed Cameras
» Rollband Speed?
» Steady Speed
» (release) SPEED

Befugnisse in diesem ForumSie können in diesem Forum nicht antworten
ehem. OMSI - Forum :: OMSI-Design (english) :: Script programming-
Gehe zu: