Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejson
// Format schema here as JSON
{
  info: stringchar array, 100 characters, 8 bits * 100 = 800 bits = 100bytes, // Encompasses the second line of the QR scan result
  date: MMDDYY, 6 string,
  time: stringcharacters, 8 bits * 6 chars = 48 bits = 6 bytes,
  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.

...

time: HHMM, 4 chars, 32 bits = 4 bytes
}

Encoding - This will go into the frame message section of the zigbee

Frame protocol: Comms

Message Size: 110 bytes* (Note that this does NOT mean the message length in the frame will be 110, it will be 110 + everything before the message)

Code Block
languagenone
info (bytes 0-99) | date (bytes 100-105) | time (bytes 106-109)

*The use of bytes here is intentional, we mean bytes not bits

Implementation - Computer Vision (OUTDATED, NEW ONE SOON)

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.

...