How do I transform GPS Coords on to a cartesian plane.
Naphtali Moore
Posts: 42
Ok, that's not the real question. The real question is: How do I transform GPS Coords on to a cartesian plane. I have an·aerial·photo of Seattle Center. Of course, when its on the screen each pixel corrisponds to a set x,y coord. How would I convert between x,y and longitude, latitude. I'm baisicly looking to write these functions:
char* getLong(int x, int y)
char* getLat(int x, int y)
int getX(char* Longitude, char* Latitude)
int getY(char* Longitude, char* Latitude)
Sure there are obvious things I can do to improve the above code like adding a structure to hold the GPS coords or code to allow for scaling. But, what I need is the math to compisate for the curve of the earth in converting gps to x,y. Any help is appriciated, THANKS! [noparse]:)[/noparse]
Post Edited By Moderator (Chris Savage (Parallax)) : 5/3/2007 10:42:09 PM GMT
char* getLong(int x, int y)
char* getLat(int x, int y)
int getX(char* Longitude, char* Latitude)
int getY(char* Longitude, char* Latitude)
Sure there are obvious things I can do to improve the above code like adding a structure to hold the GPS coords or code to allow for scaling. But, what I need is the math to compisate for the curve of the earth in converting gps to x,y. Any help is appriciated, THANKS! [noparse]:)[/noparse]
Post Edited By Moderator (Chris Savage (Parallax)) : 5/3/2007 10:42:09 PM GMT
Comments
For small areas I don't think the curvature of the earth will factor in very much. Unless you are near the poles.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Educate your children to self-control, to the habit of holding passion and prejudice and evil tendencies subject to an upright and reasoning will, and you have done much to abolish misery from their future and crimes from society"
Benjamin Franklin
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
In my app I intend to allow the user to load a graphic for the map of the "work area". Then to input the GPS coord of three of the corners and have it set the scale. Hmmmm.... hopefully I can set this up in a week or two. Then to add zoom +/- to the image hehe [noparse]:)[/noparse]
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I would love to change the world, but they won't give me the source code
People say that if you play Microsoft CD's backwards, you hear satanic things, but that's nothing, because if you play them forwards, they install Windows.
I spent a minute looking at my own code by accident. I was thinking "What the heck is this guy doing?"
-Phil