scottgchin / delta5_race_timer

Multi-node video transmitter race timer for drone racing
MIT License
159 stars 62 forks source link

Use 'nodeRssiPeak' in delta5Node.ino #73

Open ethomas997 opened 6 years ago

ethomas997 commented 6 years ago

Adds a 'nodeRssiPeak' state variable to track the peak smoothed RSSI value seen since the node was powered on or the frequency set, and makes it so the 'rssiTrigger' etc variables are based on this 'nodeRssiPeak'.

This makes is so the "peak" RSSI value can be captured anytime the node is powered on (instead of only after a race is started). If the racers are lined up before the start, the initial-calibration-pass functionality still operates the same way.

I think it's best to use all possible samples to capture the "peak" RSSI value as soon as possible. The more it changes during a race the less reliable the triggers will be.

--ET

ethomas997 commented 6 years ago

@punkkills My experience with the modules has been that they have a very consistent peak-RSSI level, typically in the 205-215 range. The peak can rise a bit (maybe 5-10) as the box warms up, but the peak-RSSI tracking I've implemented will track that as well.

Whenever a quad/VTX (of any power level) is "in the gate" and right next to the timer, the RSSI gets saturated and the module outputs its peak RSSI value. For a given module the saturated peak-RSSI value is the same regardless of VTX power or frequency. The RSSI-trigger value is an offset of the peak, and the more accurately the peak is detected the better. Having a detected RSSI peak be lower that the "real" peak can lead to false gate-pass (trigger) events.

I think the key point is that whenever a quad/VTX of any power level is within a foot or two of the timer, the detected RSSI is at that peak value. There are not different peaks for different quad/VTX units being read by the same RX5808 module.

--ET

punkkills commented 6 years ago

@ethomas997, Interesting that you found that the peak RSSI is always saturated during a pass, no matter the vtx output power. I have not noticed this in my experience, though it is not something I've been looking for specifically.

If that's true, I think the pass/calibration loop could be further simplified. I just gave the timer to one of our race directors so I don't have it in hand now. I'll check this out once I get it back. Mind if we keep this one on ice until i can take a look?

ed

ethomas997 commented 6 years ago

@punkkills Sure, no problem.

I'd say it's not that the peak RSSI is always saturated during a pass (though it often is), but it can be saturated on any given pass. If it can reach that absolute peak saturation value then basing the RSSI-trigger on a lower value will only degrade the accuracy of detection in general.

ethomas997 commented 5 years ago

Rebased to master-20181112