3 ms·
I didn't really understand this part: decrement the ping count at a slightly slower average rate than the ping broadcast Is he saying he's reducing the power
by tlrobinson 11y ago
I didn't really understand this part:
decrement the ping count at a slightly slower average rate than the ping broadcast
Is he saying he's reducing the power of each subsequent transmitted ping, causing nearby units to see more pings than far away units, or something else entirely?
- codyb 11y agoI found it confusing too so I checked out the linked code [0]. Looks like when you're actively receiving pings from friends it slows down how fast that friends ping counter on your badge decreases so they accumulate a larger ping count and appear "stronger" or closer to you. Then as you stop receiving pings (I assume, I'm at work, didn't delve too deep), the ping decrement rate goes back to normal and they get "weaker" or farther from you. Absolutely a super neat way to solve the issue of not being able to account for signal strength. [0] - https://github.com/bunnie/chibios-orchard/blob/orchard-r2/orchard/orchard-app.c#L195 https://github.com/bunnie/chibios-orchard/blob/orchard-r2/or...
- triplesec 11y agoIn practice, you'd have some friends on your list even when you were down a couple of blocks (at C for the portas, for exmaple) and couldn't actually get through, or it was definitely at the edge of range and you might just have got a signal through if lucky (I tried down there and never did), so there is some lag involved, but some intelligence helps you figure that out.
- daxelrod 11y agoHere's what I think is happening (without actually looking at the code). 1. For each person, store an integer ("ping count"). 2. Whenever you receive a ping from that person, increment the ping count. 3. Periodically decrement the ping count, stopping at zero. 4. When a person's ping count is zero, do not display them on the screen. Let's say a ping is transmitted every second. "decrement the ping count at a slightly slower average rate than the ping broadcast" means that #3 should happen every 1.2 seconds. The result of this is that, if somebody is solidly within broadcast range, their ping count constantly goes up. If they are just past the edge of broadcast range, they'll start getting signal loss. The result is that some of their signals will be delivered and some won't. This will mean that their ping count will slowly drop. If someone is completely outside of broadcast range, their ping count will drop more quickly.
- jchrisa 11y agoThis is similar to how direct stream digital audio (SACD) encodes with a 1 bit dac at 2.8 MHz bitrate. https://en.wikipedia.org/wiki/Direct_Stream_Digital https://en.wikipedia.org/wiki/Direct_Stream_Digital Cool tidbit: you can do the digital to analog for this with a low-pass filter.