[Mod] Advanced Trains [advtrains] [2.4.3]

User avatar
Blockhead
Member
Posts: 1602
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Blockhead » Post

Today's menu: One silly image, one serious image. The serious image pertains to space requirements and I have made a page with the info on the wiki. The silly one? Well, look at the filename, guess, then open it..

Image
Attachments
SpaceRequirementsForAdvtrains.png
SpaceRequirementsForAdvtrains.png (667.12 KiB) Viewed 3444 times
CrossingMonster.gif
CrossingMonster.gif (946.04 KiB) Viewed 3444 times
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Blockhead wrote:
Thu Nov 25, 2021 05:36
Today's menu: One silly image, one serious image. The serious image pertains to space requirements and I have made a page with the info on the wiki. The silly one? Well, look at the filename, guess, then open it.
Thank you for all your work relating to AdvTrains. Did you photograph this screenshot in a singlenode world with worldedit, or were you really high up?

Thank god for forgiving collisions! My trains are no longer zones of death for each block but can now be decorated with mineshaft frames, fences, or glow glass slabs. It's one of those features which can be made but should never be taken away, for backwards compatibility.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Thank you all so much for this mod. Here is a screenshot of one of the most important infrastructure interchanges on my server. It includes carts, hiking, and train infrastructure, and also has a museum of tunnel types as well. It's a bit of a mess, but i love it. An overview is available here. I hope my interchange inspires many other ones.

Image
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
Blockhead
Member
Posts: 1602
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Blockhead » Post

56independent_actual wrote:
Thu Nov 25, 2021 07:55
Thank you for all your work relating to AdvTrains.
Thank you, it's good to know that I'm appreciated.
56independent_actual wrote:
Thu Nov 25, 2021 07:55
Did you photograph this screenshot in a singlenode world with worldedit, or were you really high up?
Actually it's an enclosed set that's part of a larger world but surrounded by greenscreen nodes which are chroma keyed out in GIMP. This is a great technique for putting trains and tracks on a transparent background, and it's what I used for the train catalogue.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Blockhead wrote:
Thu Nov 25, 2021 12:35
Actually it's an enclosed set that's part of a larger world but surrounded by greenscreen nodes which are chroma keyed out in GIMP. This is a great technique for putting trains and tracks on a transparent background, and it's what I used for the train catalogue.
Thank you. Is the world specifically for train photography or do you use it recreationally?
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
Blockhead
Member
Posts: 1602
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Blockhead » Post

56independent_actual wrote:
Thu Nov 25, 2021 12:36
Blockhead wrote:
Thu Nov 25, 2021 12:35
Actually it's an enclosed set that's part of a larger world but surrounded by greenscreen nodes which are chroma keyed out in GIMP. This is a great technique for putting trains and tracks on a transparent background, and it's what I used for the train catalogue.
Thank you. Is the world specifically for train photography or do you use it recreationally?
It's part of my personal testing world "ThereIsNoTrain" which has no serious routes, only a lot of little bits of track around to test things with. The name comes from how I was debugging issues under Windows not being able to load the AdvTrains files properly, hence there was no train when you loaded the world even if there was before. It's since been used (not in chronological order):
  • To test during the development of the Y and 3-way turnouts, including their functioning with interlocking and LuaATC.
  • To test all the different shapes of level crossing nodes
  • To test the output of my fork of netmapper.
  • To test really long trains, to see what happens when you can't see one end of the train from the other
  • For silly images like the LOOP (self-intersecting train on a figure eight) and today's silly one about a rotating 16-direction diamond crossing.
  • All the stuff in the train catalogue and I think a few other misc. screenshots
  • To test advice given to people about track arrangements, such as a simple siding loop design
  • To test my fork of
  • To test 45 degree platforms after I made the models.
    ...and a whole bunch of other minor things.
Most of my builds/advtrains work is on LinuxForks and in the past week or so on Pandorabox. There's also Noah's Railyard (look out for a new version on the horizon). On servers I don't always build the right of way, sometimes just setting up interlocking and services.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Blockhead wrote:
Thu Nov 25, 2021 13:51
On servers I don't always build the right of way, sometimes just setting up interlocking and services.
Thanks. I can understand why. Being a subject of an Admin means that infrastrucutre already exists, but i, as an admin of a server which is effectively singleplayer, have to build my own infrastructure.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Arony
New member
Posts: 3
Joined: Tue Sep 05, 2017 19:26
In-game: Paceflat server

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Arony » Post

