Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Converting cartesian coordinates to geographical gps

7 views
Skip to first unread message

carmelo

unread,
Dec 15, 2008, 4:22:56 AM12/15/08
to
Hi everybody,
I need to convert cartesian coordinates to geographical gps. Knowing
X,Y coordinates how can I calculate Latitude and Longitude?

A friend of mine give me this formula:

/*gps coordinates of zero local point*/
X0POL = 38.4758676627; # 1° ZERO POINT POLAR
Y0POL = 15.9189614895; # 2° ZERO POINT POLAR

/*convert zero point from DD coordinate to DDM*/
B5 = (60 * X0POL) - (38 * 60) + 3800;#3828.5521 # 1° ZERO POINT
B6 = (60 * Y0POL) - (15 * 60) + 1500;#1555.1377 # 2° ZERO POINT

G5 = 4.12841392; # TERRESTRIAL ROTATION RADIANS DEGREE

COEFFX = 1849.94;
COEFFY = 1454.88;

VALORE1 = (X * SIN(G5) + B5 * COEFFX + Y * COS(G5)) / COEFFX;
VALORE2 = (VALORE1 * COEFFX * COT(G5) - Y * (SIN(G5) + COS(G5) * COT
(G5)) - B5 * COEFFX * COT(G5) + B6 * COEFFY) / COEFFY;

/*transform from DDM to DD*/
LatGPS = (VALORE1+38*60-3800)/60;
LongGPS = (VALORE2+15*60-1500)/60;


But he doesn't remember how he got COEFFX and COEFFY.
Using these formula the gps coordinates I get are enough precise, they
correspond "enough" to what they should be considering the position of
some points about which I know the correct Lat/Lon coordinates.

But I need a better precision, therefore I hope you can help me
finding some formulas to convert cartesian coordinates to geographical
gps.

Thank you very much in advance
Carmelo

Paul Cooper

unread,
Dec 15, 2008, 5:25:08 PM12/15/08
to
On Mon, 15 Dec 2008 01:22:56 -0800 (PST), carmelo <csa...@tiscali.it>
wrote:

There isn't enough information to do this, I am afraid. There is no
single way of converting X,.Y coordinates to Latitude and Longitude or
the other way round; there are millions! And without knowing which
method (known as a "projection") was used, you simply can't do it.

Paul Cooper

chandan

unread,
Dec 16, 2008, 12:41:39 AM12/16/08
to
You can refer to a couple of websites to get it done , some C
source codes are also posted that can do the job . But it really
depends on the location of the co-ordinates , datum , projection
because the method of conversion varies depending on each of them.

carmelo

unread,
Dec 16, 2008, 3:34:24 AM12/16/08
to
On 15 Dic, 23:25, Paul Cooper <a.paul.r.coo...@ntlworld.com> wrote:
> There isn't enough information to do this, I am afraid. There is no
> single way of converting X,.Y coordinates to Latitude and Longitude or
> the other way round; there are millions! And without knowing which
> method (known as a "projection") was used, you simply can't do it.
>
> Paul Cooper

I have got X,Y coordinates in a local metric system, of which I know:
- origin (0,0) gps coordinates
- angle between the Y axis and the North


For a given point with X,Y coordinates I need to know its GPS Lat/Lon
coordinates... Do you know any algorithm to calculate them? Or do you
need more info?

carmelo

unread,
Dec 16, 2008, 3:35:55 AM12/16/08
to
On 16 Dic, 06:41, chandan <a1chan...@gmail.com> wrote:
> You  can refer  to a couple   of  websites  to get  it done , some C
> source codes are  also posted that can do the job . But it really
> depends on the location of the co-ordinates , datum , projection
> because the method of conversion varies depending on each of them.

I have got X,Y coordinates in a local metric system, of which I know:
- origin (0,0) gps coordinates
- angle between the Y axis and the North

Can you give me any web site about which you're talking that can help
me solving this problem?

Paul Cooper

unread,
Dec 16, 2008, 5:21:15 PM12/16/08
to
On Tue, 16 Dec 2008 00:35:55 -0800 (PST), carmelo <csa...@tiscali.it>
wrote:

>On 16 Dic, 06:41, chandan <a1chan...@gmail.com> wrote:

You need to know at least the name of the projection and various
parameters that are specific to the grid you are using. You might be
able to find the projection by looking at www.epsg.org; that has a
directory of projections and parameters in use in various parts of
the world. Once you've found that, a software package called "proj"
will allow you to do the conversions - it's a command-line program,
but it is very effective.

Paul Cooper

user923005

unread,
Dec 16, 2008, 5:27:14 PM12/16/08
to

If you know the exact lat and lon of your origin, then you can compute
everything that you need using great circles.
Proj.4 has very accurate great circle calculations (assuming that you
have or can compute an accurate distance and direction to each point
of interest from your known origin). See, for instance:
http://trac.osgeo.org/proj/wiki/man_geod

Home page:
http://trac.osgeo.org/proj/wiki

carmelo

unread,
Dec 17, 2008, 3:48:19 AM12/17/08
to


The reference system I'm using is not a "standard" system, it is
"local", developed for referring objects respect its origin.

I was able to transform local X,Y meters coordinates using the "Lat/
lon given radial and distance" formula:
http://williams.best.vwh.net/avform.htm#LL

0 new messages