Menu

#267 train skips tracks

closed-fixed
None
Linux
5
2018-08-31
2018-08-23
No

hi guys, i have an interestin bug! i think!
in my layout i use kato (n) double track, when i test a train on it the train skips from one track to another! makes it difficult to test new sidings and track!
the reason i chose kato is because that is what my local hobby shop supplies
its happened with 2 versions first was from the original ubuntu repositry the second was the latest from deepsoft! (i get a sigfault from that one also, when trying to adjust elevation. already sent him a message)

Related

Bugs: #267

Discussion

  • dwyane ward

    dwyane ward - 2018-08-24

    Known Issue, not a bug. Xtrkcad does not support double track components, only supports single track objects in "train run mode". The Kato double track components do what your are experiencing, been this way since the first double track parameter files where created. See other discussions (these go back a few years) on this at the yahoo group page. I would assume that a major re-coding on the "train run mode" module would be needed.

     
    • mathew thomas

      mathew thomas - 2018-08-24

      good to know!
      thanks


      From: "dwyane ward" dwyane@users.sourceforge.net
      Sent: Friday, August 24, 2018 10:42 AM
      To: "[xtrkcad-fork:bugs]" 267@bugs.xtrkcad-fork.p.re.sourceforge.net
      Subject: [xtrkcad-fork:bugs] #267 train skips tracks

      Known Issue, not a bug. Xtrkcad does not support double track components,
      only supports single track objects in "train run mode". The Kato double
      track components do what your are experiencing, been this way since the
      first double track parameter files where created. See other discussions
      (these go back a few years) on this at the yahoo group page. I would assume
      that a major re-coding on the "train run mode" module would be needed.


      [bugs:#267] train skips tracks

      Status: open
      Created: Thu Aug 23, 2018 05:56 AM UTC by mathew thomas
      Last Updated: Thu Aug 23, 2018 05:56 AM UTC
      Owner: nobody

      hi guys, i have an interestin bug! i think!
      in my layout i use kato (n) double track, when i test a train on it the
      train skips from one track to another! makes it difficult to test new
      sidings and track!
      the reason i chose kato is because that is what my local hobby shop
      supplies
      its happened with 2 versions first was from the original ubuntu repositry
      the second was the latest from deepsoft! (i get a sigfault from that one
      also, when trying to adjust elevation. already sent him a message)


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/xtrkcad-fork/bugs/267/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #267

  • Adam Richards

    Adam Richards - 2018-08-24

    Ok - I was unaware of this issue because I came along after the original discussion.

    The issue seems to only occur at the edges of the pieces, correct? That is when the Traverse command is looking backwards or forwards into the last or next piece it mistakes which end point is connected to the current track and so "jumps" to the other track.

    I think that's probably because whoever created the Find-Track-EndPoint-Connected-To-Me code didin't consider the possibility that there might be more than one connection per track object. So it returns the first match.

    Here is one part of the the code in question inside TraverseTrack in track.c

    if ( !trvTrk->trk )
                return FALSE;
            ep = GetEndPtConnectedToMe( trvTrk->trk, oldTrk );
            if ( ep != -1 ) {
                trvTrk->pos = GetTrkEndPos( trvTrk->trk, ep );
                trvTrk->angle = NormalizeAngle( GetTrkEndAngle( trvTrk->trk, ep ) + 180.0 );
            }
    

    That GetEndPtConnectedToMe doesn't discriminate, it loops around and finds the first one that connects to this oldTrk. And then it carefully adjusts the train position to be on that endpoint. So I THINK the surgery needed is to extend GetEndPtConnectedToMe into a GetNearestEndPtConnectedToMe and take in the trvTrk->pos as parameter.

    Adam

     
  • Adam Richards

    Adam Richards - 2018-08-24

    OK - change made and pushed to V5.2 and BSF - in my testing using Kato tracks it seems to work fine.

     
  • dwyane ward

    dwyane ward - 2018-08-24

    Thanks Adam, I know a number of users will appreicate this change

     
  • Adam Richards

    Adam Richards - 2018-08-31
    • status: open --> closed-fixed
    • assigned_to: Adam Richards
     

Anonymous
Anonymous

Add attachments
Cancel





Auth0 Logo