Jump to content

Arduino Data


efla83

Recommended Posts

i'd wait at least until the whole simulator is released, 
a lot of stuff is turned off for the playtests,

 

also, not sure why you would use an arduino to display things on a 'screen'  on a real speedometer with a moving needle, yes you need the software to hardware interface that an arduino provides,

but to take a software source (the trains speed data' from the sim) and display it on a software based screen (2nd monitor, android tablet, phone etc) you want to keep it all in software,

so write a bit of code that grabs the speed and other data from the train, and sends it to another program running on your computer or the android tablet, then write the software that reads that data and displays it on the screen,

Same way they did with https://www.ts-mfd.de/ for railworks/train simulator classic, where 2 pieces of software were used, one to extract the data from the train in the game, and send it to the software on the tablet / screen, where it's rendered into a replica of the MFD or EBuLa in German trains.

  • Like 1
Link to comment
Share on other sites

I'm not sure you can read from the local files on the playtest version of SimRail,

When the full simulator releases in 6 days, it will include more stuff than we have at the moment,  but the SDK's will be releasing a little later than the main simulator, and it's those that you'd usually use to help write the code to pull the data out of your train as you are driving it.

When driving in multiplayer, it's possible to get the data from the servers,

https://panel.simrail.eu/main/map.html does this to show your position and speed on the live map,
but i find the live map always lags behind where i actually am by a few hundered meters, so other drivers pass me in the sim about 10+ seconds before they are shown passing me on the map.

 

Hopefully when the full version of the sim is released for sale, we will be able to access the local data needed.

Link to comment
Share on other sites

The speed given by the HTTP API (and therefore shown by the panel's map) has a cache in front of it, that makes it refresh every 12seconds.
That won't be accurate enough for a display on the desktop. Even if you could have a faster refresh rate, the API was not designed for realtime constant access and it would be bad for multiplayer stability for everyone. (plus you will, of course, have network lag).
That data should be available somewhere tho, for sure, it is altleast available on your RAM and fetchable by quite complicated ways, or the devs might expose it somewhere available that we don't know yet. I think full release will bring more light on such topics, and if not, a few months after full release I think devs will have more time to answers such questions we have 🙂

There are various tools that would allow you to scan your RAM in the game to find the values you want, but I won't enter such details because it is not clear if it will ever be allowed as such tools can wreak havoc in a multiplayer game, and may give you a ban in case of malicious usage.

Edited by DeadlyKungFu.Ninja
  • I agree 1
Link to comment
Share on other sites

ahh yes, i was thinking it would not be a good idea to get infor from the servers for things other than the map,  there can only be so many connections / calls for data before things slow down or bad things happen.

 

i'm hoping the SDK's that will be released later on will give us the ability to pull data from our train, like was possible with Omsi, and railworks / train simulator classic, 

  • Like 1
Link to comment
Share on other sites

23 minutes ago, Gazz292 said:

ahh yes, i was thinking it would not be a good idea to get infor from the servers for things other than the map,  there can only be so many connections / calls for data before things slow down or bad things happen.

i'm hoping the SDK's that will be released later on will give us the ability to pull data from our train, like was possible with Omsi, and railworks / train simulator classic, 

Well you can use the data for many stuff like this I did 😄 Or the "replay" project we are running in the FR community that will allow us to keep a constant history to check for trolls etc.

 


But nothing that needs realtime updates 🙂 !

Link to comment
Share on other sites

I hope that we will soon have info on an API or other means of retrieving information from the live game.  door status, pantograph, next signal, train number….  in gray all that is displayed on the screen.  this is something that once programmed on arduino improves the simulation 🙂

  • Like 1
Link to comment
Share on other sites

On 1/10/2023 at 11:08 PM, debiantippse said:

If i remember correctly the Playtest should have the option to enable Dev/Com Ports who could be used to get data from the Trains.

Yes.

You can receive something on the TCP

tcp://127.0.0.1:51528

Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Our servers

    • Drivers | Maszyniści Drivers | Maszyniści
      • PL2
      • pl2
      • 25 / 80
          • Percentage filling 31%
          • Most players 103
      • PL3
      • pl3
      • 0 / 74
          • Percentage filling 0%
          • Most players 76
      • PL4
      • pl4
      • 3 / 81
          • Percentage filling 4%
          • Most players 84
      • PL8
      • pl8
      • 1 / 80
          • Percentage filling 1%
          • Most players 84
      • EN1
      • en1
      • 9 / 80
          • Percentage filling 11%
          • Most players 81
      • EN2
      • en2
      • 2 / 41
          • Percentage filling 5%
          • Most players 60
      • EN3
      • en3
      • 0 / 78
          • Percentage filling 0%
          • Most players 60
      • DE1
      • de1
      • 23 / 78
          • Percentage filling 29%
          • Most players 87
      • DE3
      • de3
      • 1 / 79
          • Percentage filling 1%
          • Most players 67
      • DE4
      • de4
      • 0 / 72
          • Percentage filling 0%
          • Most players 65
      • FR1
      • fr1
      • 0 / 76
          • Percentage filling 0%
          • Most players 49
      • UA1
      • ua1
      • 0 / 76
          • Percentage filling 0%
          • Most players 27
      • CN1
      • cn1
      • 0 / 79
          • Percentage filling 0%
          • Most players 28
      • CZ1
      • cz1
      • 3 / 78
          • Percentage filling 4%
          • Most players 61
      • ES1
      • es1
      • 1 / 79
          • Percentage filling 1%
          • Most players 23
    • Dispatchers | Dyżurni ruchu Dispatchers | Dyżurni ruchu
      • PL2
      • pl2
      • 20 / 34
          • Percentage filling 59%
          • Most players 34
      • PL3
      • pl3
      • 0 / 34
          • Percentage filling 0%
          • Most players 28
      • PL4
      • pl4
      • 2 / 34
          • Percentage filling 6%
          • Most players 32
      • PL8
      • pl8
      • 1 / 34
          • Percentage filling 3%
          • Most players 27
      • EN1
      • en1
      • 9 / 34
          • Percentage filling 26%
          • Most players 34
      • EN2
      • en2
      • 1 / 34
          • Percentage filling 3%
          • Most players 21
      • EN3
      • en3
      • 0 / 34
          • Percentage filling 0%
          • Most players 13
      • DE1
      • de1
      • 21 / 34
          • Percentage filling 62%
          • Most players 34
      • DE3
      • de3
      • 5 / 34
          • Percentage filling 15%
          • Most players 29
      • DE4
      • de4
      • 1 / 34
          • Percentage filling 3%
          • Most players 29
      • UA1
      • ua1
      • 0 / 34
          • Percentage filling 0%
          • Most players 17
      • FR1
      • fr1
      • 3 / 34
          • Percentage filling 9%
          • Most players 23
      • ES1
      • es1
      • 0 / 34
          • Percentage filling 0%
          • Most players 15
      • CZ1
      • cz1
      • 2 / 34
          • Percentage filling 6%
          • Most players 28
      • CN1
      • cn1
      • 0 / 34
          • Percentage filling 0%
          • Most players 19
    • 30 Total servers
    • 133 / 1641 Total players
    • 8% Filled servers
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy