Best way to control over ethernet + GPS correction

I've read how to read PHP POST/GET data and all that jazz with arduino Ethernet

To control a robot through a web GUI, I'd need the obvious 8 directional controls. Would the easiest be to just have a box where user (me) sets the timeout for each command?

For advanced control, I found this: http://blog.numfum.com/ And would like to use it.

That said, getting javascript data from the joystick, and pushing it "live" to a PHP query, not such a cakewalk.

I'm thinking to have the arduino's page iframed into a local page on my laptop, and use javascript to refresh that iframe with the joystick data in the GET query of the URL, every half-second.

urlbase = "http://192.168.1.133" // Arduino
url = urlbase + "?joyX=" + joyX + "&joyY=" + joyY;
document.getElementById("iframe").src = url;

Would this method work?

Robot will have Arduino Ethernet and Arduino Mega onboard, linked up by either I2C or TTL (haven't decided yet). Ethernet will handle control inputs, Mega will interpret the inputs and control the motors.

Ethernet will be wired to a router on the robot (which will also receive 2 IR day/night security IP cameras), which will have a high-gain directional antenna mounted to a servo platform. Using my phone to get coordinates, I'll enter my current control position into the robot's session memory, and using those coordinates + onboard GPS + compass, the servo will ensure the antenna is always aimed in my direction.

IE:

controlX: -97.111444
controlY: 32.722666
currX: -97.112238
currY: 32.722930
currHead: 38 degrees

vector_Dist: sqrt( sqrt( pow(2,(controlX - currX)) + pow(2,(controlY - currY)) ) //Assume, given Wifi range, to ignore longitude angular distortion
vector_angle: arctan( (controlX - currX) / (controlY - currY) ) // Assume, given Wifi range, to ignore longitude angular distortion

thus,

vector_Dist: sqrt ( pow(2, (-97.111444 - -97.112238) * 69.17) + pow(2, (32.722666 - 32.722930) * (69.17 * cos(currY))) ) = sqrt (pow(2, 0.000794 * 69.17) + pow(2, -0.0006634 * (69.17 * cos(32.722930))) = sqrt (pow(2, .05492098) + pow(2, -0.0006634 * 58.192) = sqrt (pow(2, .05492098) + pow(2, -.038605) = sqrt (3.016e-3 + 1.49e-3 ) = 0.067 miles * 5280 feet = 354 feet (GEarth says 262 feet)
vector_angle: arctan ( (-97.111444 - -97.112238) / (32.722666 - 32.722930) ) = arctan( 0.000794 / -0.0006634 ) = -50.12 degrees = 50 degrees east of south (GEarth says 111 heading = 70 EoS) = (180-50) = 130 degrees - 38 degree heading = antenna should point 92 degrees back of right on robot.

That will take some refining....

Calculate distance and bearing between two Latitude/Longitude points using haversine formula in JavaScript has the haversine distance formula, but heading seems way off...

bump

Got the heading figured out. Don't really need distance, only good use would be to sense when about to leave contact range, but that changes with environment, so no sense in figuring it out really.

d=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))

sin(32.722666) = 0.540573176771652
sin(32.722930) = 0.540577053184205
cos(32.722666) = 0.841296999016997
cos(32.722930) = 0.841294508225676
cos (-97.111444 + 97.112238) = 0.999999999903979

d = acos( 0.540573176771652 * 0.540577053184205 + 0.841296999016997 * 0.841294508225676 * 0.999999999903979)

d = acos( 0.292221454929644 + 0.70777854499178)
d = acos( 0.999999999921424 )

d = 0.000718261658787

argacos=(sin(lat1)-sin(lat2)*cos(d))/(sin(d)*cos(lat2))

crs21=acosf(argacos)   


sin(32.722666) = 0.540573176771652
sin(32.722930) = 0.540577053184205

cos(d) = cos(0.000718261658787) = 0.999999999921424

sin(d) = sin(0.000718261658787) = 0.000012536030836

cos(32.722930) = 0.841294508225676

argacos = (0.540573176771652 - 0.540577053184205 * 0.999999999921424)/(0.000012536030836 * 0.841294508225676)

argacos = -0.000003876412553 / 0.000010546493897

argacos = 0.367554619654468

crs21 = acos(0.367554619654468) = 68.43511682448174

- or -

crs21 = (2pi - (acos(0.367554619654468) = 68.43511682448174)) - 180 = ~112

simplified:

double d=acos( (sin(lat1)*sin(lat2))+(cos(lat1)*cos(lat2)*cos(lon1-lon2)) );

double argacos=( sin(lat1) - (sin(lat2)*cos(d))) / (sin(d)*cos(lat2) )

double crs21= 180 - acos(argacos)

I'm reading, and am I correct that for what I am doing, I may be better using a XBee XSC 900mHz module, and making my own controller with an uno?

I've read of drones getting ~1 mile LOS or better. Only thing I won't get is a camera feed.

(Because a pair of XTend 1W's isn't exactly budgettable, and they have interference issues)