Skip to content

Commit

Permalink
Merge pull request #3783 from TrainLCD/fix/adjust-accuracy
Browse files Browse the repository at this point in the history
位置情報精度調整
  • Loading branch information
TinyKitten authored Oct 8, 2024
2 parents ad70c23 + 41581c8 commit 747f7d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/hooks/useStartBackgroundLocationUpdates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ export const useStartBackgroundLocationUpdates = () => {
) {
Location.startLocationUpdatesAsync(LOCATION_TASK_NAME, {
// NOTE: BestForNavigationにしたら暴走時のCPU使用率が50%ほど低下した
accuracy: Location.Accuracy.High,
accuracy: Location.Accuracy.Highest,
// NOTE: マップマッチが勝手に行われると電車での経路と大きく異なることがあるはずなので
// OtherNavigationは必須
activityType: Location.ActivityType.OtherNavigation,
distanceInterval: 100,
foregroundService: {
notificationTitle: translate('bgAlertTitle'),
notificationBody: translate('bgAlertContent'),
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useThreshold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const useThreshold = () => {
return ARRIVED_MAX_THRESHOLD
}

const threshold = currentLine.averageDistance / 5
const threshold = currentLine.averageDistance / 4
if (threshold > ARRIVED_MAX_THRESHOLD) {
return ARRIVED_MAX_THRESHOLD
}
Expand Down

0 comments on commit 747f7d6

Please sign in to comment.