Requirements
Comm Subsystem Requirement | Competition Requirement | Priority |
---|---|---|
Send the results of a QR Scan to the ground. | Task 2: Send coordinates after QR Scan | HIGH |
Schema
Jetson → Ground (JOGI)
// Format schema here as JSON { info: string, // Encompasses the second line of the QR scan result date: string, time: string, device_id: string, sensor_id: string }
Encoding
Encode the schema as a MAVLink message with the fields described above. We will define a Mavlink dialect and then load it and use the pack method for encoding and decode method for decoding as shown in this example. Therefore, we’ll encode into a fifo buffer and then send the data from the buffer to the XBee interface. We’ll use the decode method and other logic as a callback to the XBee interface.
Implementation - Computer Vision
GOJI:
All functionality for GOJI will be contained in the GroundRecieve module. We’ll define a function called recieveGround in the module that uses the decode method of the mavlink dialect then constructs a response object which gets put into a RxPy Subject. The worker will subscribe to the subject and push its latest value to the output pipeline.
GIJO
All functionality relating to GIJO will be contained in the GroundSend module. We’ll use the fifo buffer, pack and decode methods from the mavtest.py example to encode the message in the sendGround function. The worker will get messages in the request format as defined here as a “QR_INFO” message type. The GroundSendWorker will take from the pipeline in then use the sendGround method to get an encoded buffer which is then sent to the XBee interface to write.