Spreadsheet for LoRa airtime calculation

Very nice sheet, incredibly helpful!

I am still not quite sure how to calculate the header and payload sizes though. I am using a Waspmote to send frames containing sensor data. The frame is converted into a hexadecimal array—which is the required format by the LoRaWAN.sendUnconfirmed(...) function—by using the following util function:

char sendableString[frame.length*2 + 1];
Utils.hex2str(frame.buffer, sendableString, frame.length);

Here’s some output from a transmission:

Frame Length: 105
Frame (STR): <=>€#012345678#0123456789#0#BAT:42#IN_TEMP:17.00#GP_TC:-26.774#GP_HUM:25.70#GP_CO:25.918#GP_CO2:304.826#
Sendable string: 3c3d3e3f062330313233343536373823303132333435363738392330234241543a343223494e5f54454d503a31372e30302347505f54433a2d32362e3737342347505f48554d3a32352e37302347505f434f3a32352e3931382347505f434f323a3330342e38323623
strlen(sendableString): 210
sizeof(sendableString): 211
ADR: 1
DataRate: 5 (= SF7BW125)
Radio frequency: 869525000
Radio spreading factor: sf12
Radio bandwidth: 125
Radio coding rate: 4/5
Radio preamble length: 8

The corresponding TheThingsNetwork data field is:

PD0+gAYjNDAzMzE1ODQwI1dNMDIwMzIyMjIjMCNCQVQ6NDIjSU5fVEVNUDoxNy4wMCNHUF9UQzotMjYuNzc0I0dQX0hVTToyNS43MCNHUF9DTzoyNS45MTgjR1BfQ08yOjMwNC44MjYj

htdvisser’s ttntool calculated the air time to be 174.3ms, which working backwards in the spreadsheet suggests a payload of 87-90 bytes (if the header is 13 bytes).

So my question is simply: how do I know my payload and header sizes without working backwards based on air time calculated?