pamoja-lora
LoRa link math for pamoja: exact time-on-air and duty-cycle off-time, so a long-range node stays within regulations and budgets its power, no_std and allocation-free.
The same capability in every language
| Language | Package | Reference |
|---|---|---|
| Rust | pamoja-lora |
reference, docs.rs, install |
| TypeScript | @pamoja/lora |
reference, install |
| Python | pamoja-lora |
reference, install |
| C# | Pamoja.Lora |
reference, install |
LoRa link math for the pamoja SDK.
LoRa is the SDK's answer to reach: kilometres of range on license-free bands at tiny power. That reach comes with a hard constraint, though. A LoRa transmission occupies the channel for a duration fixed by the radio settings, and the regional regulations a deployment lives under cap how much of the time a node may transmit, typically around one percent. A node that ignores this is both illegal and, since transmitting is the most expensive thing it does, wasteful of its battery.
This crate provides the arithmetic that keeps a long-range node honest, with no radio and no floating point:
LinkSettings- the spreading factor, bandwidth, coding rate, and frame options of a link, withairtime_usfor a payload's exact time on air andmin_off_time_usfor the silence a duty-cycle limit then forces.
The time-on-air calculation is the published LoRa formula, evaluated with exact
integer arithmetic, so the same numbers a deployment planner uses are available on
the node itself. It pairs naturally with the metered-link batch encoding in
pamoja-codec - pack a batch, then ask what it costs to send - and with the
duty-cycling in pamoja-power.
This is the link-budget half of LoRa support; driving the radio arrives with the hardware-I/O layer.
Examples
use LinkSettings;
let link = new; // SF12, 125 kHz: maximum range
let airtime = link.airtime_us; // time on air of a 20-byte payload
// At a 1% duty cycle, the node must then stay quiet for ninety-nine times as long.
assert_eq!;
License
MIT - part of the pamoja workspace: one memory-safe Rust core with bindings for every language.