amagicdrag0n Posted October 30, 2014 Share Posted October 30, 2014 (edited) Hi Guy's MySQL version 5.5.40 PHP 5Drupal 7Website is hosted on my own Ubuntu Server Firstly can I say that I am a complete newbie and am not really a coder, I'm at an age where it is quite difficult to learn new things.I have just built my first website that tracks aircraft around the UK at www.donnyradar.co.ukWhat I would like to do is take a point on a map, like the location of an airbase and track aircraft that are within a 10 mile radius of that point.I have a table called 'livedata' that is populated by data taken from aircraft's adsb transponder, this includes the aircraft's ICAO hex code, Callsign, Altitude, Heading and Position (Latitude/Longitude) Q1. Is it possibleQ2. If so, how would I do it? Thanks in HopeDave Edited October 30, 2014 by amagicdrag0n Link to comment Share on other sites More sharing options...
Ingolme Posted October 30, 2014 Share Posted October 30, 2014 It's not exactly simple. First I'd have to analyze what data you have available. Your program needs to convert plane locations and the point on the map that the user clicked on to latitude / longitude coordinates. Once you have the coordinates you need to calculate distance. Normally, distance in a Euclidean space is sqrt( x*x + y*y), but this is not a Euclidean space. Converting 10 miles to a latitude / longitude range is difficult because 10 miles close to the poles covers more degrees than 10 miles on the equator. There probably is a geometric formula to calculate that, I'm sure I could find out the correct formula for the Earth's geometric space with some research (research is also a cost to take into account when working on a project). Once you have the formula for distance what you would do is to query the database for all entries where the distance from the airplane to the selected point on the map is less than 10 miles. In conclusion: Is it possible? Of course it is, but it's not easy. How would you do it? I've given a summary, but it's a project that requires knowledge, research and work. Since you mentioned that you don't have much experience with programming, it probably is best is to hire a programmer to do the job, probably one with an engineering background. 1 Link to comment Share on other sites More sharing options...
amagicdrag0n Posted October 30, 2014 Author Share Posted October 30, 2014 Thanks Foxy Mod I think that you have mis-understood slightly :-) There will be no interaction from the user. I have the co-ordinates of the airbases, my plane plotting software gives me the co-ordinates of the aircraft, I just need to be able to query if any aircraft is within the radius I require from the airbase. As this is just a hobby thing, I'll probably have to drop the idea as I don't have anywhere near the skills it looks as though I would need Regards Dave Link to comment Share on other sites More sharing options...
Ingolme Posted October 30, 2014 Share Posted October 30, 2014 User interaction wasn't the focus of my post, I just assumed that the point on the map would be chosen by a user. It doesn't matter how the point is selected, though, it still is a latitude/longitude coordinate. I was explaining why it's difficult to convert a latitude/longitude distance into miles. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now