## Cartesian coordinates from GPS

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

### Cartesian coordinates from GPS

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?

klebe
klebe
Freshman

Posts: 3
Joined: Thu Mar 18, 2010 10:33 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

Posts: 15
Joined: Wed Nov 25, 2009 8:14 am

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

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

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

Posts: 15
Joined: Wed Nov 25, 2009 8:14 am

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

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