ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
Loading...
Searching...
No Matches
espectre::L1DeltaWindow Struct Reference

One sliding window of displacements over a caller-owned ring. More...

#include <l1_delta_tracker.h>

Public Member Functions

void push (float value, uint16_t capacity)
float mean () const
void clear (uint16_t capacity)

Public Attributes

float * ring {nullptr}
uint16_t index {0U}
uint16_t slots {0U}
uint16_t count {0U}
float sum {0.0f}

Detailed Description

One sliding window of displacements over a caller-owned ring.

The tracker keeps two of these, one per lag, and they share a single allocation, so the pair costs no extra bookkeeping and no second heap block.

Definition at line 33 of file l1_delta_tracker.h.

Member Function Documentation

◆ push()

void espectre::L1DeltaWindow::push ( float value,
uint16_t capacity )
inline

Definition at line 40 of file l1_delta_tracker.h.

◆ mean()

float espectre::L1DeltaWindow::mean ( ) const
inline

Definition at line 60 of file l1_delta_tracker.h.

◆ clear()

void espectre::L1DeltaWindow::clear ( uint16_t capacity)
inline

Definition at line 62 of file l1_delta_tracker.h.

Member Data Documentation

◆ ring

float* espectre::L1DeltaWindow::ring {nullptr}

Definition at line 34 of file l1_delta_tracker.h.

◆ index

uint16_t espectre::L1DeltaWindow::index {0U}

Definition at line 35 of file l1_delta_tracker.h.

◆ slots

uint16_t espectre::L1DeltaWindow::slots {0U}

Definition at line 36 of file l1_delta_tracker.h.

◆ count

uint16_t espectre::L1DeltaWindow::count {0U}

Definition at line 37 of file l1_delta_tracker.h.

◆ sum

float espectre::L1DeltaWindow::sum {0.0f}

Definition at line 38 of file l1_delta_tracker.h.


The documentation for this struct was generated from the following file: