mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user