Raspberry PI and 915 MHz radio to send status of a Servo with MavLink Data

I have a Pixhawk 2 connected to a Raspberry PI 3 via usb connection. I want to send the status of a servo with the altitude from the Pixhawk 2 to a laptop on the ground via radio communication. This servo isn’t connected to the Pixhawk 2.The servo is connected to a separate receiver and controlled by a separate transmitter as well. So far I’ve gotten the Raspberry Pi to receive Mavlink messages from the Pixhawk 2. However, I want the Raspberry Pi to send the altitude down to my laptop only when this separate servo is signaled to move. As of now, I’ve got the Pixhawk 2 connected to MissionPlanner on my laptop via a 915MHz radio connection. I would like to know if it’s possible to send Non-Mavlink messages over this 915MHz radio connection with or without MissionPlanner. Basically, I need to send information from the Raspberry Pi to my laptop, and this information needs to include the altitude of my Pixhawk 2 as well.

Any suggestions or ideas would help!


There are mavlink messages with altitude information already.
Your mission planner surely displays altitude information, and it gets it via mavlink messages.
Now to get the information from that external servo… that will be a bit trickier, you need to let pixhawk read it. One solution would be to use a PPM encoder:

|Flight receiver| --- Ch1 ------> | PPM encoder | --- PPM sum ---> | Pixhawk | --- serial 1 ----> 915Mhz radio 
|               | --- Ch2 ------> |             |
|               | --- Ch3 ------> |             |
|               | --- Ch4 ------> |             |
|               | --- Ch5 ------> |             |
|               | --- Ch6 ------> |             |
|               | --- Ch7 ------> |             |
|               | --- Ch8 ------> |             |
                                  |             |
|  ext. servo   | --- Ch9 ------> |             |

This allows pixhawk to read the external servo position via rc in ch 9 and it sends that information via RC INPUT STATUS mavlink message back to the ground station. You can take a look at the values (inclusive altitude) in the mission planner status tab.

If you also use Mavproxy and dronekit-python then you can write PC software to do stuff based on the values of those mavlink messages. No rapberry pi programming is involved.

Thank you @amilcarlucas , but I recently figured out how to control Pixhawk from MissionPlanner using a Python script.