cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Function to dertermine quadrant

Participant

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

13 REPLIES 13

Re: Function to dertermine quadrant

To help with understanding I have just knocked up a quick sketch which helps explain what I meant by a difference in the Northings.

Mike

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

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

Re: Function to dertermine quadrant

Eden Mei wrote:

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

Eden,

Cheers for taking the time to look at the worksheet. Thought it would have created more interest to be honest....

It is a little long winded, but I always try and display all steps until I achieve the correct answers and then make it bullet proof by testing.

Mike

Re: Function to dertermine quadrant

Eden Mei wrote:

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

Eden,

The rotation has been calculated successfully, but the Offset and corresponding answers don't seem to match what I have calculated. As I have already checked the values using AutoCAD so I'm pretty confident that the answers in my sheet are correct.

The Eastings and Northings under the title 'Required Coordinates' are the values which need to be converted into the plant grid.

Cheers for the help

Mike

On another note - I do have M14

Re: Function to dertermine quadrant

Eden,

I have spent most of the night working on the attached sheet you provided and guess what. IT WORKS!!!!!!!!!

Thanks a million for the help. The ancient saying is true - You learn something new every day.

Sorry for the doubt. A big bunch of gratitude coming your way.

Mike.

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

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.

Re: Function to dertermine quadrant

Richard Jackson wrote:

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.

Fair point.

That seems the difference compared to the old collab - When a problem was posted several different members would be helping supplying worksheets, it does seem many of the more experienced users are Mathcad users who use to regular post, aren't bothering.

Can only but it down to the site move!!!

Mike

Announcements