Elvas Tower: OR Units of Measure continued - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

OR Units of Measure continued Tying down some details Rate Topic: -----

#1 User is offline   cjakeman 

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

Posted 29 May 2013 - 05:31 AM

Decided to start a new thread for this work as the old thread OR Units of Measure has changed into modelling steam physics (which I find quite fascinating) and I don't want to derail that discussion.

I have a couple of questions to ask here because I've only been on the scene a couple of years, so missed some of the earlier discussions about parsing STF files such as ENG.

Qu.1: Are units of measure optional for all MSTS parameters?
Would I be right to say that all the parameters the MSTS uses "(e.g. Mass ( 155t )" have units that are optional, so omitting a unit never causes the parsing to fail?

Qu.2: Are there any OR-specific parameters?
Looking through the code, I wonder if there are some parameters that have been added just for OR? Some have names indicating this:

or_diesel ( exhaustcolor ( . . . ) )
or_diesel ( exhausttransientcolor ( . . . ) )

others look suspicious:

engine ( forcefactor1 ( . . . )
engine ( forcefactor2 ( . . . )
engine ( cylinderpressuredrop ( . . . )
engine ( backpressure ( . . . )
engine ( burnrate ( . . . )
engine ( boilerefficiency ( . . . )

so can anyone help me identify the OR-specific non-MSTS parameters, so we can mark them as such in the code?

#2 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 29 May 2013 - 02:04 PM

cjakeman said........

Qu.1: Are units of measure optional for all MSTS parameters? Would I be right to say that all the parameters the MSTS uses "(e.g. Mass ( 155t )" have units that are optional, soomitting a unit never causes the parsing to fail?


reply,
That appears to be the case, I regard this a a major problem, assumming anything in such situations __should__ be ragarded as a serious no no. One other point it appears neither MSTS or OR regard multiple definitions of the same item an error, MSTS simply taking the value of the last one in the file, I am not sure how OR handles this. Both of these (assumming a unit and multiple reads of the same value) should at least be able to be flag as warnings. It would save a ___LARGE___ amount of heartache (and i do mean ___LARGE___), having spent much time trying to figure out what MSTS uses as its default unit AND searching for multiple unit definitions. Mixing of unit standards (imperial and metric) not helping the situation even a little bit, Grrrrrrrrr.............

Qu.2: Are there any OR-specific parameters?

Yes,
you have got a good list there, most appearing to be present. I have not as yet isolated the different ones. The apparent complete list of all the steamers parameters starts at line 282 in MSTSSteamLocomotive.cs

Lindsay

#3 User is offline   cjakeman 

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

Posted 30 May 2013 - 08:13 AM

Hi Lindsay,

View PostLindsayts, on 29 May 2013 - 02:04 PM, said:

That appears to be the case, I regard this a a major problem, assuming anything in such situations __should__ be regarded as a serious no no. One other point it appears neither MSTS or OR regard multiple definitions of the same item an error, MSTS simply taking the value of the last one in the file, I am not sure how OR handles this. Both of these (assuming a unit and multiple reads of the same value) should at least be able to be flag as warnings.

James responded to your point about missing units and the current effort by steamer_ctn will issue information messages rather than warnings for the reason he gave.

Having multiple definitions sounds a very frustrating sort of error and I'll look into that and see if I can find a simple and cheap way to detect and warn of these.

Thanks,

#4 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 30 May 2013 - 11:39 AM

View Postcjakeman, on 30 May 2013 - 08:13 AM, said:

Hi Lindsay,


James responded to your point about missing units and the current effort by steamer_ctn will issue information messages rather than warnings for the reason he gave.



Thanks , I did know this as I am in communication with Peter (steamer_ctn) regarding working out the steam physics.

Quote


Having multiple definitions sounds a very frustrating sort of error and I'll look into that and see if I can find a simple and cheap way to detect and warn of these.

Thanks,


It is very frustrating and the cause of a bit of strange behaviour when playing around with the eng file. It took me a while to work out why some items simply were not apparently doing anything.

An obvious way forward is to set a flag when each of the 29 parameters OR reads from the eng file is read, when anytime one of the parameters is read its flag is checked. It then becomes trivial to issue a warning. The only problem with this it requires 29 flags and conditional tests. Basicly programing grind, ie nothing really new and no major facilities added in the sim just getting 29 almost identical pieces of code working. It would be a major help to anyone playing around with the eng files though.

In the end its probably some of the code which will get a bit of use until all the identical parrameters are eliminated, which will probably be never........

Lindsay

#5 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 30 May 2013 - 07:03 PM

After some thought I would not regard the multiple definitions as an earth shaking problem. Once you know you need to look for them its no where near the problem thats caused by the units issue.

So if there is better things to spend ones time on with OR it may be spent better there.

Lindsay

Page 1 of 1
  • 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