My receiver outputs received signal strength and I have connected this to the A0 pin on the APM. I have set the RSSI_PIN paramenter appropriately and can display the RSSI correctly in the MP while the quad is attached to my PC. Is there any way I can log this parameter during a flight? While I do have the RSSI available on my transmitter via telemetry, it would be nice to now exactly how the RSSI varies with regard to the distance and orientation of my quad so I can optimise my antenna and also keep it in range while sending it on missions (just in case...)

Views: 850

Reply to This

Replies to This Discussion

Great question!  Have you found a solution yet James?

Hi Bruce, unfortunately I found no provision for this in the existing code so I had to 'roll my own' solution. If you are comfortable compiling the code from scratch then I would be happy to share what I have done - it is relatively straight forward

Cool.  I can handle the code if you'd be so gracious!

I have implemented this a number of different ways while playing around but the simplest way that does not compromise any existing functionality is:

Add to defines.h: 

#define DATA_RSSI                       30

Uncomment (remove the preceding slashes from) the following line in APM_Config.h:

#define USERHOOK_SLOWLOOP userhook_SlowLoop();            // for code to be run at 3.3hz

Add to the function userhook_SlowLoop() in UserCode.ino after 

    // put your 3.3Hz code here

     Log_Write_Data(DATA_RSSI ,receiver_rssi);

Compile and upload...

A D16 entry will appear in your log file every 0.3 seconds with the ID number 30 followed by the RSSI

You can obviously choose to have the entry appear more or less frequently by choosing the appropriate userhook loop. 

Reply to Discussion

RSS

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service