gps - Latitude,longitude and geographical quarter (NW, NE, SW, SE) from a center to a given point -
considering latitude , longitude, looking way know in quarter located point given center.
nw ne ......|...... ..x...|...... ......|...... ------x------ ......|...... ......|...... ......|...... sw se
ignoring poles , antimeridian (where longitude = +/- 180), it's straightforward:
if(lat > centerlat) if(long < centerlong) nw if(long > centerlong ne if(lat < centerlat) if(long < centerlong) sw if(long > centerlong se
if need work near antimeridian, translate whole system east adding 180 degrees longitudes.
Comments
Post a Comment