Elvas Tower: Water and other environmental files in OR - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 7 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Water and other environmental files in OR Rate Topic: -----

#31 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 02 February 2014 - 03:42 AM

Robert,

the lines "comment( xx t empty, xx t full)" to me seem to just be regular comments. AFAIK, there are also some other parameters in the default .eng files that don´t actually change anything in the locos in-game behavior, so I suppose if these lines were there to indicate different masses, they would have a proper name and be just ignored by MSTS, as other lines in .eng files are.

Cheers, Markus

#32 User is offline   conductorchris 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,345
  • Joined: 24-March 10
  • Gender:Male
  • Simulator:Open Rails - MSTS
  • Country:

Posted 02 February 2014 - 07:46 AM

I would love to see nice environmental files integrated into openrails in the way this discussion has suggested. Neither batch files nor the separate steps of kosmos are userfriendly. It should be an option on par with seasons or it should be automatic, loading route environmental files without the user even needing to set an option unless they want. I think the effects of better environment files would be worth the program weight. In my opinion a larger program is not a problem, the issue is the weight of what it actually has to load in terms of it's impact on frame rates and memory usage.
Christopher

#33 User is offline   BB25187 

  • Fireman
  • Group: Status: Active Member
  • Posts: 138
  • Joined: 09-December 12
  • Gender:Male
  • Simulator:OpenRails MSTS
  • Country:

Posted 02 February 2014 - 08:57 AM

Hi all,

Well, if the v1.0 aims at providing a compatibility with MSTS content, it should probably support the environmental files as MSTS did. The question to have Kosmos features implemented inside or outside OR is a "detail" (from the user POV, for sure not for the developers!), just because Kosmos is nothing but an "assembler" of elementary parts of environmental files + a user interface to control which of those parts must be used used at load time.
As for the next versions (higher than 1.0), the question seems pretty opened. None of the modern simulators I know do make use of a static environment files. They usually use a panel to set weather conditions before starting or during the game (types and height of clouds, type and strength of the précipitations, direction and speed of the wind, fog density, ... ) and many other parameters. Most of them can also connect to the internet to retrieve the actual weather at a given location all over the world and reproduce the same conditions ingame. Most of them can update those conditions dynamically during the game, either manually or automatically. So, for future versions, the environment files seem to be a pretty out dated paradigm!

Regards

#34 User is offline   rdamurphy 

  • Open Rails Developer
  • Group: Private - Open Rails Developer
  • Posts: 1,199
  • Joined: 04-May 06
  • Gender:Male
  • Location:Thornton, CO
  • Simulator:MSTS - OR
  • Country:

Posted 02 February 2014 - 09:16 AM

Very basic "support" of environmental files is now available, right now, only day, night, and moon textures work, it's very much a work in progress. I'm modifying the current sky code (duplicated into a new class) and still trying to get a grip on both the code and the .env files. But, yes, you do get the sky textures right now.

Robert

#35 User is offline   rdamurphy 

  • Open Rails Developer
  • Group: Private - Open Rails Developer
  • Posts: 1,199
  • Joined: 04-May 06
  • Gender:Male
  • Location:Thornton, CO
  • Simulator:MSTS - OR
  • Country:

Posted 02 February 2014 - 03:52 PM

Check out what I found:

Position of the Sun at 11:00 UT on 1997 August 7th

1. Find the days before J2000.0 (d) from the table

   d = 11/24 + 212 + 7 - 1096.5 = -877.04167

2. Find the Mean Longitude (L) of the Sun

   L = 280.461 + 0.9856474 * d
     = -583.99284 + 720  
    (add multiples of 360 to bring in range 0 to 360)
     = 136.00716

3. Find the Mean anomaly (g) of the Sun

   g = 357.528 + 0.9856003 * d
     = -506.88453 + 720
     = 213.11547

4. Find the ecliptic longitude (lambda) of the sun

   lambda = L + 1.915 * sin(g) + 0.020 * sin(2*g)
          = 134.97925

   (note that the sin(g) and sin(2*g) terms constitute an 
    approximation to the 'equation of centre' for the orbit 
    of the Sun)

   beta = 0 (by definition as the Sun's orbit defines the
             ecliptic plane. This results in a simplification
             of the formulas below)

5. Find the obliquity of the ecliptic plane (epsilon)

   epsilon = 23.439 - 0.0000004 * d
           = 23.439351

