olliw42 / mLRS-docu

Documentation for the mLRS project
GNU General Public License v3.0
35 stars 11 forks source link

ap page rssi #110

Closed jlpoltrack closed 3 months ago

jlpoltrack commented 11 months ago

Title

olliw42 commented 11 months ago

very good start I think it needs to mention however a bit more of the complexity with ardupilot

if I'm not mistaken this conversion is so only if the CRSF protocol is used. Moreover I think one needs to get some ArduPilot parameters correct, if I'm not mistaken one needs to set RSSI_TYPE = 3. And when there is also the option RC_OPTION "Use LQ for RSSI with CSRF".

to make it more confusing, if one has also mavlink and flow control enabled (which most will), then the mLRS receiver is also sending the RADIO_STATUS message, which also contains a rssi value (in fact tow, rssi and remrssi). This value is taken if RSSI_TYPE = 5. Here mLRS applies the same scaling from dbm to rssi value as used by ArduPilot with CRSF

to make it even more confusing, if the mLRS tx module is also emitting a RADIO_STATUS message, when in e.g. MissionPlanner you will see also the values coming from this message. In the radio you yet will see another value. So, what you see on and OSD (showing data on the fc side) or in e.g MissionPlanner (showing data on ground side) or on the radio (also showing data on ground side but different "units") can all be different.

and this is just what I pull out of memory, might be incomplete opr partially incorrect.

jlpoltrack commented 11 months ago

As you say, RSSI is a complex topic :) so here are a few thoughts back:

if I'm not mistaken this conversion is so only if the CRSF protocol is used. Moreover I think one needs to get some ArduPilot parameters correct, if I'm not mistaken one needs to set RSSI_TYPE = 3. And when there is also the option RC_OPTION "Use LQ for RSSI with CSRF".

This is a good callout and I will add some bullets that detail what is going on when using RSSI_TYPE = 3 or 5. IMO we don't want to mention this RC_OPTION as AP now supports LQ in addition to RSSI, so you can have both LQ and RSSI. I believe this option was only for when LQ wasn't available in AP. Enabling this option today wouldn't provide any benefit.

to make it more confusing, if one has also mavlink and flow control enabled (which most will), then the mLRS receiver is also sending the RADIO_STATUS message, which also contains a rssi value (in fact tow, rssi and remrssi). This value is taken if RSSI_TYPE = 5. Here mLRS applies the same scaling from dbm to rssi value as used by ArduPilot with CRSF

Do you know if choosing RSSI_TYPE = 5 will populate rxrssi with the value that it receives for rssi from the RADIO_STATUS message? I did a quick check and when using RSSI_TYPE=5 I don't see rssi or remrssi in Mission Planner but only rxrssi. It seems that the remrssi values the receiver sends in the RADIO_STATUS message would only be available in the FC log.

to make it even more confusing, if the mLRS tx module is also emitting a RADIO_STATUS message, when in e.g. MissionPlanner you will see also the values coming from this message. In the radio you yet will see another value. So, what you see on and OSD (showing data on the fc side) or in e.g MissionPlanner (showing data on ground side) or on the radio (also showing data on ground side but different "units") can all be different.

I always have this enabled so I can get the RSSI on the Tx side in Mission Planner using the rssi field, knowing that the remrssi may not match what I see for rxrssi. Note: for me the rxrssi, rssi and remrssi return the unsigned 8 bit values in the MP HUD.

Do we want to include some general suggestions? To me it sounds like:

olliw42 commented 11 months ago

AP now supports LQ in addition to RSSI, so you can have both LQ and RSSI. I believe this option was only for when LQ wasn't available in AP. Enabling this option today wouldn't provide any benefit.

really, didn't knew that. How would I see LQ e.g. in MissionPlanner, or get it via MAVLink?

Do you know if choosing RSSI_TYPE = 5 will populate rxrssi with the value that it receives for rssi from the RADIO_STATUS message? I did a quick check and when using RSSI_TYPE=5 I don't see rssi or remrssi in Mission Planner but only rxrssi. It seems that the remrssi values the receiver sends in the RADIO_STATUS message would only be available in the FC log.

if i'm not mistaken:

Do we want to include some general suggestions

I'm frankly not sure what of that all I would include. The minimum to include to the current text is IMHO to clearly specify the conditions for which it is as the text describes

jlpoltrack commented 11 months ago

really, didn't knew that. How would I see LQ e.g. in MissionPlanner, or get it via MAVLink?

My mistake here, Rx LQ is only available as an OSD element, so this only applies for folks flying with video.

Have done a rework to stick to the facts and also updated the table for the unsigned 8-bit values that one gets for 'rssi' and 'remrssi' in Mission Planner.

olliw42 commented 11 months ago

I'm not sure about the "RSSI %" percentage it refers to, the rssi is internally stored as float from 0.0 .. 1.0, but then converted in output to 0 .. 255. So, if I'm not mistaken, e.g., rxrssi is also in unit (1 - (dBm - 50)/70) * 255

jlpoltrack commented 11 months ago

I'm not sure about the "RSSI %" percentage it refers to, the rssi is internally stored as float from 0.0 .. 1.0, but then converted in output to 0 .. 255. So, if I'm not mistaken, e.g., rxrssi is also in unit (1 - (dBm - 50)/70) * 255

Attempted to address this with some more explanation.

olliw42 commented 10 months ago

sorry for having abandoned this a bit

and I'm sorry to also have few more comments.

Besides what is delivered to the gcs by mavlink, rssi data is also stored in the data flash log. I think this should also be adressed since it can be an important source of info for teh analysis after the flight. E.g., one may want to create rssi vs distance plots. I have not yet fully disected all possible scenarios. However, in the "default" mLRS setting with CRSF and Rx Snd RadioStat enabled the data from the RADIO_STATUS message are logged (the CRSF data is not logged).

puh ... this rssi thing is really a beast ...

jlpoltrack commented 3 months ago

Stale, so closing. Can revisit if needed.