diff --git a/BodySensorApplication-master/src/edu/missouri/bas/service/SensorService.java b/BodySensorApplication-master/src/edu/missouri/bas/service/SensorService.java index b937f9a..d7248ce 100644 --- a/BodySensorApplication-master/src/edu/missouri/bas/service/SensorService.java +++ b/BodySensorApplication-master/src/edu/missouri/bas/service/SensorService.java @@ -977,7 +977,12 @@ else if(action.equals(SensorService.ACTION_SCHEDULE_LOCATION)){ //locationControl.startRecording(); currentUserActivity=intent.getIntExtra("activity",9); Location mCurrentLocation=mLocationClient.getLastLocation(); - writeLocationToFile(mCurrentLocation); + //filter out some bad location fixes + if(mCurrentLocation.hasAccuracy()){ + if(mCurrentLocation.getAccuracy() <= 35){ + writeLocationToFile(mCurrentLocation); + } + } } else if(action.equals(SensorService.ACTION_RESTART_RANDOM_SURVEY)) {