Elvas Tower: Rolling stock - 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.
  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Rolling stock more bogies and wheels allowed Rate Topic: -----

#21 User is offline   espee 

  • Engineer
  • Group: Posts: Active Member
  • Posts: 553
  • Joined: 09-January 10
  • Gender:Male
  • Location:Bridgetown, Western Australia
  • Simulator:Open Rails
  • Country:

Posted 16 February 2018 - 04:19 PM

Lateral displacement is a sideways movement. In the case of a centre bogie or truck, it doesn’t need to pivot around a centre point but move sideways left or right.

#22 User is offline   RTP 

  • Conductor
  • Group: Posts: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 16 February 2018 - 04:51 PM

In a three bogies loco, the center one has some pivoting to assure correct tracking.

In a four bogies one, like this prototypical Baldwin turbine, all of them pivots and moves.

Regards.

Attached thumbnail(s)

  • Attached Image: Open Rails 2018-02-17 01-44-37.jpg


#23 User is offline   edwardk 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 1,354
  • Joined: 11-December 09
  • Gender:Male
  • Location:Chula Vista, CA
  • Simulator:MSTS
  • Country:

Posted 17 February 2018 - 08:41 AM

Is lateral displacement present with the normal 2 bogies and 3 axles? According to the post with the 3 bogie Renfe it does not exist on the middle bogie, but the bogies pivot. On the 4 bogie locomotive, is lateral displacement present on all bogies? The reason why I am asking is that if the bogies are pivoting then the basis of recognizing the extra bogies and axles is present. The physics side is whats missing or not complete.

Here is the code that is suppose to be responsible for tracking. The remainder of the code that is used below is found in TrainCar.cs. If Lateral Displacement is not present at all in OR, then we need a physics expert.

public void ComputePosition(Traveller traveler, bool backToFront, float elapsedTimeS, float distance, float speed)
        {
            for (var j = 0; j < Parts.Count; j++)
                Parts[j].InitLineFit();
            var tileX = traveler.TileX;
            var tileZ = traveler.TileZ;
            if (Flipped == backToFront)
            {
                var o = -CarLengthM / 2 - CentreOfGravityM.Z;
                for (var k = 0; k < WheelAxles.Count; k++)
                {
                    var d = WheelAxles[k].OffsetM - o;
                    o = WheelAxles[k].OffsetM;
                    traveler.Move(d);
                    var x = traveler.X + 2048 * (traveler.TileX - tileX);
                    var y = traveler.Y;
                    var z = traveler.Z + 2048 * (traveler.TileZ - tileZ);
                    WheelAxles[k].Part.AddWheelSetLocation(1, o, x, y, z, 0, traveler);
                }
                o = CarLengthM / 2 - CentreOfGravityM.Z - o;
                traveler.Move(o);
            }
            else
            {
                var o = CarLengthM / 2 - CentreOfGravityM.Z;
                for (var k = WheelAxles.Count - 1; k >= 0; k--)
                {
                    var d = o - WheelAxles[k].OffsetM;
                    o = WheelAxles[k].OffsetM;
                    traveler.Move(d);
                    var x = traveler.X + 2048 * (traveler.TileX - tileX);
                    var y = traveler.Y;
                    var z = traveler.Z + 2048 * (traveler.TileZ - tileZ);
                    WheelAxles[k].Part.AddWheelSetLocation(1, o, x, y, z, 0, traveler);
                }
                o = CarLengthM / 2 + CentreOfGravityM.Z + o;
                traveler.Move(o);
            }

            TrainCarPart p0 = Parts[0];
            for (int i = 1; i < Parts.Count; i++)
            {
                TrainCarPart p = Parts[i];
                p.FindCenterLine();
                if (p.SumWgt > 1.5)
                    p0.AddPartLocation(1, p);
            }
            p0.FindCenterLine();
            Vector3 fwd = new Vector3(p0.B[0], p0.B[1], -p0.B[2]);
            // Check if null vector - The Length() is fine also, but may be more time consuming - By GeorgeS
            if (fwd.X != 0 && fwd.Y != 0 && fwd.Z != 0)
                fwd.Normalize();
            Vector3 side = Vector3.Cross(Vector3.Up, fwd);
            // Check if null vector - The Length() is fine also, but may be more time consuming - By GeorgeS
            if (side.X != 0 && side.Y != 0 && side.Z != 0)
                side.Normalize();
            Vector3 up = Vector3.Cross(fwd, side);
            Matrix m = Matrix.Identity;
            m.M11 = side.X;
            m.M12 = side.Y;
            m.M13 = side.Z;
            m.M21 = up.X;
            m.M22 = up.Y;
            m.M23 = up.Z;
            m.M31 = fwd.X;
            m.M32 = fwd.Y;
            m.M33 = fwd.Z;
            m.M41 = p0.A[0];
            m.M42 = p0.A[1] + 0.275f;
            m.M43 = -p0.A[2];
            WorldPosition.XNAMatrix = m;
            WorldPosition.TileX = tileX;
            WorldPosition.TileZ = tileZ;
            
            UpdatedTraveler(traveler, elapsedTimeS, distance, speed);

            // calculate truck angles
            for (int i = 1; i < Parts.Count; i++)
            {
                TrainCarPart p = Parts[i];
                if (p.SumWgt < .5)
                    continue;
                if (p.SumWgt < 1.5)
                {   // single axle pony trunk
                    float d = p.OffsetM - p.SumOffset / p.SumWgt;
                    if (-.2 < d && d < .2)
                        continue;
                    p.AddWheelSetLocation(1, p.OffsetM, p0.A[0] + p.OffsetM * p0.B[0], p0.A[1] + p.OffsetM * p0.B[1], p0.A[2] + p.OffsetM * p0.B[2], 0, null);
                    p.FindCenterLine();
                }
                Vector3 fwd1 = new Vector3(p.B[0], p.B[1], -p.B[2]);
                if (fwd1.X == 0 && fwd1.Y == 0 && fwd1.Z == 0)
                {
                    p.Cos = 1;
                }
                else
                {
                    fwd1.Normalize();
                    p.Cos = Vector3.Dot(fwd, fwd1);
                }

                if (p.Cos >= .99999f)
                    p.Sin = 0;
                else
                {
                    p.Sin = (float)Math.Sqrt(1 - p.Cos * p.Cos);
                    if (fwd.X * fwd1.Z < fwd.Z * fwd1.X)
                        p.Sin = -p.Sin;
                }
            }
        }


