mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Clean up sats in view estimates
This commit is contained in:
parent
e095e053a5
commit
850fda3b2e
2 changed files with 11 additions and 5 deletions
|
|
@ -54,12 +54,19 @@ class LocationHelper: NSObject, ObservableObject {
|
|||
|
||||
static var satsInView: Int {
|
||||
|
||||
var sats = 0
|
||||
// If we have a position we have a sat
|
||||
var sats = 1
|
||||
|
||||
if shared.locationManager.location?.verticalAccuracy ?? 0 > 0 {
|
||||
sats = 4
|
||||
|
||||
if 0...60 ~= shared.locationManager.location?.horizontalAccuracy ?? 0{
|
||||
if 0...15 ~= shared.locationManager.location?.horizontalAccuracy ?? 0{
|
||||
sats = 12
|
||||
} else if 16...30 ~= shared.locationManager.location?.horizontalAccuracy ?? 0{
|
||||
sats = 10
|
||||
} else if 31...45 ~= shared.locationManager.location?.horizontalAccuracy ?? 0{
|
||||
sats = 8
|
||||
} else if 46...60 ~= shared.locationManager.location?.horizontalAccuracy ?? 0{
|
||||
sats = 6
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -125,11 +125,10 @@ struct PositionLog: View {
|
|||
|
||||
if clearPositions(destNum: node.num, context: context) {
|
||||
|
||||
print("Clear Position Log Failed")
|
||||
print("Successfully Cleared Position Log")
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
print("Clear Position Log Failed")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue