agittins / agittins/bermuda

Implement inter-proxy measurements

Đang mở
#260 11 bình luận 0 reaction 1 người được giao Được @agittins nhận Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
2k
Fork
70
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.