6. Find the Right Ascension (alpha) and Declination (delta) of
   the Sun

   Y = cos(epsilon) * sin(lambda)
   X = cos(lambda)

   a = arctan(Y/X)

   If X < 0 then alpha = a + 180
   If Y < 0 and X > 0 then alpha = a + 360
   else alpha = a

   Y =  0.6489924
   X = -0.7068507

   a = -42.556485
   alpha = -42.556485 + 180 = 137.44352 (degrees)
   
   delta = arcsin(sin(epsilon)*sin(lambda))
         = 16.342193 degrees

Final result

   Right ascension is usually given in hours of time, and both
   figures need to be rounded to a sensible number of decimal
   places. 


   alpha =   9.163 hrs      or   9h 09m 46s
   delta = +16.34 degrees   or +16d 20' 32"

   The Interactive Computer Ephemeris gives

   alpha =   9h 09m 45.347s and
   delta = +16d 20' 30.89"  



Even comes with Source Code! In QBasic...

Robert

#36 User is offline   rdamurphy 

  • Open Rails Developer
  • Group: Private - Open Rails Developer
  • Posts: 1,199
  • Joined: 04-May 06
  • Gender:Male
  • Location:Thornton, CO
  • Simulator:MSTS - OR
  • Country:

Posted 02 February 2014 - 04:08 PM

As far as real world weather, it's pretty easy to do, actually:

METAR, KDEN 022353Z 02004KT 3SM BR CLR M11/M13 A2993 RMK AO2 SLP212 T11061128 11056 21106 58002

KDEN - Denver

022353Z = Feb 2nd 1151 Zulu time.

02004KT - wind from 20 degrees (NNE) at 4 Knots

3SM - 3 mile visibility

BR - Mist

CLR - Sky Clear

The rest is pretty much just details.

At any rate, it's readily available from NOC/US Weather Service. My guess is that's where other games access it from.

Robert

#37 User is offline   steamer_ctn 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,892
  • Joined: 24-June 11
  • Gender:Male
  • Country:

Posted 03 February 2014 - 02:31 AM

I have just updated my development repository to #1989

When I try and rebuild the program I get error messages suggesting that the following files are missing:

Source\Menu\MSTS\ENGFile.cs
Source\Menu\MSTS\ENVFile.cs
Source\RunActivity\MSTS\ENGFile.cs
Source\RunActivity\Viewer3D\MSTSSky.cs
Source\RunActivity\MSTS\ENVFile.cs


When I look in the repository I can't see the files listed there.

I have found the MSTSSky.cs file in the path "ENV\Source\Runactivity\Viewer3D", whereas the program appears to be looking for them in the "Source\RunActivity\Viewer3D". Similarly the ENVFile seems to be in "Source\MSTS", whereas the program is expecting to see it in "Source\Menu\MSTS". Have the files somehow got into the wrong directories?

Are other developers experiencing the same problems?

If not, any suggestions on what I am doing wrong would be appreciated?

Thanks

#38 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 03 February 2014 - 02:37 AM

Yes, these files were missing from commit r1985. Robert wrote me he already fixed the issue, but I didn't have time to test it yet, so personally I don't know whether it was really solved. Please try to download the latest revision from svn again.

#39 User is offline   steamer_ctn 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,892
  • Joined: 24-June 11
  • Gender:Male
  • Country:

Posted 03 February 2014 - 03:00 AM

Hi Peter,

Thanks for the speedy response.

View Postgpz, on 03 February 2014 - 02:37 AM, said:

Yes, these files were missing from commit r1985. Robert wrote me he already fixed the issue, but I didn't have time to test it yet, so personally I don't know whether it was really solved. Please try to download the latest revision from svn again.

I have refreshed my full repository, and am still getting errors.

I think that the files are located in the wrong folders for some reason, or the file that calls them is not pointing to the correct folders.

Cheers

Peter

#40 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 03 February 2014 - 03:26 AM

Then we shall still wait for Robert to fix it. The proof of the problem not being local is that James' continuous integration site http://james-ross.co...jects/or/builds also stopped at r1984, so automatic builds also cannot be made.

Personally I use git client over svn, and with that I can simply skip the commits 1985 and 1986, so I am able to workaround the issue, but it would be good to fix it

  • 7 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • 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