International Space Station Overhead Lamp

Hi - i know im not the first person with this idea but i havnt seen it carried out by an arduino before.

I would like to trigger an RGB led when the location of the ISS is >1000 miles from my given location. I have found this excellent ISS Location API by Nathan Bergey and i have used his Python example successfully to update google map with the location.

I thought i could maybe use Ubidots to trigger a HTTP URL that turns the LED on every time the station flies overhead as mentioned here but i cant seem to translate this to an arduino

My Hardware consists of a UNO, Ethernet Shield and a WIFI Shield (would prefer WIFI)

It would be great if someone could nudge me in the right direction with the best way to do this

Many Thanks Al

The API give you the latitude and longitude of the point on earth below the ISS.

Use your latitude, longitude, and the mean radius of the earth to calculate your XYZ position in the earth coordinate system: origin at the center, z axis from pole to pole, X plane through the equator, Y plane through the prime meridian. The calculation is the same as converting from 3D polar coordinates (azimuth, elevation, and radius) to 3D cartesian coordinates (X, Y, Z).

Connect to the server and send the URL. Parse the text you get back to find the latitude and longitude of the ISS. Close the connection. Use the latitude, longitude, and mean orbital radius to calculate the XYZ position in the earth coordinate system. Take the square-root of the sum of the square of the X,Y,and Z differences to get the distance between.

I would like to trigger an RGB led when the location of the ISS is >1000 miles from my given location

that turns the LED on every time the station flies overhead

So "trigger" in this context means "turn off"?