Cartesian coordinates from GPS

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Cartesian coordinates from GPS

Postby klebe » Thu Mar 18, 2010 11:02 pm

Hi! Everyone. I'm a new Android developer and this is my first post on this forum. I have a problem.

I can get the langitude and longitude of a location in degrees by the GPS. I need cartesian coordinates for my algorithm.

I have found an algorithm for translating the latitude/longitude in cartesian coordinates but I need to know the hemisphere of the location, i.e. I need to know if the latitude is North or South and if the longitude is West or East. How to get this information?

Thanks in advance
klebe
klebe
Freshman
Freshman
 
Posts: 3
Joined: Thu Mar 18, 2010 10:33 pm

Top

Postby hwrdprkns » Wed Mar 24, 2010 9:26 pm

Well think of the earth as four quadrants.

If positive y and positive x, then your in the top east hemisphere

If positive y and negative x, then your in the top west hemisphere

If negative y and positive x, then your in the bottom east hemisphere

If negative y and negative x, then your in the bottom west hemisphere

I'm pretty sure this is how it would work for longitude and latitude. Where longitude is x and latitude is y.
The more you learn, the less you know.
hwrdprkns
Junior Developer
Junior Developer
 
Posts: 15
Joined: Wed Nov 25, 2009 8:14 am

Postby klebe » Wed Mar 24, 2010 9:31 pm

Thank you for your kind reply hwrdprkns.

I think it is exactly like you explained. I already implemented this solution and then I will need to test the application in the real world to see if it works.

Best
klebe
Freshman
Freshman
 
Posts: 3
Joined: Thu Mar 18, 2010 10:33 pm

Postby hwrdprkns » Wed Mar 24, 2010 9:34 pm

klebe wrote:Thank you for your kind reply hwrdprkns.

I think it is exactly like you explained. I already implemented this solution and then I will need to test the application in the real world to see if it works.

Best


Or you could just feed your app dummy locations, such as things in Australia, China, Canada, and Brazil.
The more you learn, the less you know.
hwrdprkns
Junior Developer
Junior Developer
 
Posts: 15
Joined: Wed Nov 25, 2009 8:14 am

Postby klebe » Wed Mar 24, 2010 9:37 pm

No, the problem is not that. I need a motorbike to test my application and I'm waiting the permission from my university to use one of its... the emulator is not enough to simulate real values in this case. We will see :)
klebe
Freshman
Freshman
 
Posts: 3
Joined: Thu Mar 18, 2010 10:33 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 3 guests