Codesound wrote:
Wed Nov 24, 2021 20:40
Hi,

the Rev.3 of the tutorial is here.... hope you like it...
Blockhead wrote:
Mon Nov 22, 2021 12:44
- Terminology: You said Rule but to be consistent with advtrains the term should be Route. When I hear "Rule" I think ARS Rule like on signals and station/stop tracks

do you allow me for this tutorial this term? ;-) with the next I will use the term "instructors" (...)

https://www.0090.it/cc/index.php/s/7nLcimzbHR6MtKb

thanks for all....

bye
Ottima Guida facile da capire per persone "userfriendly"
Server: Paceflat

User avatar
loppi
Member
Posts: 162
Joined: Sat May 29, 2021 11:30
In-game: loppi Lolstadt
Location: Niedersachsen,Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by loppi » Post

i found this on youtube,maybe someone could mod this:
https://www.youtube.com/watch?v=WDfhtW23OWs


it would fit perfectly for the moretrains:vintage minecarts.
:-)

maybe a minecart without walls,or with tree loaded for example would be nice. i wanted to make it miself but hen i noticed all wagons use the same texture file.... so when i remove the walls they are removed at all carts :/
"ich liebe industrie!" And yes, its a Russian Bulldozer 😁

User avatar
T6C
Member
Posts: 119
Joined: Thu May 07, 2020 17:11
In-game: T6C

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by T6C » Post

I love the horseshoe on the front. XD

User avatar
loppi
Member
Posts: 162
Joined: Sat May 29, 2021 11:30
In-game: loppi Lolstadt
Location: Niedersachsen,Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by loppi » Post

XD yeah the youtuber says it brings luck.
https://www.youtube.com/watch?v=6Wu9ERTO5GY
here's another video from him,at the middle of the video,e says shut up to the polish cow XD
"ich liebe industrie!" And yes, its a Russian Bulldozer 😁

User avatar
loppi
Member
Posts: 162
Joined: Sat May 29, 2021 11:30
In-game: loppi Lolstadt
Location: Niedersachsen,Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by loppi » Post

56independent_actual wrote:
Thu Nov 25, 2021 07:55
forgiving collisions!
yea its very nice,especially for minecarts and narrow gauge trains.
now you can make the walls out of slabs and create a 2.5 block heigh,narrow tunnel
"ich liebe industrie!" And yes, its a Russian Bulldozer 😁

User avatar
loppi
Member
Posts: 162
Joined: Sat May 29, 2021 11:30
In-game: loppi Lolstadt
Location: Niedersachsen,Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by loppi » Post

still working at my texture pack.

i also have a name for it now: "European Railways Texturepack"

:-)
Attachments
screenshot_20211212_155708.png
screenshot_20211212_155708.png (518.34 KiB) Viewed 3443 times
"ich liebe industrie!" And yes, its a Russian Bulldozer 😁

User avatar
severak
Member
Posts: 35
Joined: Fri Jul 06, 2012 10:40
GitHub: severak
In-game: Severak
Location: Kudowa-Zdroj
Contact:

Remote train control

by severak » Post

Hi. Many thanks for Advtrains. It really hooked me into Minetest again.

