Explorer/RaspberryPi/Autopilot
Jump to navigation
Jump to search
The RaspberryPi Zero is connected to the Apogee autopilot board using an UART.
The bi-directional telemetry is send to the GCS using the wifi
- On the RaspberryPi:
sudo apt-get install socat
socat -u udp-listen:4243,reuseaddr,fork /dev/ttyAMA0,raw,echo=0,b115200 & socat -u /dev/ttyAMA0,raw,echo=0,b115200 udp-sendto:GCS_IP:4242 &
- On the GCS:
airframe file:
<module name="telemetry" type="transparent"> <configure name="MODEM_PORT" value="UART1"/> <configure name="MODEM_BAUD" value="B115200"/> </module>
telemetry file:
<?xml version="1.0"?>
<!DOCTYPE telemetry SYSTEM "../telemetry.dtd">
<telemetry>
<process name="Main">
<mode name="default" key_press="d">
<message name="AUTOPILOT_VERSION" period="11.1"/>
<message name="DL_VALUE" period="1.1"/>
<message name="ROTORCRAFT_STATUS" period="1.2"/>
<message name="ROTORCRAFT_FP" period="0.25"/>
<message name="ALIVE" period="2.1"/>
<message name="INS_REF" period="5.1"/>
<message name="ROTORCRAFT_NAV_STATUS" period="1.6"/>
<message name="WP_MOVED" period="1.3"/>
<message name="GPS_INT" period=".25"/>
<message name="INS" period=".25"/>
<message name="ENERGY" period="2.5"/>
<message name="DATALINK_REPORT" period="5.1"/>
<message name="STATE_FILTER_STATUS" period="3.2"/>
<message name="AIR_DATA" period="1.3"/>
</mode>
</process>
<process name="FlightRecorder">
<mode name="default">
<message name="ATTITUDE" period="0.05"/>
<message name="GPS" period="0.5"/>
<message name="PPRZ_MODE" period="0.1"/>
<message name="DESIRED" period="0.1"/>
<message name="COMMANDS" period="0.10"/>
<message name="ACTUATORS" period="0.10"/>
<message name="IMU_GYRO" period="0.01"/>
<message name="IMU_MAG" period="0.01"/>
<message name="IMU_ACCEL" period="0.01"/>
</mode>
</process>
<process name="Extra">
<mode name="default">
<message name="AUTOPILOT_VERSION" period="11.1"/>
<message name="DL_VALUE" period="1.1"/>
<message name="ROTORCRAFT_STATUS" period="1.2"/>
<message name="ROTORCRAFT_FP" period="0.25"/>
<message name="ALIVE" period="2.1"/>
<message name="INS_REF" period="5.1"/>
<message name="ROTORCRAFT_NAV_STATUS" period="1.6"/>
<message name="WP_MOVED" period="1.3"/>
<message name="GPS_INT" period=".25"/>
<message name="INS" period=".25"/>
<message name="ENERGY" period="2.5"/>
<message name="DATALINK_REPORT" period="5.1"/>
<message name="STATE_FILTER_STATUS" period="3.2"/>
<message name="AIR_DATA" period="1.3"/>
</mode>
<mode name="empty">
</mode>
<mode name="mcu">
<message name="ATTITUDE" period="0.05"/>
<message name="GPS" period="0.5"/>
<message name="PPRZ_MODE" period="0.1"/>
<message name="DESIRED" period="0.1"/>
<message name="COMMANDS" period="0.10"/>
<message name="ACTUATORS" period="0.10"/>
<message name="IMU_GYRO" period="0.01"/>
<message name="IMU_MAG" period="0.01"/>
<message name="IMU_ACCEL" period="0.01"/>
</mode>
</process>
</telemetry>
paparazzi/sw/ground_segment/tmtc/server paparazzi/sw/ground_segment/cockpit/gcs paparazzi/sw/ground_segment/tmtc/link -udp
To confirm bidirectional connection, change a setting and check the updated value in the GCS