Use 9 meters instead of 15 for position log

This commit is contained in:
Garth Vander Houwen 2025-06-27 16:03:02 -07:00
parent c014baf986
commit b47a259337
2 changed files with 2 additions and 2 deletions

View file

@ -467,7 +467,7 @@ func upsertPositionPacket (packet: MeshPacket, context: NSManagedObjectContext)
}
/// Don't save nearly the same position over and over. If the next position is less than 10 meters from the new position, delete the previous position and save the new one.
if mutablePositions.count > 0 && (position.precisionBits == 32 || position.precisionBits == 0) {
if let mostRecent = mutablePositions.lastObject as? PositionEntity, mostRecent.coordinate.distance(from: position.coordinate) < 15.0 {
if let mostRecent = mutablePositions.lastObject as? PositionEntity, mostRecent.coordinate.distance(from: position.coordinate) < 9.0 {
mutablePositions.remove(mostRecent)
}
} else if mutablePositions.count > 0 {

@ -1 +1 @@
Subproject commit 816595c8bbdfc3b4388e11348ccd043294d58705
Subproject commit 27fac39141d99fe727a0a1824c5397409b1aea75