lorawan: github.com/brocaar/lorawan/airtime Index | Files

package airtime

import "github.com/brocaar/lorawan/airtime"

Package airtime provides a function for calculating the time on air. This implements the formula as defined by: https://www.semtech.com/uploads/documents/LoraDesignGuide_STD.pdf.


Package Files


func CalculateLoRaAirtime Uses

func CalculateLoRaAirtime(payloadSize, sf, bandwidth, preambleNumber int, codingRate CodingRate, headerEnabled, lowDataRateOptimization bool) (time.Duration, error)

CalculateLoRaAirtime calculates the airtime for a LoRa modulated frame.

func CalculateLoRaPayloadSymbolNumber Uses

func CalculateLoRaPayloadSymbolNumber(payloadSize, sf int, codingRate CodingRate, headerEnabled, lowDataRateOptimization bool) (int, error)

CalculateLoRaPayloadSymbolNumber returns the number of symbols that make up the packet payload and header.

func CalculateLoRaPreambleDuration Uses

func CalculateLoRaPreambleDuration(symbolDuration time.Duration, preambleNumber int) time.Duration

CalculateLoRaPreambleDuration calculates the LoRa preamble duration.

func CalculateLoRaSymbolDuration Uses

func CalculateLoRaSymbolDuration(sf int, bandwidth int) time.Duration

CalculateLoRaSymbolDuration calculates the LoRa symbol duration.

type CodingRate Uses

type CodingRate int

CodingRate defines the coding-rate type.

const (
    CodingRate45 CodingRate = 1
    CodingRate46 CodingRate = 2
    CodingRate47 CodingRate = 3
    CodingRate48 CodingRate = 4

Available coding-rates.

Package airtime imports 3 packages (graph). Updated 2018-02-22. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).