I have looked at your code, and find some strange things...
cv * fraction - is this a friction or that? If so its applies to all direction independantly on surfase orentation. Must be orented to surface...
You sometimes push v1 and v2, but dont push m, I downt know these parameters belongs to train or bridge, are theey skick or not
After such code you push v1 v2 /2 , bus push m /1
{
v1pos -= cv * ((1 - t) * lambda / 2.0f) * fraction;
v2pos -= cv * (t * lambda / 2.0f) * fraction;
}
Must be m/2 too:
mpos += cv * fraction/2,0f;
If deltapos is for inertia, your update function looks weard for me:
object mass must figure in collision routine not in object move
I simplefied your coude and mass is gravity?gravity for all ojects must be the same

tmp = pos;
pos += (pos - oldpos)* 0.9999f+(0,v.mass);
oldpos = tmp;