Picking up an
old thread and Dave's idea, it would be worth looking at FCalc's "FCalc 2.0 Variable Parameters.txt" file, which contains all the Davis A-B-C calculation equations for different type of vehicles, and incorporating them into OpenRails code. These equations are as simple as e.g.:
Type of Rolling Stock A B C
Standard Roller Bearings:
Locomotive (6.3743*weight + 128.998*axles) (0.32905*weight) (0.57501*c_drag*area)
Steam Engine (6.3743*weight + 128.998*axles + D) (0.32905*weight) (0.57501*c_drag*area)
Leading Railcar (6.3743*weight + 128.998*axles) (0.65811*weight) (0.57501*c_drag*area)
Middle Railcar (6.3743*weight + 128.998*axles) (0.65811*weight) (0.08146*area)
End Railcar (6.3743*weight + 128.998*axles) (0.65811*weight) (0.14375*area)
Passenger Car (6.3743*weight + 128.998*axles) (0.32905*weight) (0.08146*area)
Standard Freight Car (7.3550*weight + 80.625*axles) (0.16453*weight) (0.11979*area)
Empty Hopper (7.3550*weight + 80.625*axles) (0.16453*weight) (0.35938*area)
Autorack (7.3550*weight + 80.625*axles) (0.16453*weight) (0.16771*area)
TOFC (2.9420*weight + 88.964*axles) (0.10968*weight) (4.45168)
Spine Car (2.9420*weight + 88.964*axles) (0.10968*weight) (4.11780)
COFC(Double Stack) (2.9420*weight + 88.964*axles) (0.10968*weight) (3.89522)
We need 4 parameters: weight, axles, area, c_drag. And of course the type of vehicle and bearing. Although it is not straightforward yet, how to differentiate the various freight cars, but as the first step the standard freight car equation could be used.
Looks like the fact if a car is a leading or a trailing one is also important. Most probably the "C" equation for the locomotives implies that they are leading ones, so the equation might be invalid for helper locomotives. Thus a multiplier should be used for indicating the leading or trailing "property" of the vehicle, applied to passenger and freight cars as well as for locomotives and railcars. ("Middle" locomotives should use the same equation as "middle railcars", and "end" passenger cars/locomotives should use the same as "end railcars".)
By this logic the ORTSDavis_A, ORTSDavis_B and ORTSDavis_C eng parameters should be used just as overrides, for those wanting to fine-tune the values themselves, and not for general use. Anyway, "C" value is inaccurate in this way, because it is much higher for helper locomotives than is needed (7 times higher for middle helpers and 4 times higher for trailing helper, 1.8 times lower for last car).