#24 User is offline   copperpen 

  • Executive Vice President
  • Group: Posts: Elite Member
  • Posts: 3,192
  • Joined: 08-August 05
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 17 February 2018 - 09:50 AM

When viewing my 4 bogie test unit moving along the track the first two bogies pivot as the curve is taken, the second two do not.

Lateral movement is the body sliding across the bogie so the bogie remains on the track and as far as I am aware this does not exist in OR, and pretty positive that MSTS never had it either.

#25 User is offline   RTP 

  • Conductor
  • Group: Posts: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 17 February 2018 - 10:03 AM

In my Baldwin turbine all the bogies pivot, but the inner ones are out of track.
The bogie sequence, front to rear, MUST be

Bogie2 Bogie3 Bogie4 Bogie1

I am using TSM.

Regards.

#26 User is offline   ErickC 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,061
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 17 February 2018 - 10:11 AM

Not all locomotives with more than two trucks have them move laterally; many of them use span bolsters, so you're going to need separate code for that, probably.

EDIT: actually, just adding code for a span bolster could work for the other type of application as well. You would have both trucks children of the span bolster (which could be a dummy), and the span bolster's pivot at the same place as the lead/trail truck pivot. This would cause the inner trucks to displace sideways.

It's easier to think of it visually:

Attached Image: spanbolster.JPG

The yellow object is the span bolster. You can see that it has a central pivot on one example, and an offset one colocated with the lead/trail truck on the other. The bolster does not need to be visible geometry, it might just as well be a dummy. This allows it to move as is required depending on the translation desired. Note that I have pivoted to a rather extreme angle here for ease of visibility.

#27 User is offline   RTP 

  • Conductor
  • Group: Posts: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 17 February 2018 - 10:15 AM

My UP4500 X55 has four bogies, but is implemented as two .wag carriing the bogies and one.eng, with no wheels but
with power, cab, lights etc.

Like the real one.

Regards.

#28 User is offline   edwardk 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 1,354
  • Joined: 11-December 09
  • Gender:Male
  • Location:Chula Vista, CA
  • Simulator:MSTS
  • Country:

Posted 17 February 2018 - 10:46 AM

It looks as if I may have a fix for the Renfe which has 3 bogies then we continue moving forward. For starters, the naming convention in the Renfe locomotive must change. The middle bogie is named Bogie-Mid. This long naming convention is keeping it from being processed. Rename it to Bogie3. I am also making sure that any additional bogies after Bogie2 is officially recognized. Once finished, I will upload here for testing. Hopefully this will bring about the results that have been missing.

Edward K.

#29 User is offline   edwardk 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 1,354
  • Joined: 11-December 09
  • Gender:Male
  • Location:Chula Vista, CA
  • Simulator:MSTS
  • Country:

Posted 17 February 2018 - 11:18 AM

