Files
AeroAlign/README.md
T
2026-03-12 06:55:33 +01:00

175 lines
4.2 KiB
Markdown

# SkyLogic AeroAlign
Wireless RC setup platform for two related jobs:
- AeroAlign: digital incidence, reference-angle and differential measurement
- CoG Scale: center-of-gravity measurement using load cells
Both parts are intended to run in the same ESP32 ecosystem and talk to the same Master over ESP-NOW.
## Current State
Implemented now:
- Master firmware with WiFi AP, REST API and existing web UI
- IMU Master and IMU Slave support with robust MPU6050 access
- shared telemetry protocol for multiple device types
- UI support for both IMU nodes and future CoG scale nodes
- battery monitoring with optional hide/disable behavior on unsupported Master hardware
Prepared but not fully implemented yet:
- dedicated HX711-based CoG scale firmware
- model profiles with support spacing, leading-edge offset and target CoG
- scale calibration workflow in the web UI
## Architecture
```
IMU Slave(s) ------\
\
CoG Scale Node(s) ----> Master ESP32 ----> WiFi AP ----> Browser UI
/
Master local IMU --/
```
### Device roles
- `Master`
- hosts `SkyLogic-AeroAlign`
- receives ESP-NOW telemetry
- serves the web UI and REST API
- can also have its own MPU6050
- `IMU Slave`
- remote angle node
- sends pitch, roll and yaw fields as angle telemetry
- `CoG Scale`
- future load-cell node
- will send front weight, rear weight and computed CoG in the same shared packet
## Telemetry Protocol
The shared packet format is defined in [telemetry_protocol.h](firmware/common/telemetry_protocol.h).
Device types currently defined:
- `DEVICE_TYPE_IMU`
- `DEVICE_TYPE_COG_SCALE`
- `DEVICE_TYPE_HYBRID`
For IMU nodes:
- `pitch`, `roll`, `yaw` are angles
For CoG scale nodes:
- `pitch` => front support weight in grams
- `roll` => rear support weight in grams
- `yaw` => CoG position in millimeters
## Hardware Overview
### IMU nodes
Use:
- ESP32-C3 or ESP32-S3
- MPU6050
- LiPo, charger and 3.3V supply
- optional battery divider depending on node
See [sensor_node_wiring.md](hardware/schematics/sensor_node_wiring.md).
### CoG scale
Planned hardware stack:
- ESP32-C3 or ESP32-S3
- two HX711 boards
- two load cells
- rigid support spacing and repeatable fixtures
See [cog_scale_wiring.md](hardware/schematics/cog_scale_wiring.md).
### BOM
The BOM is now maintained as a current component overview instead of placeholder shop links:
- [bom.csv](hardware/schematics/bom.csv)
## Firmware Layout
### Existing
- [firmware/master](firmware/master)
- [firmware/slave](firmware/slave)
- [firmware/common](firmware/common)
### Planned
- `firmware/cog_slave`
- HX711 reading
- tare and scale calibration
- CoG computation
- ESP-NOW transmission as `DEVICE_TYPE_COG_SCALE`
## Build
Master:
```bash
cd firmware/master
pio run
```
Slave:
```bash
cd firmware/slave
pio run -e esp32-s3
pio run -e slave2-s3
```
## Current Configuration Notes
### Slave Master MAC
The Slave now reads the Master MAC from [config.cpp](firmware/slave/src/config.cpp), not `config.h`.
### Master battery monitoring
On ESP32-S3 Master boards the battery ADC path is optional. If the divider is not fitted, the firmware and UI hide the battery value instead of showing dummy data.
## CoG Math
With front and rear supports spaced by `L`:
`x_cog_from_front_support = rear_weight / (front_weight + rear_weight) * L`
If the front support is offset from the wing leading edge:
`x_cog_from_leading_edge = support_offset_from_leading_edge + x_cog_from_front_support`
The current design note is in [AEROALIGN_COG_INTEGRATION.md](docs/AEROALIGN_COG_INTEGRATION.md).
## Workflow Plan
The planned operating workflow and the recommended hardware roles are documented in:
- [WORKFLOW_AND_SYSTEM_PLAN.md](docs/WORKFLOW_AND_SYSTEM_PLAN.md)
- [AIRCRAFT_PROFILE_MODEL.md](docs/AIRCRAFT_PROFILE_MODEL.md)
## 3D Printed Parts
The CAD readme now covers both IMU parts and planned CoG fixtures:
- [hardware/cad/README.md](hardware/cad/README.md)
## Recommended Next Work
1. Add `firmware/cog_slave` with HX711 support.
2. Add tare and calibration endpoints in the Master API.
3. Add a dedicated CoG tab in the web UI.
4. Add aircraft profiles in NVS.
5. Finalize mechanical design for the two support fixtures.