latitude-longitude

longitude reading measured in degrees with a 1x10^-7 degree lsb, signed 2’s complement

谁都会走 提交于 2019-11-30 15:41:27
I am receiving data from a gps unit via a udp packet. Lat/Lng values are in hex. Example Data 13BF71A8 = Latitude (33.1313576) BA18A506 = Longitude (-117.2790010) The documentation explains that longitude/latitude readings are measured in degrees with a 1x10^-7 degree lsb, signed 2’s complement. For the Latitude I can convert using this formula: 13BF71A8 = 331313576 * 0.0000001 = 33.1313576 This code works for Lat but not for Lng: function convertLat(h){ var latdec = parseInt(h,16); var lat = latdec * 0.0000001; return lat; } console.log("LAT: " + convertLat("13BF71A8")); I am having trouble

How to retrieve the GPS location via SMS

∥☆過路亽.° 提交于 2019-11-30 15:26:06
I made an Application that gives me the location of my Android phone. Now I want to make a method that helps me to retrieve the GPS location of my phone (latitude longitude or the address if possible) with an SMS. Exemple: phone number 558899. I send an Sms with "get location" to 558899 an get a message back with the coordinates. this may help: "Capture" incoming SMS: http://www.codemobiles.com/forum/viewtopic.php?p=95 Send SMS: http://www.anddev.org/how_to_send_sms-t552.html Edit: Dead link. I don't remember what exactly was in it, just like Google's cache and Internet Wayback Machine.

Detect if point in Latitude/Longitude based Polygon

霸气de小男生 提交于 2019-11-30 15:16:11
I'd like to detect, on the server side using C# only, whether a Latitude/Longitude based coordinate is within an area (polygon) made up of Latitude/Longitude based points. I believe the right way to do this is raycasting, but maybe there is already a C# implementation out there as it's not trivial? Also, I understand that SQL Server has some geometry function such as STIntersects but in order to use that I need both SQL Server 2008 running and every check would involve a database connection which is undesirable. bmm6o Since a sphere is a locally diffeomorphic to the plane, you can use any

Pandas Dataframe: join items in range based on their geo coordinates (longitude and latitude)

末鹿安然 提交于 2019-11-30 14:37:11
I got a dataframe that contains places with their latitude and longitude. Imagine for example cities. df = pd.DataFrame([{'city':"Berlin", 'lat':52.5243700, 'lng':13.4105300}, {'city':"Potsdam", 'lat':52.3988600, 'lng':13.0656600}, {'city':"Hamburg", 'lat':53.5753200, 'lng':10.0153400}]); Now I'm trying to get all cities in a radius around another. Let's say all cities in a distance of 500km from Berlin, 500km from Hamburg and so on. I would do this by duplicating the original dataframe and joining both with a distance-function. The intermediate result would be somewhat like this: Berlin -->

Finding closest pair of points on a sphere

六眼飞鱼酱① 提交于 2019-11-30 14:19:28
I know how to implement n log n closest pair of points algorithm (Shamos and Hoey) for 2D cases (x and y). However for a problem where latitude and longitude are given this approach cannot be used. The distance between two points is calculated using the haversine formula. I would like to know if there is some way to convert these latitudes and longitudes to their respective x and y coordinates and find the closest pair of points, or if there is another technique that can be used to do it. I would translate them to three dimensional coordinates and then use the divide and conquer approach using

convert latitude and longitude to northing and easting in java?

跟風遠走 提交于 2019-11-30 13:53:49
how to convert latitude and longitude to northing and easting in Java? I'm assuming you mean UK OSGB easting and northings. The trigonometry behind this one is hilarious, but you can use the JCoord library for this, it makes it easy (if quite CPU intensive). To follow up on @DD's comments below, there is a gotcha with JCoord, in that you have to make sure you're using the correct datum when converting from Easting/Northing to Lat/Long, and vice versa. Take @DD's code: LatLng latLng = new OSRef(394251,806376).toLatLng(); This will return a Lat/Long which uses the OSGB36 datum, i.e. the "flat

Get screen coordinates by specific location and longitude (android)

旧城冷巷雨未停 提交于 2019-11-30 13:48:25
I have an application of augmented reality in which I have stored information such us metro, gas stations, places of interest, etc. with the corresponding latitude and longitude. Now, according to the orientation of the device, I would show a marker for each site in the camera view of the device. Similar to Layar and Wikitude. It takes three days searching without stopping and have not found anyone to explain how to solve this problem. Since information on this topic is very sparse, and I recently solved this problem on the iPhone, I thought I would share my method for anyone that can make it

Latitude/Longitude dataset for country borders [closed]

℡╲_俬逩灬. 提交于 2019-11-30 11:19:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 months ago . I'm writing a program to display the expected lifetime of our product as it relates to average weather conditions in various locations across the globe and I'd like my map to reflect the latest country borders. Can anyone recommend somewhere to get a dataset of latitude/longitude points for the world's latest

How can I do efficient range searching + counting with latitude/longitude data?

风流意气都作罢 提交于 2019-11-30 11:09:45
问题 I'm working with a large set of points represented by latitude/longitude pairs (the points are not necessarily unique, there could be several points in the set that are at the same location). The points are stored in a database. What I need to do is figure out a way to efficiently perform a search to get the number of points that lie within a given radius (say, 25 miles) of an arbitrary point. The count does not need to be 100% accurate - more importantly, it just has to be fast, and

Convert lat/long to pixel X&Y co-ordinates

China☆狼群 提交于 2019-11-30 10:48:02
This type of question seems to have been asked numerous times but none of the solutions posted get me anywhere near the answer I need. I have this map of Northland, New Zealand and I'd like to map Lat/Long values to x/y (pixel) values on this image (http://i.stack.imgur.com/3ok4O.gif - which is 400px square) Right now I do not know the precise lat/long boundaries of this image, but I do have some example data which should be useful to someone who knows what they are doing. LAT LONG X Y -35.3989854471 173.504676819 192.92777494 196.760481649 -35.2647882735 174.121499062 271.426291418 176