Skip navigation
3334 Views 13 Replies Latest reply: Aug 2, 2010 10:05 AM by superres RSS
MikeArmstrong Diamond 4,022 posts since
Dec 3, 2008
Currently Being Moderated

Jul 29, 2010 8:47 AM

Function to dertermine quadrant

I am having trouble converting a local plant grid to OSGB (well a small section of it).

 

I have calculated the change in Eastings and Northings using basic trig, but I am having trouble trying to automatically calculate the revised coordinates due to the local and true Northings being out of phase. The change in in the Plant Easting and Northing has been found but I'm struggling writing a function to work out if the change should be added or subtracted from the site datum coordinates.

 

I have annotated the worksheet which might explain a little better.

 

Mike

Attachments:
    • superres Silver 7,759 posts since
      Jun 1, 2007
      Currently Being Moderated
      Jul 29, 2010 3:03 PM (in response to MikeArmstrong)
      Re: Function to dertermine quadrant

      Your sheet seems to be more complicated than I think it really needs to be, i.e., I don't think you need to have any programs at all.  

       

      Basically, at the core of the problem is a coordinate transformation, which, in your case, has two elements, a lateral offset of the origin, and a rotation.  And the transform can be expressed as a matrix equation, Station = (OSGB-Offset)*Rotation.

       

      There are 3 unknowns, the N,E offset and the rotation.  So, you should be able to just code up the two matrix equations and plop them into a Given-Find block to crank out solutions for the 3 unknowns, although it might require another set coordinates for a 3rd equation.

       

      TTFN

      • superres Silver 7,759 posts since
        Jun 1, 2007
        Currently Being Moderated
        Jul 29, 2010 3:43 PM (in response to superres)
        Re: Function to dertermine quadrant

        There was a momentary bobble, hopefully no one saw it.  Attached M11 file is the way I think it should be calculated.  Note that there would need to be some changes if M14 is used, because of the mixed units.

         

        OSGB example2.gif

        Attachments:
          • superres Silver 7,759 posts since
            Jun 1, 2007
            Currently Being Moderated
            Jul 30, 2010 3:54 PM (in response to MikeArmstrong)
            Re: Function to dertermine quadrant

            Mike,

             

            That's great...  It's not my area of expertise, so I had some trouble myself.  That bobble I referred to was that I had posted an earlier version and only afterwards, realized that I had N and E backwards.  That was followed by another moment of doubt when I thought the rotation wasn't working correctly.

             

            I didn't mention it, but you can assign the find statement to a function, and your user's sheet can call the function after the values are entered, or, you could input coordinates into an array, and use an indexed array to retrieve the conversions.

             

            TTFN

              • superres Silver 7,759 posts since
                Jun 1, 2007
                Currently Being Moderated
                Aug 2, 2010 10:05 AM (in response to MikeArmstrong)
                Re: Function to dertermine quadrant

                Mike,

                 

                Sorry to have missed your posting, it's absurdly difficult to keep track of what's what in this forum.  I'll try to take a look at it a later today.

                 

                TTFN,

                Eden

        • A.Non Diamond 10,067 posts since
          May 11, 2010
          Currently Being Moderated
          Jul 30, 2010 4:24 PM (in response to MikeArmstrong)
          Re: Function to dertermine quadrant
          Thought it would have created more interest to be honest....

          Interest is not necessarily the problem. Speaking for myself, time is much more of a problem than interest.

More Like This

  • Retrieving data ...

Bookmarked By (0)