Skip to content

period & frequency calculation is incorrect if packets are missed - defect #21

@DG12

Description

@DG12

The period calculation in index.js/calcFrequency does not account for missing packets.

A ruuvi at distance or in a radio isolation area (like a refrigerator ) may miss packets.

Worst case is receiving 1 packet, missing many, then receiving 2 consequential packets causes the calculation to be the average.
A better algorithm would be min( last calculation , this calculation ) but that's not really good either.
Calculating the frequency requires the time of 2 consequential packets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions