Elvas Tower: OpenRailway map added to Open Rail - Web Interface - Elvas Tower

Jump to content

  • 5 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

OpenRailway map added to Open Rail - Web Interface Rate Topic: -----

#1 User is offline   Siebren 

  • Hostler
  • Group: Status: Active Member
  • Posts: 99
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 16 November 2022 - 07:35 AM

For the Open Rail - Web Interface I've added a Map entry. It shows an OpenRailway map with a locomotive icon on the current position of the train. Of course only useful for simulation of real railways. Example:
Attached Image: Capture.JPG
I use an extra monitor for displaying this map.

I've tested this for the Bernina Pass, the BNSF Scenic SUB and the Edingburgh - Glasgow route. When zooming in the position of the train is not always 100% accurate, but at least it gives you a nice idea where you are and heading for in the real world. The idea is from Flightgear, an open source flight simulator.

Until now this is a private change, but would it be an enhancement for the standard? This would be my first contribution to Open Rails.

regards, Siebren.

#2 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,806
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 16 November 2022 - 08:10 AM

Hello and welcome!
Very nice idea, as too often we have to look at map - for understanding, what is around the place, where our train currently is, and what can be watched else, riding along the route.
Must be i-net connection present for doing this, or it would be offline tool?

#3 User is offline   Siebren 

  • Hostler
  • Group: Status: Active Member
  • Posts: 99
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 16 November 2022 - 08:23 AM

You would need an internet connection for the openrailway map.

And by the way if not yet known, you can have a look the openrailway map by using this link https://www.openrailwaymap.org/.

#4 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,806
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 16 November 2022 - 08:41 AM

Thanks, I didn't knew that. so Thank You.
Try to PM with Chris Jakeman for discussing technical details.
In parallel, sign-up on GitHub for uploading Your future ORTS contributions.

#5 User is offline   joe_star 

  • Fireman
  • Group: Status: Active Member
  • Posts: 191
  • Joined: 16-January 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 18 November 2022 - 02:00 AM

Would there be some compensation for the different projections used in OR/MSTS vs openrailwaymap? I can't recall if lat/long are similarly impacted....

#6 User is offline   Siebren 

  • Hostler
  • Group: Status: Active Member
  • Posts: 99
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 18 November 2022 - 07:21 AM

I have not much knowledge about these different projections. I used the latitude/longitude as shown in the compass view:

Attached Image: Capture.JPG

The conversion to this latitude/longitude is done in Source\Orts.Simulation\Common\WorldLatLon.cs. In https://bugs.launchp...or/+bug/1393111 from 2016 I found a description of a bug in this code. However it was never solved. If I use the numbers:

        int ul_x = -20013965; // -180 deg in Goode projection
        int ul_y = 8674008; // +90 deg lat in Goode projection


found in this bug description results are much better. Still not 100%. For instance: you cannot see in a station with more tracks which track the train is on. But as I already said, it gives you an idea. And it might be the original MSTS coordinates are not 100% correct anyway.

This conversion code is quite complicated. Comment found in the top of it:

    * Contains equations that convert the camera (viewer) position on the current tile
    * to coordinates of world (as in planet earth) latitude and longitude.
    * MSTS uses the so-called "interrupted Goode homolosine projection" format 
    * to define world (i.e. planet earth) latitude and longitude coordinates.
    * This class is used to convert the current location of the viewer
    * to world coordinates of latitude and longitude.
    * Adapted from code written by Jim "deanville" Jendro, which in turn was
    * adapted from code written by Dan Steinwand.
*/
// Principal Author:
//    Rick Grout


#7 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,806
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 18 November 2022 - 07:28 AM

Anyway, much better, than nothing, while studying new routes.

#8 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,857
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 18 November 2022 - 12:07 PM

View PostWeter, on 16 November 2022 - 08:41 AM, said:

Try to PM with Chris Jakeman for discussing technical details.

Good suggestions; I have sent Siebren a PM.

#9 User is offline   Siebren 

  • Hostler
  • Group: Status: Active Member
  • Posts: 99
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 23 November 2022 - 11:20 AM

This enhancement is now available in the unstable build.

To test just open a webpage http://localhost:2150/ in your browser. Or replace localhost if you are not browsing and running OR on the same computer. A webpage with the title Open Rails - Web Interface appears. Which contains an option Map.

#10 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,806
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 23 November 2022 - 01:17 PM

Congrats with the first result.

  • 5 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users