BookmarkSubscribeRSS Feed



Aug 20, 2015

International Space Station Current Location

This script is a slightly different script posted by Craige:

This script uses the built in HTTP Request JSL object and the Parse JSON method to visualize the current location of the International Space Station using the RestAPI posted here:

The Rest endpoint is:

and its JSON result looks like:

  "message": "success", 
  "timestamp": UNIX_TIME_STAMP, 
  "iss_position": {
    "latitude": CURRENT_LATITUDE, 
    "longitude": CURRENT_LONGITUDE

I extract relevant pieces of JSON to populate a JMP Data Table using Parse JSON:

json_jsl = ParseJSON(json);
date = json_jsl["timestamp"];
date = AsDate(Date MDY(1, 1, 1970) + date); //turn into a JMP Date
dt:timestamp[row] = date;
dt:longitude[row] = Num(json_jsl["iss_position"]["longitude"]);
dt:latitude[row] = Num(json_jsl["iss_position"]["latitude"]);

I'm not quite done because I really am interested in knowing the distance travelled between the latitude and longitude lines so I used this algorithm (converted to JSL)

and I calculated the speed in miles per hour (since that's how I think).


I set up the JSL Scheduler to query the Rest endpoint every 5 seconds (that's what the site recommends) and create a graph to track the location of the space station.


And finally, I decided to have some fun and use images for markers on the graph.

It was a fun experiment.





Article Labels
Article Tags