I am working on a real-time ground displacement display (just for my own use for fun, not for any professional use).
The UDP output only sends a packet every 25 samples, which creates a 250ms delay. I want to see if it’s possible to send a UDP packet of the 4 sensor samples 100 times a second, or if that’s not possible, then just send a packet for each data sample.
I looked through all the settings for the UDP output but I couldn’t find any settings to change the content of the output packets, only to change which computers it sends them to.
From my understanding from reading other topics, the sensor board only sends data out in packets of 25 samples, so it wouldn’t be possible for the Pi to get the samples any quicker anyway, but if it’s possible to speed it up I’d really like to do so.
Hello FlyingMoose,
That is correct as, as you have found, the limit of 25 samples per packet is fixed, and it is not possible to increase the UDP output frequency unless we modify the sensor board itself (which is not in our scope).
You will have to see if you can adapt your real-time project (which sounds very interesting!) to the current update rate.
My idea is to have an LED matrix display that will move a bullseye around in the opposite direction, but the same amount of distance as the “ground” movement, so that the bullseye will appear to remain stationary as the floor moves under it.
When I’ve felt earthquakes it feels like the building is moving a foot or two each way. I’d like something to show what’s really going on.
I guess my first step would be to try it with a 250ms delay and see how it looks. I could also only update it every 250ms with the newest samples. Then it would have less lag but be more jumpy. My idea was to put the RS and display on a rolling cart, and move it around to see if the bullseye appears to stay still.
Another thing I’d like to do with it is play back past earthquakes to see what it would have looked like if I was watching the display. Even better would be (if using someone else’s recording made from the ground) to somehow simulate the extra motion caused by the building swaying. My building is 25 stories so it’s the worst height for resonant swaying.
If I can’t get the bullseye display to work, I may just do a live seismograph / waterfall display on a small LCD so at least I can look and see if I just felt an earthquake or if I’m going crazy. I previously lived in NY and only ever felt 1 mild earthquake before moving to the Philippines and I find them scary. That’s why I got the RS.
One more question: Do the 4 UDP packets for the 4 channels come out at about the same time or are they more staggered?
1 Like
This sounds super interesting! I think I’ve never heard of such an application before, looking forward to what you’ll find out!
As far as I know, the packets for all channels come out at the same time (there may be a few milliseconds difference, but negligible), so you should see all waveforms coming in in synchro.
Otherwise, if you decide to go with a live display, I recommend seeing if our RSUDP is good enough for what you have in mind: GitHub - raspishake/rsudp: Continuous visual display, sudden motion monitoring, and historical replay of Raspberry Shake data. It’s already set up to show live data coming from the UDP port of a local Shake on any computer (I use it on another Raspberry Pi).
EDIT: our software team also adds that, to obtain the effect you want and process one sample at a time, you can process the incoming data points individually. This would result in a 0.25-second delay, but it shouldn’t affect the overall display too much.
Thank you for the excellent information and suggestions. I intend to try a number of different methods of processing the incoming data, to trade off update rate with smoothness, and I’ll just have to see what looks best.
I will most likely also have a RSUDP display, since I can send data to multiple computers (or perhaps a single RPi can do both at once, I’ll have to experiment).
This is a longer-term project (I currently have work projects ongoing, so I’m going to wait until I have more free time). I wanted to get a RS up and running first though, so if I do have an earthquake, I’ll have a recording of it that I can use for testing, etc.
2 Likes