agittins / agittins/bermuda

Implement inter-proxy measurements

未关闭
#260 11 条评论 0 个 reaction 已指派 1 人 已被 @agittins 认领 在 GitHub 查看
enhancement
主要语言
Python
星标
2k
派生
70
PR 合并指标
30 天内没有已合并 PR

描述

Inter-proxy measurements are a pre-requisite for trilateration.

There are two methods we will use to make these measurements:

## Triangle Inequality
- Esphome (until (*checks watch*) NOW) can't be a beacon and a proxy at the same time. This is now fixed, but I still want to support the case.
- If you have two sides of a triangle, you can *know* that the third side is **no more than** the sum of the two known sides.
- This means we can trawl through each pair of proxies, and successively approximate their distance apart by taking the sums of their measurement to each known device. This should be fairly quick to do, basically:
```pseudocode
foreach proxy1 in proxies:
foreach proxy2 in proxies:
foreach device in devices:
estimate = proxy1_to_device + proxy2_to_device
if estimate < proxy1.estimate_to_proxy2:
proxy1.estimate_to_proxy2 = estimate
```
(obviously this is not real code and lacks serious optimisation)

## Direct rssi measurement
- esphome as of the last few days (as at July 24) can now act as a beacon at the same time as being a proxy. This is something that the Shelly devices have always done, it seems.
- This simplifies the inter-proxy measurement, as we can apply it directly.
- I think we still need to track it as... let's call it an "ephemeral minima".
- Still undecided if a triangle inequality measurement should be able to trump a direct, so we should collect each estimate in its own field (so we have diagnostic visibility) and apply one as the current "blessed" value.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。