Here is the file that will be used for testing. Use these files under X4075. First run the test with the Renfe and let me know the results. Keep in mind that the "Bogie-Mid" naming convention must be changed to "Bogie3" in the shape file since it is the third bogie. Proper naming conventions should be followed at this point since trying to cover the above naming convention makes the code messy.

If you know the naming convention of the Bogies are correct on the other locomotives or wagons then test on those as well.

Attached File(s)



#30 User is offline   darwins 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,559
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 17 February 2018 - 11:38 AM

Erik's description of "Span Bogies" looks like the same thing that would need to be used for Garrats.

The two bogies with the driving wheels are children of Main.

The remaining bogies are children of the two powered bogies (just as Erik says that the bogies in his example are children of the span bogie).

Hopefully this is the same problem and will have the same solution. Although at present TSM will allow bogies to be children of other bogies this does not export correctly. The 3DC train sim wizard at the moment allows up to three bogies.

#31 User is offline   espee 

  • Engineer
  • Group: Posts: Active Member
  • Posts: 553
  • Joined: 09-January 10
  • Gender:Male
  • Location:Bridgetown, Western Australia
  • Simulator:Open Rails
  • Country:

Posted 17 February 2018 - 04:27 PM

Good start, in the sense that a middle bogie will move, but it seems to be over compensating for the given curve...

The longer the wheelbase the more pronounced the error.

click on pic to get larger image...

Attached Image: Open Rails 2018-02-18 08-19-30.jpg

Attached Image: Open Rails 2018-02-18 08-18-51.jpg

#32 User is offline   darwins 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,559
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 17 February 2018 - 11:08 PM

There is already a working solution for the centre axle of a three axle carriage.

This is create two 'virtual' bogies. Each bogie has a centre half way between the outer axle and the centre axle.

One 'virtual' bogie has two axles (front and centre) the other 'virtual' bogie has only one axle (rear).

Hence a long wheelbase three axle vehicle can be made to follow the curve appropriately.

Now to do the same with a three bogie vehicle rather than a three axle vehicle then rather than axles being children of the 'virtual' bogies then the real bogies need to be children of the 'virtual' bogies. (As in Erik's post).

Supporting additional bogies to be children of existing bogies (or virtual bogies) will solve both the three and four bogie problem and the Garrat problem.

#33 User is offline   ianmacmillan 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 162
  • Joined: 22-March 13
  • Gender:Male
  • Location:Scotland
  • Simulator:MSTS
  • Country:

Posted 18 February 2018 - 04:32 AM

Unfortunately the 6wheel carriage fix described by Darwin cannot be used with two axle bogies.
It requires the front virtual bogie to be made by joining the front and middle axleguards and spring as bogie1.
Using 2axle bogies, The bogie frames can be joined as bogie1 but you cannot join the wheels or they will rotate about their common centre.
You could make an invisible wheel as wheel11 and wheel12 and model the visible wheels as as part of the bogie but they would be non rotating.
You just need to hope nobody would notice.

I also tried making a three part wagon using a complete wagon as bogie1and bogie2 but this added the additional problem of how to position the load.

As I said in my previous post a 3bogie model is impossible.

Prove me wrong------Please.

#34 User is offline   darwins 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,559
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 18 February 2018 - 01:04 PM

Quote

As I said in my previous post a 3 bogie model is impossible.
...at the present time Ian.

I may be wrong, but I think the purpose of this thread is to bring about a change in Open Rails, such that it will be possible in future. If the bogies were able to parent to bogies rather than to main then it should be possible for the wheels to rotate about the centre of their bogies and for the bogies to rotate about the centres of their "span bogies".

If bogies were allowed to be children of other 'span bogies' it should be possible to solve all of the problems under discussion. (In the Garrat case the span bogies would themselves have the driving wheels associated with the.)

Other than the span bogie idea, the only solution I can imagine is allowing separate vehicles to be "grouped" together as a single vehicles - not sure if that would mean allowing muliple shape files to be a single eng or wag entity or if it would mean adding bogies as freight anims - which would need a new kind of freight anim...

#35 User is offline   SP 0-6-0 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 985
  • Joined: 12-November 05
  • Gender:Not Telling
  • Location:Another planet.
  • Simulator:MSTS/ORTS
  • Country:

Posted 25 February 2018 - 04:58 PM

View Postcopperpen, on 16 February 2018 - 01:49 AM, said:

I have one from the old Abacus trainsim pages. It is a transfer locomotive that has 4 two axle bogies, with each pair of bogies attached to a bolster with the loco body riding on the bolsters.

I also have the part built Little Joe with 4 bogies sans wheels right now.



The NALW UP 4500HP gas turbine model is setup with two trucks per bolster. 4 trucks total under that machine.

Robert

  • 3 Pages +
  • 1
  • 2
  • 3
  • 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