Re getting data from webpage

Hi, I’m new to Arduino and this forum,
I’m looking for help if possible

I need to extract the elevation data from this website to automatically input into my programme but I’m unsure how to do it
It’s column 4 which is separated by columns “|”

I’ve been given this for code for a pi and just wondered if it’s possible in an Arduino

MY_TS=$((date +%s + 1)) && curl 'https://www.n2yo.com/sat/instant-tracking.php?s=39215&hlat=51.73333&hlng=-2.36667&d=300&r=484369389745.91864&tz=GMT+01:00&O=n2yocom&rnd_str=21f65bc72b807175cc3a10db24606199&callback=' 2>/dev/null | grep $MY_TS | cut -d"|" -f4

Thanks for your help in advance

So, you need something that has access to the internet. Maybe an ESP8266 with built-in wifi. If you get that board, there are many examples of fetching a URL and parsing it.

A Raspberry Pi is running Linux, completely different world. What "programme" are you referencing? On the Rpi? on your PC? on the Arduino?

Thank you very much for your reply,

I have the Ethernet shield 2 arriving today and I’ve built a programme in arduino ( it’s for a satellite dish positioning) so it runs a motor drive for only elevation

I simply now need the website position data and I’m running :slight_smile: and this is the bit where I’ve become a bit stuck as it’s just extracting the relevant field from the web data

this
https://www.n2yo.com/sat/instant-tracking.php?s=39215&hlat=51.73333&hlng=-2.36667&d=300&r=484369389745.91864&tz=GMT+01:00&O=n2yocom&rnd_str=21f65bc72b807175cc3a10db24606199&callback='

returns a JSON. I don't see a column 4 which is separated by columns "|"

I see an ID and 300 position data, separated by |

It has about 36KB. For shure to much to process as JSON in an UNO/MEGA. So either you switch over to a controller with more SRAM or you have to implement an JSON Parser to parse only the parts your are interested in. A finite state machine might do the job.

Which part of the message are you interested in?
Do you have a description of the API to reduce the output to the part you are interested in?

Good morning thanks for your response
The only field I need to read is the one which reads |27.66| the rest can be ignored as it’s purely elevation value only

2.04294941|24.86458381|145.89|27.66|146.02620508|-5.05243167|35781.63|0.075301502483527|39215|1602225694|0||||"}

I need it’s live position from the yellow box on this page LIVE REAL TIME SATELLITE TRACKING AND PREDICTIONS: ALPHASAT (INMARSAT 4A-F4)

So by the looks of it the first position

Ok thank you , I will have a go and post my findings