This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Real time data download
#8
You won't be able to make 400 requests per second, especially as the web server on the phone is not that efficient. In fact, you would need an even higher frequency to make sure not to miss a value die to "bad timing". You need to request multiple values at once at a lower request rate. To do so, you need to look at the last example "/get?time=30&value=30|time".

For example, let's assume you want to read acceleration data from a buffer "acc" and there is a matching timestamp buffer "t". You will need to request /get?acc=full&t=full first to get all data points that are already there. Then your script needs to take the last entry of "t" and request any data that has been taken since this last "t". For example, if the last data point was acc=7.2 and t=0.34, you would request anything since 0.34s like this: /get?t=0.34&acc=0.34|t which means that you request all values of t larger than 0.34 and all values of acc that correspond to t values larger than 0.34.

This way you can lower the request rate and even if it is limited by your network you will not miss any data point.
Reply


Messages In This Thread
Real time data download - by jbshute - 11-10-2018, 12:50 PM
RE: Real time data download - by jbshute - 11-10-2018, 02:08 PM
RE: Real time data download - by jbshute - 11-11-2018, 03:03 AM
RE: Real time data download - by jbshute - 11-11-2018, 01:25 AM
RE: Real time data download - by Romaxx - 10-28-2021, 09:40 AM
RE: Real time data download - by Sebastian Staacks - 10-28-2021, 11:21 AM
RE: Real time data download - by Romaxx - 10-28-2021, 01:11 PM
RE: Real time data download - by Romaxx - 11-04-2021, 05:40 PM
RE: Real time data download - by Romaxx - 11-06-2021, 08:40 PM
RE: Real time data download - by Romaxx - 03-26-2022, 11:37 PM
RE: Real time data download - by Romaxx - 11-08-2021, 08:57 PM
RE: Real time data download - by Romaxx - 03-19-2022, 09:23 PM
RE: Real time data download - by Romaxx - 03-22-2022, 08:15 PM
RE: Real time data download - by Romaxx - 03-29-2022, 09:13 PM

Forum Jump: