Meaning of "Direction"?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OmenRotcod
    Senior Member
    • Apr 2022
    • 153
    • Calgary, Alberta, Canada
    • MSOR

    #1

    Meaning of "Direction"?

    In an Activity file each ActivityObject has a field named "Direction". What does the value of this field signify and how is it derived?
  • charland
    3000 Post Veteran


    • Dec 2006
    • 3107
    • Brockville, ON, CA
    • General

    #2
    When you create an activity and place let's say a boxcar in a siding, the activity records the location and direction of the car so it knows where to place it when you open the activity and it's orientation to the track.

    Paul :-)

    Comment

    • OmenRotcod
      Senior Member
      • Apr 2022
      • 153
      • Calgary, Alberta, Canada
      • MSOR

      #3
      Thanks Paul.

      Let me try to explain why I asked. What I am trying to do is to "fake" an Activity Editor. Using Trackviewer, I can place the head of a consist (Trackviewer gives me the "Tile" data), but I'm not sure how to get the Direction. That's why I was wondering how that value is calculated or determined. It doesn't seem to be a compass direction (or is it?). Does it even matter what the value is? I've typed in zero, for instance, and the consist looks alright when the Activity is run.

      By the way, that's how I can place Events too — Trackviewer gives me the location data, which I can then plug into an Event template and then put that in an Activity file. That works quite well.

      Faking an Activity Editor is just the germ of an idea I working out just for the fun of it. I've done some of this by hand, and it seems to work. The goal would be to do it in code; not particularly difficult (I've been writing code for almost 60 years), but time is short.

      Comment

      • eric
        9500 Post Veteran and Administrator



        • Dec 2002
        • 9583
        • NS MP245.4 CNO&TP South District
        • English, SQL
        • General

        #4
        I'd think direction might not be compass driven but more related to the track node your point is on. 0 being the default from the start of the track node to the end, and 1 being from the end to the start of the node.


        Sent from my SM-G981U using Tapatalk
        If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

        Comment

        • OmenRotcod
          Senior Member
          • Apr 2022
          • 153
          • Calgary, Alberta, Canada
          • MSOR

          #5
          Ok Eric, that's worth looking into. I've seen values like 48 and 131 and now I'm wondering what they might mean. Could they be some intermediate point between start and end track nodes?

          Is there a difference in Direction between placing a Loose Consist on 1) a siding and on 2) a main track?

          Back to Trackviewer to try out some different locations.

          Does anybody know if MSTS and ORTS deal differently with Direction - codewise?

          Thanks

          Comment

          • derekmorton
            5500 Post Veteran



            • Nov 1999
            • 5699
            • Eltham, Victoria, Australia.
            • ORTS

            #6
            Direction is likely related to the A or B end of a wagon or engine.

            Only important on a wagon when looking at wheel wear.

            Comment

            • OmenRotcod
              Senior Member
              • Apr 2022
              • 153
              • Calgary, Alberta, Canada
              • MSOR

              #7
              Well ... how curious! I never would have thought that. To be honest, I'm not even sure what wheel wear is as far as the simulation is concerned.

              So in that case, I suppose it doesn't matter with what value I fill the Direction in the ActivityObject template. I'll stick zero in there and see if ORTS code chokes on it. Although I haven't done more than a few examples, I haven't noticed any problem so far.

              Thanks Derek

              Comment

              • derekmorton
                5500 Post Veteran



                • Nov 1999
                • 5699
                • Eltham, Victoria, Australia.
                • ORTS

                #8
                >I'm not even sure what wheel wear is as far as the simulation is concerned.

                I only put that in as the reason for direction, it does not relate to the sim, only the big world, which is what the sim is based on.

                I am involved in the miniature railway world and it is important to us.

                The Diamond Valley Railway is one of Australia's finest passenger carrying miniature railways and is located within Eltham Lower Park, Eltham, Victoria.

                Comment

                • R. Steele
                  3500 Post Veteran

                  • Feb 2013
                  • 3928
                  • known universe
                  • ORTS

                  #9
                  Do you suppose that's a parameter left over from the MSTS AE? not used by OR?
                  Cheers, Gerry
                  "A mind is like a parachute. It doesn't work if it is not open." Frank Zappa
                  It's my railroad and I'll do what I want! Historically accurate attitude of US Railroad Barons.
                  Forever, ridin' drag in railroad knowledge.
                  Audi, Vide, Tace, Si Vis Vivere In Pace​

                  https://www.trainsim.com/forums/filedata/fetch?filedataid=79656&type=medium​ https://www.trainsim.com/forums/filedata/fetch?filedataid=79654&type=small

                  Comment

                  • derekmorton
                    5500 Post Veteran



                    • Nov 1999
                    • 5699
                    • Eltham, Victoria, Australia.
                    • ORTS

                    #10
                    No, its still relevant for engines.

                    Comment

                    • veemr
                      Member
                      • Dec 2005
                      • 24
                      • .
                      • ORTS

                      #11
                      OmenRotCod,

                      I've done a little experimenting and I think the Direction is the bearing of how the consist stretches along the track from the first wagon. Bearing at sea has 360 degrees with 0 = North, and is counted going clockwise. I also think MSTS omitted the final zero on bearings so 18 = 180 degrees, 23 = 230, etc. Third, it seems MSTS used a limited number of bearings, not all available 359. Fourth, I believe MSTS when loading an activity would successfully place the loose consist onto the track if the Direction was close, so 0 or 18 should work on a more-or-less north/south track. ORTS seems to echo the same actions with its coding. If you're willing to experiment and let everyone know what you find out, great! Maybe place loose consists on various angled tracks with an activity editor and look at the .act file with a Unicode editor to see what was saved as "direction".

                      Comment

                      • OmenRotcod
                        Senior Member
                        • Apr 2022
                        • 153
                        • Calgary, Alberta, Canada
                        • MSOR

                        #12
                        I've tried several positions of consists on sidings and there doesn't seem to be any pattern to me. Here is an example (on the Lehigh and Hudson River route on the NJ Zinc sidings at Franklin).

                        1. consist pointing NE - Direction ( 159 )
                        2. consist pointing SE - Direction ( 159 )
                        3. consist pointing SW - Direction ( 159 )
                        4. consist pointing NE - Direction ( 111 )
                        At Hamburg Commercial
                        5. consist pointing SE - Direction ( 0 )
                        6. consist pointing NE - Direction ( 159 )

                        and so on ...

                        These are just a few examples of the consist-placing I've tried. Looking at other people's Activity files, the Direction values show similar numbers.

                        Leaving the value for "Direction" aside, I think the greatest hurdle will be creating the "EventCategoryAction/EventTypePickUpWagons" and DropOffWagons sections.

                        Comment

                        • DirtyRam
                          Senior Member

                          • May 2010
                          • 107
                          • Northwest Lake Ontario
                          • North - North American
                          • General

                          #13
                          Originally posted by derekmorton
                          No, its still relevant for engines.
                          Yes Derek, engine orientation in power and train consists for setting up DPU control. ( Setting up fences )

                          Mike

                          Comment

                          Working...