# Show the current position of the International Space Station (ISS)

**URL:** https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106
**Category:** Share Your Projects
**Created:** [26 May 2022 12:59 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106 "2022-05-26T12:59:52Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [26 May 2022 12:59 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106/1 "2022-05-26T12:59:52Z")

</div>

This is a spin-off from a question I answered for someone on the forum recently.

I thought it would make a great fill-in exercise for any of my IoT students who have a few minutes to spare towards the end of a session of my IoT Club.

Here's a screen-shot of a simple dashboard - I'm sure most people could improve it.

 ![iss_map.PNG](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/14548b776031440216f133d37a93ba6df7fdf209.jpeg)

![ISS_flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/e/1e1da9233730326c384b48c4c55ac93e6ab0cb37.png)

```auto
[{"id":"7969e7f53683abdf","type":"debug","z":"a9b12d67e974b017","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":390,"y":560,"wires":[]},{"id":"605c9ce313e4a5a7","type":"ui_worldmap","z":"a9b12d67e974b017","group":"2976f0b10d880a55","order":1,"width":"12","height":"10","name":"ISS","lat":"51","lon":"0","zoom":"4","layer":"EsriS","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"true","panlock":"false","zoomlock":"false","hiderightclick":"true","coords":"none","showgrid":"false","allowFileDrop":"false","path":"/worldmap","overlist":"CO,RA,DN","maplist":"EsriS,EsriT,NatGeo","mapname":"","mapurl":"","mapopt":"","mapwms":false,"x":590,"y":500,"wires":[]},{"id":"060a72676e03f9d3","type":"inject","z":"a9b12d67e974b017","name":"Trigger every 5-secs","props":[{"p":"headers","v":"{\"Accept\":\"text/json\"}","vt":"json"},{"p":"url","v":"http://api.open-notify.org/iss-now.json","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":200,"y":440,"wires":[["3b88474842c4750d"]]},{"id":"3b88474842c4750d","type":"http request","z":"a9b12d67e974b017","name":"Get ISS coordinates","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":200,"y":500,"wires":[["6b32ca2b8bafb6cf"]]},{"id":"6b32ca2b8bafb6cf","type":"function","z":"a9b12d67e974b017","name":"Extract lat, lon","func":"let out = []; // Declare an array\n\nlet id = \"ISS\";\nlet lat = \"\";\nlet lon = \"\";\n\nlon = msg.payload.iss_position.longitude;\nlat = msg.payload.iss_position.latitude;\n\nout.push({\"name\": id, \"lat\": lat, \"lon\": lon, \"layer\": \"ISS position\", \"icon\": \"iss\"});\n\nmsg.payload = out;\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":500,"wires":[["605c9ce313e4a5a7","7969e7f53683abdf"]]},{"id":"2976f0b10d880a55","type":"ui_group","name":"World_Map","tab":"906026b74a1ed967","order":1,"disp":true,"width":"12","collapse":false,"className":""},{"id":"906026b74a1ed967","type":"ui_tab","name":"ISS","icon":"dashboard","order":41,"disabled":false,"hidden":false}]

```

I'm using the API at... [http://api.open-notify.org/iss-now.json](http://api.open-notify.org/iss-now.json) to obtain the 'lat' & 'lon' of the ISS, then send these details to the worldmap node. I suggest you restrict the Trigger interval to 5-sec or more otherwise the server at open-notify might get a bit stressed. (The animation looks pretty good at 1-sec intervals.)

I hope someone finds this flow useful.

**EDIT:** Updated flow and screenshot with ISS icon.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [26 May 2022 13:18 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106/2 "2022-05-26T13:18:15Z")

</div>

Perhaps if you have a clever student who wants to push ahead, get them to convert the source for open-notify to JavaScript so that Node-RED can go direct to the source 🤯

[Open-Notify-API/iss.py at master · open-notify/Open-Notify-API (github.com)](https://github.com/open-notify/Open-Notify-API/blob/master/iss.py)

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [26 May 2022 13:21 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106/3 "2022-05-26T13:21:36Z")

</div>

Great idea - thanks Julian.  
I'll keep that one up-my-sleeve for one of my "keen" students to tackle.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [26 May 2022 16:01 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106/4 "2022-05-26T16:01:15Z")

</div>

the worldmap does have an ISS icon built in....

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/e/fe9178fc8faea3cd9fcca237f62ea38cb0aa40ce.jpeg)

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [26 May 2022 16:09 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106/5 "2022-05-26T16:09:16Z")

</div>

Is the ISS modeled on the [TIE/sh VIP Shuttle](https://starwars.fandom.com/wiki/TIE/sh_shuttle)?

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [26 May 2022 16:13 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106/6 "2022-05-26T16:13:21Z")

</div>

Thanks Dave - I've updated my screenshot and NR-flow to incorporate the ISS icon.

---

<div class="post-metadata">

### Author: ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)
#### Post date: [26 May 2022 20:27 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106/7 "2022-05-26T20:27:26Z")

</div>

Amazing. Thank you for sharing

---

<div class="post-metadata">

### Author: ![Hopperpop](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hopperpop/32/42533_2.png) [@Hopperpop](https://discourse.nodered.org/u/Hopperpop)
#### Post date: [26 May 2022 20:43 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106/8 "2022-05-26T20:43:39Z")

</div>

You can also use following node to calculate the position yourself. That way you can go around the poll limit.  
I haven't used the node myself, but I have a similar project where I did the calculations on an esp8266.

> **[node-red-contrib-satellites](https://flows.nodered.org/node/node-red-contrib-satellites)**
>
> A Node-RED node to work with 3d satellite orbit data.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [30 May 2022 11:56 UTC](https://discourse.nodered.org/t/show-the-current-position-of-the-international-space-station-iss/63106/9 "2022-05-30T11:56:35Z")

</div>

Indeed I forgot we had that ! It also includes a 3d world view "earth" node

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/0/70c101b5c939e755a0804257102e33861c640290.jpeg)
