Jump to content

Recommended Posts

Posted

 

hello friends, how to export speed or information to arduino?

In order to make a secondary simulation screen

 

  • Like 1
Posted

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
Posted

thank you, where is the file with the speed data and other information ont the pc ?  I failed to find

Posted

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.

Posted (edited)

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
Posted

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
Posted
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 🙂 !

Posted

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
Posted
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

  • 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.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy