Repository navigation
Fixes and stuff - #1439
Fixes and stuff#1439
Conversation
| } else { | ||
| CarWidth = a; | ||
| CarExposedFrontalArea = 0.65 * CarWidth * CarHeight; | ||
| CarExposedFrontalArea = 0.6 * CarWidth * CarHeight; |
There was a problem hiding this comment.
OK, that's really odd...
Looking back at the original source code from Michelle, the same mix of 0.6 and 0.65 values are used there.
This feels intentional, I'll have to try digging a bit...
There was a problem hiding this comment.
i just follow the double CarExposedFrontalArea = 0.6 * CarWidth * CarHeight; at line 246 it was set to 0.6 , idk why it set to 0.65 later in the end...
but if im not mistaken this just a variable for air resistance calculations right?
There was a problem hiding this comment.
Yeah, see my later reply after doing some digging in the decompiler....
| } | ||
|
|
||
| if (Arguments.Length >= 6 && Arguments[5].Length > 0 && !NumberFormats.TryParseDoubleVb6(Arguments[2], out contactHeight)) | ||
| if (Arguments.Length >= 6 && Arguments[5].Length > 0 && !NumberFormats.TryParseDoubleVb6(Arguments[5], out contactHeight)) |
There was a problem hiding this comment.
Yep, looks like copy + paste typos...
|
OK, really interesting.... Running BVE4 through the decompiler shows it's not actually using the car width / height/ unexposed frontal area figures at all- The BVE to BVE5 convertor also similarly ignores them. Digging around looking for a copy of the BVE2 train editor at the minute. Using the 0.65 figure rather than 0.6 gives approximately a 10% increase in wind resistance. At the minute, I'd actually be more inclined to use the 0.65 figure in the first calculation (where width / height not set at all) and update the documentation with this, simply because a majority of stuff is going to have set the car width / height figures, and thus 'used' the 0.65 number.... |
…mats Not supported by BVE, may contain junk data, so disable when hacks on #1439
that unexpected, i thought BVE Trainsim use most of that stuff... should i change both exposed and unexposed as named constant? maybe it easier to read than putting the value inline |
|
More interesting yet: Looks to me as if they're an OpenBVE addition, just not documented as such.... |
To be honest, you might as well leave them alone at this point, other than us standardising on either 0.6 or 0.65 (will require an errata note too....) :) Haven't merged at the minute, mostly as converting the object parsers caused so many bugs... |
if that code from the old era, maybe michelle was known bve2/4 at the time didn't have correct calculation and just add it? |
alright. you can cherry pick other commits if needed, especially the copy paste typo above. |
|
Another point of reference, the earliest saved copy of the original documentation contains these values. I can't find any mention of them in the developer logs from the old page though: Sadly the archive didn't save any of the linked source code... |
|
didnt expect to get merged this soon, but thanks. |
|
Fixes are a lot easier than new stuff. |
assorted fixes and stuff, Maybe useful, if needed can be cherry picked