I started toying with train and track remote control and figured out how to create train remote control with Lua ATC rain, microcontroller, digiterms and some lua code (see here - https://gist.github.com/severak/235c28c ... bf532be23f). It works surprisingly well until it hits something (including other trains - thus unusable for shunting). If it hits something trains get stuck and it's unresponsible with no way to fix it with remote control.

Then I decided to convert it into proper "train remote control" mod.

Thus these questions apparead:

- is there any internal API for controlling the trains?
- is this somewhat stable?
- is this documented or do I need to reverse engineer it from advtrains code? (which file then?)
- how to detect stuck train?
- it's possible to unstuck it in some scenarios? (for example when stuck by another train in front of it)

Any answer or hint would be aprecciated.

Maverick2797
Member
Posts: 128
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: Poking about here and there...

Re: Remote train control

by Maverick2797 » Post

severak wrote:
Thu Dec 16, 2021 10:04
Hi. Many thanks for Advtrains. It really hooked me into Minetest again.

I started toying with train and track remote control and figured out how to create train remote control with Lua ATC rain, microcontroller, digiterms and some lua code (see here - https://gist.github.com/severak/235c28c ... bf532be23f). It works surprisingly well until it hits something (including other trains - thus unusable for shunting). If it hits something trains get stuck and it's unresponsible with no way to fix it with remote control.

Then I decided to convert it into proper "train remote control" mod.

Thus these questions apparead:

- is there any internal API for controlling the trains?
- is this somewhat stable?
- is this documented or do I need to reverse engineer it from advtrains code? (which file then?)
- how to detect stuck train?
- it's possible to unstuck it in some scenarios? (for example when stuck by another train in front of it)

Any answer or hint would be aprecciated.
ywang made a train remote mod a little while ago, might be a good starting point to expand from:
viewtopic.php?f=9&t=26814
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
severak
Member
Posts: 35
Joined: Fri Jul 06, 2012 10:40
GitHub: severak
In-game: Severak
Location: Kudowa-Zdroj
Contact:

Re: Remote train control

by severak » Post

Maverick2797 wrote:
Thu Dec 16, 2021 10:12
ywang made a train remote mod a little while ago, might be a good starting point to expand from:
viewtopic.php?f=9&t=26814
Nice. I will test that.

Thanks a lot!

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: Remote train control

by yw05 » Post

severak wrote:
Thu Dec 16, 2021 10:04
- is there any internal API for controlling the trains?
Depends on what you mean by "internal". If you are in the LuaATC environment, more or less everything is documented (although the quality of the documentation may vary across the API). If you are using a mod to do things, you can access various train properties (usually directly), but you may need to use various functions in advtrains to set train properties, as you may trigger undefined behavior otherwise.

The main functions I can remember off my head include a function to set the ATC command (advtrains.atc.train_send_command) and a function to reverse a train (advtrains.reverse_train).
- is this somewhat stable?
LuaATC functions rarely break between releases, but if you are calling advtrains' internal functions directly from the modding environment, this may or may not be stable, depending on whether people have changed it when new features are added.

I personally do not follow the development of advtrains closely enough to be able to tell such (in the modding environment) breakages, but I have personally made breaking changes to the speed restriction property of the trains with the new-ks branch merged last month (IIRC). This may be less relevant to train controls, though.
- is this documented or do I need to reverse engineer it from advtrains code? (which file then?)
Not much is really documented, as far as I am aware. Some newer functions (ones introduced last year or so) are documented quite well, but older (i.e. most) ones are not really documented.

As far as I am aware, most functions intended to be only used by advtrains (which are, I think, most that are relevant to what you are doing) are not documented. I suppose the idea is to prevent other modders from becoming dependent on these functions, but this also means that you need to look into the source code yourself.

If you want to look into some internals with train control and movement, you might want to look at:
- advtrains/trainlogic.lua
- advtrains/path.lua (if you are looking into the path system for some reason)
- advtrains/occupation.lua (which, I think, includes functions involving train collisions and such)
- advtrains/atc.lua (with functions related to ATC)
- advtrains_luaautomation/atc_rail.lua (which has some LuaATC-specific functions)
- it's possible to unstuck it in some scenarios? (for example when stuck by another train in front of it)
A possible dirty method inside the modding environment would be to reverse the train and directly set the lever, although I have not tried it myself. I am not sure how to do this with (Lua)ATC though. (For some context: IIRC trains switch to manual control when it collides, unless the train is in autocouple mode, in which case the train would couple with the other train and then move on)

In any case, you should use a system like interlocking to prevent train collisions in the first place.
Last edited by yw05 on Thu Dec 16, 2021 18:30, edited 1 time in total.

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: Remote train control

by yw05 » Post

Maverick2797 wrote:
Thu Dec 16, 2021 10:12
ywang made a train remote mod a little while ago, might be a good starting point to expand from:
viewtopic.php?f=9&t=26814
I originally wrote that as a submission to a random contest (IIRC), and the code is currently a mess that I have been too lazy to sort out for ages.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

How do the train timing prediction systems (The ones that say "5 seconds for a train to where someone wants to goli") work in Linuxforks? Do you use an ATC rail, which measures the speed of the train (and its line), and uses the distance to calculate time (Using the formula m/s*d, and (m/s*d)/60 for minutes? I am looking for a system i can implement on my server to allow my stations to have live predictions.
Spoiler
I do have the code. But i need a basic explanation to the steps it takes (a bit like {read train, do calculation, send}).

Code: Select all

--  digiline_send("l14w", "SIS Variant 2 - v1.4 | No info avaliable")


local appr_time = {[1]=15, [4]=15}
if not appr_tmr then appr_tmr = 0 end
local setint = false
if event.ext_int then
  if event.message == "dep4" then
     next_appr = 4
     appr_tmr = appr_time[4]
     nwaiting = nnwaiting
     nnwaiting = nil
     setint=true
  elseif event.message == "dep1" then
     next_appr = 1
     appr_tmr = appr_time[1]
     nwaiting = nnwaiting
     nnwaiting = nil
     setint=true
  elseif event.message == "arr1" then
    if nwaiting then nnwaiting = 1 else nwaiting = 1 end
  elseif event.message == "arr4" then
    if nwaiting then nnwaiting = 4 else nwaiting = 4 end
  elseif event.message == "depo" then
    next_appr = nil
  end
elseif event.int then
  appr_tmr = appr_tmr - 5
  setint=true
else
  next_appr = nil
  nwaiting = nil
  nnwaiting = nil
  digiline_send("l14w", "SIS Variant 2 - v1.4 | Please Wait")
  return
end

-- calculate time for nwaiting train
local nwt = 0
if nwaiting then
  nwt = appr_tmr + 10 + appr_time[nwaiting]
end
--display
local seconds = appr_tmr
if appr_tmr <= 0 then
  seconds = ""
end
local txt = {
  [1] = "Palm Bay",
  [4] = "Apple Grove",
}
local line1, line2, line3 = "", "", ""
if next_appr then
  line1 = "Line "..next_appr
  line2 = txt[next_appr]
  line3 = "in " .. seconds.."s"
  if seconds == "" then
    line3 = "now"
  end
end
local line4 = ""
if nwt>0 then
  line4 = "Line "..nwaiting.." - "..nwt.."s"
end
digiline_send("l14w", line1.." | "..line2.." | "..line3.." | ----------- | "..line4)

digiline_send("l14wint", "Appr: "..(next_appr or "-").." "..appr_tmr.."s".." | nwaiting: "..(nwaiting or "-").." | nnwaiting: "..(nnwaiting or "-").. " | "..event.type.." | "..(event.message or "-"))

if appr_tmr > 0 and setint then
  interrupt(5, "appr")
end
I would also like to see how the signage at Image works, but the Origin-type signage is already good enough.
Last edited by 56independent_actual on Sun Dec 19, 2021 11:38, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

What is the best way to quickly fill a 3 km tunnel with parallel tracks? Using worldedit, the tracks kept on flipping to the y axis, instead of making a line on the x axis.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Maverick2797
Member
Posts: 128
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: Poking about here and there...

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Maverick2797 » Post

56independent_actual wrote:
Sun Dec 19, 2021 11:18
What is the best way to quickly fill a 3 km tunnel with parallel tracks? Using worldedit, the tracks kept on flipping to the y axis, instead of making a line on the x axis.
Digtron. Advtrains does funny things when worldedit is used
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Maverick2797 wrote:
Sun Dec 19, 2021 11:20
Digtron. Advtrains does funny things when worldedit is used
Thanks. it becomes quite easy to forget simple solutions when the primary tool used is worldedit and creative.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Sun Dec 19, 2021 11:12
How do the train timing prediction systems (The ones that say "5 seconds for a train to where someone wants to goli") work in Linuxforks? Do you use an ATC rail, which measures the speed of the train (and its line), and uses the distance to calculate time (Using the formula m/s*d, and (m/s*d)/60 for minutes? I am looking for a system i can implement on my server to allow my stations to have live predictions.
I have never heard of the m/s*d formula.

\Delta t = \frac{\Delta v}{a} (assuming you know LaTeX)
Spoiler
I do have the code. But i need a basic explanation to the steps it takes (a bit like {read train, do calculation, send}).

Code: Select all

--  digiline_send("l14w", "SIS Variant 2 - v1.4 | No info avaliable")


local appr_time = {[1]=15, [4]=15}
if not appr_tmr then appr_tmr = 0 end
local setint = false
if event.ext_int then
  if event.message == "dep4" then
     next_appr = 4
     appr_tmr = appr_time[4]
     nwaiting = nnwaiting
     nnwaiting = nil
     setint=true
  elseif event.message == "dep1" then
     next_appr = 1
     appr_tmr = appr_time[1]
     nwaiting = nnwaiting
     nnwaiting = nil
     setint=true
  elseif event.message == "arr1" then
    if nwaiting then nnwaiting = 1 else nwaiting = 1 end
  elseif event.message == "arr4" then
    if nwaiting then nnwaiting = 4 else nwaiting = 4 end
  elseif event.message == "depo" then
    next_appr = nil
  end
elseif event.int then
  appr_tmr = appr_tmr - 5
  setint=true
else
  next_appr = nil
  nwaiting = nil
  nnwaiting = nil
  digiline_send("l14w", "SIS Variant 2 - v1.4 | Please Wait")
  return
end

-- calculate time for nwaiting train
local nwt = 0
if nwaiting then
  nwt = appr_tmr + 10 + appr_time[nwaiting]
end
--display
local seconds = appr_tmr
if appr_tmr <= 0 then
  seconds = ""
end
local txt = {
  [1] = "Palm Bay",
  [4] = "Apple Grove",
}
local line1, line2, line3 = "", "", ""
if next_appr then
  line1 = "Line "..next_appr
  line2 = txt[next_appr]
  line3 = "in " .. seconds.."s"
  if seconds == "" then
    line3 = "now"
  end
end
local line4 = ""
if nwt>0 then
  line4 = "Line "..nwaiting.." - "..nwt.."s"
end
digiline_send("l14w", line1.." | "..line2.." | "..line3.." | ----------- | "..line4)

digiline_send("l14wint", "Appr: "..(next_appr or "-").." "..appr_tmr.."s".." | nwaiting: "..(nwaiting or "-").." | nnwaiting: "..(nnwaiting or "-").. " | "..event.type.." | "..(event.message or "-"))

if appr_tmr > 0 and setint then
  interrupt(5, "appr")
end
Looks like this is triggered by an external interrupt and then just counts down.
I would also like to see how the signage at Image works, but the Origin-type signage is already good enough.
I wrote that over two years ago, and I am not sure whether I still have the code for that.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

yw05 wrote:
Sun Dec 19, 2021 13:12
I have never heard of the (m/s)/d formula.
It's rearranged s = dt, but with s being replaced with m/s, so it's or t = s/d.
Looks like this is triggered by an external interrupt and then just counts down.

I wrote that over two years ago, and I am not sure whether I still have the code for that.
Where does the interrupt come from, (this was found in origin, literally /origin, with the platforms by the side)?

Can't you visit the site of deployment?
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Sun Dec 19, 2021 13:24
yw05 wrote:
Sun Dec 19, 2021 13:12
I have never heard of the (m/s)/d formula.
It's rearranged s = dt, but with s being replaced with m/s, so it's or t = s/d.
Eh, v = \frac{\Delta s}{\Delta t}

Also, that formula calculates the average speed (or the speed of the movement at constant velocity), so \Delta t = \frac{\Delta s}{v} does not give the result you want for a (in this case) decelerating train.
Looks like this is triggered by an external interrupt and then just counts down.

I wrote that over two years ago, and I am not sure whether I still have the code for that.
Where does the interrupt come from, (this was found in origin, literally /origin, with the platforms by the side)?

Can't you visit the site of deployment?
The interrupt apparently the comes from a track a bit away from the station.

As an unrelated note, I had setups where the brake was applied using an ATC track. The distance was manually calculated, and I suppose this is also the case for this line.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests