latitude-longitude

Latitude Longitude in wrong format DDDMM.MMMM 2832.3396N

徘徊边缘 提交于 2019-12-20 10:05:16
问题 I have a gps module that gives me latitude in longitude in a weird format. DDDMM.MMMM As written on user manual, Degrees*100 + Minutes. As far as I know, It is degrees minutes seconds, and seconds is between 0-59, above than this will increment the minute. But this is giving minutes in decimal places. Does this means 1/1000th of a minute? eg. 07717.3644 E 077 --> degrees 17 --> minutes 3644 --> ? E --> Direction Also how will I convert it to decimal, I am using the formula decimal = degrees +

Indexing a mysql table for geo lookup using latitude/longitude

余生长醉 提交于 2019-12-20 09:45:53
问题 I have a legacy innodb table Listing containing a business with latitude/longitude. Given an input latitude/longitude (below 51.2167/4.41667), the query is to return the first active, enabled, not-deleted 30 businesses in order of proximity (kilometers). A join with the accounts table is made to check the validity of the listing. select listing.* from listing listing , account account where listing.account_id = account.id and listing.active = 1 and listing.approved = 1 and listing.deleted = 0

how to get the current location in latitude and longitude in objective c

烈酒焚心 提交于 2019-12-20 09:24:52
问题 I am using the following code to get the current location,I have added the corelocation framework - (void)viewDidLoad { [super viewDidLoad]; locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.distanceFilter = kCLDistanceFilterNone; // whenever we move locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; // 100 m [locationManager startUpdatingLocation]; } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:

Java double vs BigDecimal for latitude/longitude

雨燕双飞 提交于 2019-12-20 08:59:13
问题 When storing latitudes/longitudes which are typically of the format: 44.087585 (i.e. max 2 numbers before the dot and 6dp) do I need to bother with bigdecimals? 回答1: Using double has enough precision for accurate lat/lon down to inches for 6-7 decimal places. In aviation, if decimal degrees are used, they typically go to at least 7 decimal places. In our NASA simulations, lat/lon data are doubles while all other attitude and altitude are floats. In other words, the 6th decimal place for

Finding the nearest neighbor to a single point in MATLAB

情到浓时终转凉″ 提交于 2019-12-20 06:31:58
问题 I'm trying to do a nearest neighbor search that yields a single point as the single "nearest neighbor" to another point in matlab. I've got the following data: A longitude grid that is size 336x264 "lon" some random point within the bounds of the longitude grid "dxf" I've tried using MATLAB's "knnsearch" function https://www.mathworks.com/help/stats/knnsearch.html But sadly when I use the command: idx = knnsearch(lon, dxf) I am met with the error: "Y must be a matrix with 264 columns." Is

Longitude, Latitude to XY coordinate conversion

荒凉一梦 提交于 2019-12-20 05:56:06
问题 I want to now how to convert longitude, latitude to its equivalent xy coordinate components in iPhone programming. (I am using only CoreLocation programming, and want to show a point on iPhone screen without any map). thanks 回答1: Well the exact conversion depends on exactly which part of the Earth you want to show, and the stretching along longitude varies according to latitude, at least in Mercator. That being said, even if you don't want to display an actual MapKit map, it would probably be

Calculate the mid point of latitude and longitude co-ordinates

只愿长相守 提交于 2019-12-19 21:48:56
问题 Does anyone know the best way to go about getting the mid-point of a pair of latitude and longitude points? I mm using d3.js to draw points on a map and need to draw a curved line between two points, so I need to create a mid point to draw a curve in the lines. Please see image below for a better understanding of what I am trying to do: 回答1: Apologies for the long script - it just seemed fun to draw stuff :-). I've marked off sections that are not required // your latitude / longitude var co2

Error on Latitude and Longitude - Google Maps API JS 3.0

余生颓废 提交于 2019-12-19 18:24:22
问题 After a while, Google Maps seems to change the property name (Qa or Pa) to Na or another name. var map; function initialize() { var myLatlng = new google.maps.LatLng(-25.363882,131.044922); var myOptions = { zoom: 4, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); google.maps.event.addListener(map, 'click', function(event) { AlertPos(event.latLng); }); } function AlertPos (location) { // try to show the

Need to find latitude and longitude of postcodes and store into my database [closed]

好久不见. 提交于 2019-12-19 04:06:17
问题 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 4 years ago . I’ve got a database full of UK Postcodes, now I’d like to be able to store the latitude and longitude of these specific postcodes along with the record with the database. Is there any way that I can obtain this data free without violating any T&C's? I know I could do this using Google maps API for each postcode,

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

a 夏天 提交于 2019-12-18 17:37:10
问题 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 =