feat: Estimate contact location from RSSI + last-hop repeater

For contacts without GPS, estimate their position by:
1. Finding the first-hop repeater from their routing path
2. Estimating distance from RSSI using log-distance path loss model
3. Placing them at a deterministic offset from the repeater

Uses LoRa outdoor path loss exponent (n=3.0) with reference RSSI
-30dBm at 1m. Distance clamped to 10m-50km range. Bearing derived
from contact public key hash for stable positioning.
This commit is contained in:
Janez T
2026-03-17 11:08:56 +01:00
parent c01ef7a059
commit d29b85feb8
5 changed files with 161 additions and 3 deletions

View File

@@ -41,10 +41,12 @@ class MapMarkerService {
Function(Contact)? onTap,
double mapRotation = 0,
Position? userPosition,
Map<String, LatLng>? estimatedLocations,
}) {
return contacts
.map((contact) {
final location = contact.displayLocation;
final location = contact.displayLocation ??
estimatedLocations?[contact.publicKeyHex];
if (location == null) return null;
return Marker(