Android Open Source - yousense-android-tracker Sensor Config






From Project

Back to project page yousense-android-tracker.

License

The source code is released under:

Energy-efficent motion and location tracker for Android. Based on Mattias's power and tracking work. I plan to release it as GPL, once I have a paper published that goes with it. Might also release i...

If you think the Android project yousense-android-tracker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.linnap.locationtracker;
//from www  .j  av  a 2 s. c  om
import android.hardware.SensorManager;

public class SensorConfig {

  public static final String TAG = "locationtracker";
  
  // Duty-Cycled Accelerometer
  
  public static int ACCELEROMETER_RATE = SensorManager.SENSOR_DELAY_FASTEST;  
  public static long ACCELEROMETER_ACTIVE_MILLIS = 1000;
  public static long ACCELEROMETER_SLEEP_MILLIS = 9000;
  public static int ACCELEROMETER_ACCUMULATOR_SIZE = 50;  // Adjust to hold a bit more than all sensor events within active_millis.
  public static double ACCELEROMETER_MAGNITUDE_VARIANCE_FOR_MOVEMENT = 0.1f;  // Minimum variance of accel magnitude within active_millis that means movement.
  
  // WiFi Place Change Detector
  
  public static long WIFI_SCAN_TIMEOUT_MILLIS = 5000;
  public static int WIFI_MIN_STRONG_RSSI = -70;
  public static double WIFI_SCAN_MAX_TANIMOTO_SIMILARITY_FOR_SAME_PLACE = 0.4;
  
  // Movement Detector
  
  public static boolean MOVEMENT_USES_WIFI = true;
  public static double MOVEMENT_MIN_ACCEL_MOVEMENT_PERIODS = 3;

  // Distance-Cycled GPS
  
  public static long GPS_HIGHSPEED_DELAY_MILLIS = 1000;
  public static long GPS_LOWSPEED_DELAY_MILLIS = 16000;
  
  public static int GPS_HISTORY_SIZE = 15;
  public static int GPS_HIGHTOLOW_SPEEDS_CONSIDERED = 15; // 120 fixes at 1Hz, or >2 minutes.
  public static int GPS_LOWTOOFF_DISTANCES_CONSIDERED = 15; // 15 fixes at 1/16Hz, or >4 minutes.
  
  public static float GPS_SWITCH_SPEED_THRESHOLD = 3.0f; // m/s. Switch to other speed if above/below this.
  public static float GPS_STATIONARY_DISTANCE_THRESHOLD = 20.0f; // m. Switch GPS off if within this distance.
  
  public static long GPS_GIVEUP_AFTER_NO_FIX_FOR_MILLIS = 60000;  // Switch GPS off if no fixes within this time.
  public static long GPS_GIVEUP_CHECK_DELAY = 5000;
  
  public static float GPS_MAX_VALID_SPEED = 100.0f; // Speed readings above this are considered invalid.
  
}




Java Source Code List

com.linnap.locationtracker.EventBindings.java
com.linnap.locationtracker.ExpectedState.java
com.linnap.locationtracker.LocationTrackerService.java
com.linnap.locationtracker.SensorConfig.java
com.linnap.locationtracker.Sets.java
com.linnap.locationtracker.StateChange.java
com.linnap.locationtracker.gps.DistanceCycledGps.java
com.linnap.locationtracker.gps.GpsHistory.java
com.linnap.locationtracker.gps.LocationFix.java
com.linnap.locationtracker.movement.AccelerometerData.java
com.linnap.locationtracker.movement.BooleanState.java
com.linnap.locationtracker.movement.DutyCycledAccelerometer.java
com.linnap.locationtracker.movement.SmallMovement.java
com.linnap.locationtracker.movement.StatsAccumulator.java
com.linnap.locationtracker.schedule.SensorScheduler.java
com.linnap.locationtracker.wifi.ScanResultsData.java
com.linnap.locationtracker.wifi.ScanStartedData.java
com.linnap.locationtracker.wifi.TimeoutScan.java
com.linnap.locationtracker.wifi.WifiFingerprint.java
com.linnap.locationtracker.wifi.WifiPlaceChange.java