Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Function to dertermine quadrant

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-29-2010
11:47 AM

07-29-2010
11: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

Labels:

13 REPLIES 13

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-29-2010
12:08 PM

07-29-2010
12:08 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-29-2010
06:03 PM

07-29-2010
06:03 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-29-2010
06:43 PM

07-29-2010
06:43 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-30-2010
02:56 AM

07-30-2010
02:56 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-30-2010
03:01 AM

07-30-2010
03:01 AM

Re: Function to dertermine quadrant

Eden Mei wrote:

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-30-2010
05:50 PM

07-30-2010
05:50 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-30-2010
06:54 PM

07-30-2010
06:54 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-30-2010
07:24 PM

07-30-2010
07:24 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-31-2010
02:47 AM

07-31-2010
02:47 AM

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