Ada Audits the Payload Budget

Ada checks payload size, scale, and send rate before trusting a byte-budget decision

foundations
math-foundations
payload
sensor-pipeline
intermediate
Ada ADA · CALCULATION AUDIT

Ada Audits the Payload Budget

A packet is a physics ledger after it becomes a network object: count size, scale, send rule, and wrapper bytes decide whether the receiver gets evidence or just a smaller mystery.

The chapter’s sample payload contract packs temperature_c as an int16 scaled 0.01 C per count alongside a uint16 humidity_pct, a uint8 status_flags, and a uint32 timestamp_s, then lists send rules like “send every 10 minutes” and “send when temperature changes by at least 0.5 degrees C.” This audit asks the question those field widths and rules invite: how many bytes does that payload actually cost per hour, and how many raw counts does a 0.5-degree-C threshold really represent?

Companion to the chapter Processing Readings Into Packets — every number here comes from that chapter.

1. The sample contract carries 9 payload bytes before any protocol wrapper

The chapter's example uses a 16-bit temperature field, a 16-bit humidity field, an 8-bit status field, and a 32-bit timestamp:

payload_bytes = int16 + uint16 + uint8 + uint32 = 2 + 2 + 1 + 4 = 9 bytes

This is only the application payload. The whole-transaction review still has to add addressing, sequence, acknowledgement, retry, and security behavior from the chosen protocol boundary.

2. The existing 0.01 C/count scale turns a 0.5 C send threshold into 50 counts

The text gives temperature_c: int16, scale 0.01 C per count and a send example of "temperature changes by at least 0.5 degrees C":

threshold_counts = 0.5 C / (0.01 C/count) = 50 counts

That arithmetic is why the payload contract must record units and scale. A receiver that treats the integer as whole degrees would be off by a factor of 100.

3. A 10-minute schedule creates 6 routine sends per hour

The chapter's schedule example is "send every 10 minutes":

sends_per_hour = 60 minutes / 10 minutes = 6
Review item Arithmetic shown Audit result
Payload only, scheduled 9 bytes x 6 sends/hour 54 payload bytes/hour before headers, acknowledgements, retries, and security metadata
One-minute aggregation window 60 minutes / 1 minute 60 windows/hour, if every window becomes a packet
Threshold send rule 0.5 C / 0.01 C per count 50 counts must separate two encoded temperature values before this rule fires

What the audit buys you: payload compression, event suppression, and packet wrappers are different cost levers. Shaving field bytes helps only after the review proves the scale is preserved, the send rule is intentional, and the surrounding transaction does not dominate the cost.

Every number above is taken from this chapter's own worked example and re-derived step by step.