ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
Loading...
Searching...
No Matches
csi_types.h
Go to the documentation of this file.
1/*
2 * ESPectre - CSI Public Types
3 *
4 * Stable HT20 dimensions and detector subcarrier selection shared by the
5 * core-only and full-runtime SDK surfaces.
6 *
7 * Author: Francesco Pace <francesco.pace@gmail.com>
8 * SPDX-License-Identifier: GPL-3.0-only
9 * Commercial licensing available under separate agreement; see LICENSING.md.
10 */
11#pragma once
12
13#include <array>
14#include <cstdint>
15
16namespace espectre {
17
18constexpr uint16_t HT20_NUM_SUBCARRIERS = 64U;
19constexpr uint16_t HT20_CSI_LEN = 128U;
20constexpr uint16_t HT20_CSI_LEN_DOUBLE = 256U;
21constexpr uint16_t HT20_CSI_LEN_SHORT = 114U;
22constexpr uint16_t HT20_CSI_LEN_SHORT_DOUBLE = 228U;
23constexpr uint8_t HT20_CSI_LEN_SHORT_LEFT_PAD = 8U;
24constexpr uint8_t HT20_GUARD_BAND_LOW = 4U;
25constexpr uint8_t HT20_GUARD_BAND_HIGH = 60U;
26constexpr uint8_t HT20_DC_SUBCARRIER = 32U;
27constexpr uint8_t HT20_SELECTED_BAND_SIZE = 12U;
28
30 4U, 8U, 13U, 18U, 23U, 28U, 36U, 41U, 46U, 51U, 56U, 60U,
31};
32using SelectedSubcarriers = std::array<uint8_t, HT20_SELECTED_BAND_SIZE>;
33
35 SelectedSubcarriers subcarriers{};
36 for (uint8_t i = 0U; i < HT20_SELECTED_BAND_SIZE; ++i) {
37 subcarriers[i] = DEFAULT_SUBCARRIERS[i];
38 }
39 return subcarriers;
40}
41
42} // namespace espectre
constexpr SelectedSubcarriers make_default_subcarriers()
Definition csi_types.h:34
constexpr uint16_t HT20_NUM_SUBCARRIERS
Definition csi_types.h:18
std::array< uint8_t, HT20_SELECTED_BAND_SIZE > SelectedSubcarriers
Definition csi_types.h:32
constexpr uint16_t HT20_CSI_LEN_SHORT_DOUBLE
Definition csi_types.h:22
constexpr uint8_t HT20_CSI_LEN_SHORT_LEFT_PAD
Definition csi_types.h:23
constexpr uint8_t HT20_SELECTED_BAND_SIZE
Definition csi_types.h:27
constexpr uint16_t HT20_CSI_LEN_SHORT
Definition csi_types.h:21
constexpr uint8_t HT20_GUARD_BAND_HIGH
Definition csi_types.h:25
constexpr uint8_t DEFAULT_SUBCARRIERS[HT20_SELECTED_BAND_SIZE]
Definition csi_types.h:29
constexpr uint16_t HT20_CSI_LEN_DOUBLE
Definition csi_types.h:20
constexpr uint8_t HT20_GUARD_BAND_LOW
Definition csi_types.h:24
constexpr uint16_t HT20_CSI_LEN
Definition csi_types.h:19
constexpr uint8_t HT20_DC_SUBCARRIER
Definition csi_types.h:26