News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Tilting trains not tilting

Started by Vladki, April 22, 2020, 07:26:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

I have invested in those new fancy pendolinos, and they negotiate curves at the same speed as normal trains. Can be observed at stephenson-siemens game, player : gretat beltwell railroad, line hollyingchester - lininglow, for example on approach to dalenchurch station (from south) - (776,60)

Mariculous

I guess it's a feature, not a bug ;)
There is a minimum curve radius for tilting that can be set in the dats.

Vladki

Oh yes: tilting_min_radius_effect=1000
But I found that Czech pendolino class 680, can tilt on corners from 250 m

I was not able to quickly find any value for british rails, but I expect it to be similar.

jamespetts

Quote from: Vladki on April 23, 2020, 07:47:32 AM
Oh yes: tilting_min_radius_effect=1000
But I found that Czech pendolino class 680, can tilt on corners from 250 m

I was not able to quickly find any value for british rails, but I expect it to be similar.

Thank you for that. Are you able to link to a source for this information?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

https://cs.wikipedia.org/wiki/Elektrick%C3%A1_jednotka_680

Unfortunately the information is only in the Czech version. If you look at the specs on the right column:

Minimální poloměr
projížděných oblouků    
s naklápěním: 250 m
bez naklápění: 190 m
do 10 km/h: 150 m

Minimum curve radius:
with tilting: 250 m
without tilting: 190 m
speed <10 km/h: 150 m

However I had in simuconf.tab for pak.cs minimum value of 300 m, but I was unable to find the source. Maybe the wikipedia article had been updated.

Mariculous

#5
German train protection system for tilting trains activates tilting at speeds above 70 km/h.
https://en.wikipedia.org/wiki/Geschwindigkeits%C3%BCberwachung_Neigetechnik

Real-world calculations tell me that pasing a 250m curve at 70 km/h at a maximum lateral acceleration of 1 m/s² requires a superelevation of ~80mm.

In simutrans we always assume a superelevation of 0.
Further, maximum lateral acceleration is set to 0.918 (1/10 G) in simuconf.

In this case, a curve radius of 385m is required to reach 70 km/h.

:coffee:

I could not find such detailled information about TASS, the British eqivalent to GNT. The only informations I could find about it were moreover advertising the technique as it increased lne speed on some lines from 110 mph to 125 mph

jamespetts

Thank you all for that: that is most helpful. I have just pushed an update to the pakset to reduce the minimum radius for tilting trains to 375m (chosen to be an integral number of tiles at 125m/tile, i.e., 3 tiles).

The change will not affect existing saved games: I cannot now recall whether this setting can be modified in the advanced settings dialogue, which would allow it to be changed in existing saved games.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran(retired)

Quote from: jamespetts on April 23, 2020, 11:52:17 AMI cannot now recall whether this setting can be modified in the advanced settings dialogue, which would allow it to be changed in existing saved games.
#progdir_overrides_savegame_settings = 1
#pak_overides_savegame_settings = 1


By enabling the settings related to this, you can overwrite the settings in simuconf.tab even after the game starts.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Mariculous

Quote from: jamespetts on April 23, 2020, 11:52:17 AMThe change will not affect existing saved games: I cannot now recall whether this setting can be modified in the advanced settings dialogue, which would allow it to be changed in existing saved games.
It cannot be modified in the dialog.

Quote from: Ranran on April 23, 2020, 11:58:32 AMBy enabling the settings related to this, you can overwrite the settings in simuconf.tab even after the game starts.

Exactly.
There is yet another one: userdir_overrides_savegame_settings = 1
If all are set to 1, servers settings will always be up-to-date, whilst server specific changes that differ from pakset defaults should be put in userdirs simuconf.
Sadly, one cannot enforce climate levels in simuconf, or at least I don't know how.

Vladki

I tried to hack the xml save, but I cannot load it back even if not modified at all:

Warning: karte_t::load: Fileversion: 120004
FATAL ERROR: loadsave_t::start_tag() - expected "/roadsign_t", got "koord3d>
  b�"
Aborting program execution ...

For help with this error or to file a bug report please see the Simutrans forum at
http://forum.simutrans.com
Neúspěšně ukončen (SIGABRT)


Is there some nice explanation what these *_overrides_savegame_settings options do?
If I have simutrans isntlaled in ~/simutrans ?  What takes precedence over what?
I have some non-default settings in the save, is there a way to dump them? Ideally in form of simuconf.tab?

Where could I hack the setting dialog to add the tilting option?

Mariculous

Quote from: Vladki on April 23, 2020, 04:01:39 PMI tried to hack the xml save, but I cannot load it back even if not modified at all:
Many text editors will somehow mess up the save. Simutrans is extremely sensitive to the format.

Quote from: Vladki on April 23, 2020, 04:01:39 PMIs there some nice explanation what these *_overrides_savegame_settings options do?
It actually does what it pretends to do. Settings in simuconfs will take precedence over settings stored in the savegame.
For the three different simuconfs the usual rules apply:
games simuconf is loaded first, then paksets simuconf will override these settings and finally users simuconf will override again.

Vladki

Quote from: Freahk on April 23, 2020, 04:10:35 PMMany text editors will somehow mess up the save. Simutrans is extremely sensitive to the format.
As I said I cannot load it back even if not modified at all.

Wat's the differnece betwee game's and user's simuconf if game is installed in ~/simutrans ?

Ranran(retired)

Those 3 parameters need to enable only one correct depending on which folder you have set to save sve files.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Mariculous

Quote from: Vladki on April 23, 2020, 05:29:18 PMWat's the differnece betwee game's and user's simuconf if game is installed in ~/simutrans ?
In that case there is no difference in extended.
Standards userdir seems to be ~/.simutrans, at least that's the case in opensuse.

Vladki

So It was indeed a bug. Th etilt_min_radius was working as tilt_max_radius. Here is the patch:
https://github.com/vladki77/simutrans-extended/commit/03d368ec9fb29e245c67f33fcd8de56670b3682b

And also added the option to settings dialog:
https://github.com/vladki77/simutrans-extended/commit/7db50c35df065ec44e02f2edf14ebe7caea202c3


diff --git a/gui/settings_stats.cc b/gui/settings_stats.cc
index 93d3816c2..7e2a638bd 100644
--- a/gui/settings_stats.cc
+++ b/gui/settings_stats.cc
@@ -241,6 +241,7 @@ void settings_extended_general_stats_t::init( settings_t *sets )
        INIT_NUM("max_diversion_tiles", sets->get_max_diversion_tiles(), 0, 65535, gui_numberinput_t::AUTOLINEAR, false );
        INIT_NUM("way_degradation_fraction", sets->get_way_degradation_fraction(), 0, 40, gui_numberinput_t::AUTOLINEAR, false );
        INIT_NUM("sighting_distance_meters", sets->get_sighting_distance_meters(), 0, 7500, gui_numberinput_t::AUTOLINEAR, false );
+       INIT_NUM("tilting_min_radius_effect", sets->get_tilting_min_radius_effect(), 0, 10000, gui_numberinput_t::AUTOLINEAR, false );
        INIT_NUM("assumed_curve_radius_45_degrees", sets->get_assumed_curve_radius_45_degrees(), 0, 10000, gui_numberinput_t::AUTOLINEAR, false );
        INIT_NUM("max_speed_drive_by_sight_kmh", sets->get_max_speed_drive_by_sight_kmh(), 0, 1000, gui_numberinput_t::AUTOLINEAR, false );
        INIT_NUM("time_interval_seconds_to_clear", sets->get_time_interval_seconds_to_clear(), 0, 10000, gui_numberinput_t::AUTOLINEAR, false );
@@ -361,6 +362,7 @@ void settings_extended_general_stats_t::read(settings_t *sets)
        READ_NUM_VALUE( sets->way_degradation_fraction );
        READ_NUM_VALUE( sets->sighting_distance_meters );
        sets->sighting_distance_tiles = sets->sighting_distance_meters / sets->meters_per_tile;
+       READ_NUM_VALUE( sets->tilting_min_radius_effect );
        READ_NUM_VALUE( sets->assumed_curve_radius_45_degrees );
        READ_NUM_VALUE( sets->max_speed_drive_by_sight_kmh );
        sets->max_speed_drive_by_sight = kmh_to_speed(sets->max_speed_drive_by_sight_kmh);
diff --git a/vehicle/simvehicle.cc b/vehicle/simvehicle.cc
index 609e418e5..1c913ec71 100644
--- a/vehicle/simvehicle.cc
+++ b/vehicle/simvehicle.cc
@@ -1962,7 +1962,7 @@ sint32 vehicle_t::calc_speed_limit(const weg_t *w, const weg_t *weg_previous, fi

                        // Adjust for tilting.
                        // Tilting only makes a difference to reasonably wide corners.
-                       if(is_tilting && radius < tilting_min_radius_effect)
+                       if(is_tilting && radius > tilting_min_radius_effect)
                        {
                                // Tilting trains can take corners faster
                                corner_limit = (corner_limit * 130) / 100;