UAT 363 Unmanned Aircraft Systems Technology for Transportation and Smart Warehousing
Worksheet 4 Sending scan results into a system
Objective
Send scans over MQTT into a WMS stand-in table, remove duplicates, validate check digits and reconcile with records before staff confirmation
Equipment and materials
- Mosquitto broker on the lab network
- Python with paho-mqtt
- Scan results from worksheet 3
- Module 4 example code
Safety
- Desk work only; no flying
- Use the isolated lab network; do not connect to any real hospital system
Steps
- Install Mosquitto; publish scans with paho-mqtt in the Example 1 format
- Write a subscriber that stores to a table and removes duplicates by msg_id
- Send with QoS 0 and 1 while cutting the network briefly; count lost and duplicate messages
- Reconcile scans with records and compute record accuracy
- Validate every code's check digit with Example 2; count rejections
- Write the staff confirmation procedure before records are adjusted
Record of results
| QoS | Messages sent | Messages received | Lost | Duplicates | Left after removing duplicates by msg_id |
|---|---|---|---|---|---|
| Outcome | Number of locations | Location codes | Possible causes | Confirmed by and result |
|---|---|---|---|---|
| Code read | Computed check digit | Last digit of the code | Accepted or rejected | Action |
|---|---|---|---|---|
Questions
From Table 1, why should scan results be sent with QoS 1 and a msg_id, while frequent drone position updates may use QoS 0?
If duplicates were not removed, how would Table 2 go wrong? Give an example from your group's data.
What are the possible causes of a "not found" location, and what should staff check before adjusting the records?
Why does the check digit catch a code with one misread digit, and what should the system do with a rejected code?
Write your group's staff confirmation procedure as ordered steps, and explain why the system should not adjust records automatically.
Check before you hand in
What to hand in
- Publisher and subscriber code
- QoS 0 versus 1 results
- Record accuracy
- Rejected-code count
- Confirmation procedure