Closed yasushisakai closed 5 years ago
Not sure if relevant, but 2 notes regarding the udp stream:
Data is only sent To clarify I'm pointing to these situations
- when the slider has moved
- when light conditions are unstable
Setting an Xms 'post' delay
@RELNO I think that will be helpful to both Unity and Processing. I don't know if I have articulated properly, but does this mean there is a minumum send interval? Meaning anything sent between that is ignored, expect the last data.
Ex) if threshold < 50 | A | B | C | D |
---|---|---|---|---|
0ms | 20ms | 50ms | 75ms |
In this case, Scanner will send B, D (<= will send, C, D)
@yasushisakai yes, the Xms is a simple time.sleep()
func. that halts the entire scanner for certain delta. However, the slider [for high accuracy purposes] is not affected by it and is constantly sending.
@RELNO thanks.
I don’t think we want to sleep
, I think we want to hold. From the example presented above if we sleep
doesn’t it send A
for the first sending, ignoring B
and C
? The assumption was that first readings are noisy, we prefer the last one. (<- I don’t know, correct me)
If 30 - 60fps = 16 - 32 ms is as fast as the simulation can handle. 2 frames (32 - 64ms) is I guess hard to be perceived by humans. I don’t know about the network latency, but I will ask Carson about the slider on Monday.
@yasushisakai not sure I get the above example then, but for simplicity: Already embedded is a pause func in the camera loop. This is agnostic to whether changes happened or not. However, since scanning only happens every Xms time [instead of every frame], noisy event are reduced to minimum so that:
A - - B - - C - - D - E - Stable == Noise == Noise == Stable == Stable Send = skip = Send = Skip = Send
Moved discussion to RELNO/CityScope_Scanner_Python
Current
The simulation will update the state, as soon as there is new data from the scanner. Creating flickering of the base light, which triggers a new data state, which triggers a new state .... and so on. This is a positive feedback. Given that we are sending UDP packets to through wireless, this may potentially send garbage to the overhead projection, resulting to incorrect data or async between top and bottom projection.
Should
Create a buffer that lasts for 50ms (should be configurable) new data will be overwritten until this time window. After this delay, the new data should be applied.