Browse Source

Changed Driving to Moving

pull/5/head
shengaog 7 years ago
parent
commit
1be8136ba8
  1. 2
      GNSSLogger/GNSSLogger.iml
  2. 16
      GNSSLogger/app/app.iml
  3. 6
      GNSSLogger/app/src/main/java/com/google/android/apps/location/gps/gnsslogger/MainActivity.java
  4. 10
      GNSSLogger/app/src/main/java/com/google/android/apps/location/gps/gnsslogger/RealTimePositionVelocityCalculator.java
  5. 2
      GNSSLogger/app/src/main/java/com/google/android/apps/location/gps/gnsslogger/SettingsFragment.java
  6. 2
      GNSSLogger/app/src/main/res/values/strings.xml

2
GNSSLogger/GNSSLogger.iml

@ -13,7 +13,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

16
GNSSLogger/app/app.iml

@ -76,29 +76,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/split-apk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />

6
GNSSLogger/app/src/main/java/com/google/android/apps/location/gps/gnsslogger/MainActivity.java

@ -354,7 +354,9 @@ public class MainActivity extends AppCompatActivity
/**
* Sets up the ground truth mode of {@link RealTimePositionVelocityCalculator} given an result
* from Activity Recognition update.
* from Activity Recognition update. For activities other than {@link DetectedActivity#STILL}
* and {@link DetectedActivity#TILTING}, we conservatively assume the user is moving and use the
* last WLS position solution as ground truth for corrected residual computation.
*/
private void setGroundTruthModeOnResult(ActivityRecognitionResult result){
if (result != null){
@ -365,7 +367,7 @@ public class MainActivity extends AppCompatActivity
RealTimePositionVelocityCalculator.RESIDUAL_MODE_STILL, null);
} else {
mRealTimePositionVelocityCalculator.setResidualPlotMode(
RealTimePositionVelocityCalculator.RESIDUAL_MODE_DRIVING, null);
RealTimePositionVelocityCalculator.RESIDUAL_MODE_MOVING, null);
}
}
}

10
GNSSLogger/app/src/main/java/com/google/android/apps/location/gps/gnsslogger/RealTimePositionVelocityCalculator.java

@ -47,8 +47,8 @@ public class RealTimePositionVelocityCalculator implements GnssListener {
/** Residual analysis where the user is not moving */
public static final int RESIDUAL_MODE_STILL = 0;
/** Residual analysis where the user is moving fast (like driving). */
public static final int RESIDUAL_MODE_DRIVING = 1;
/** Residual analysis where the user is moving */
public static final int RESIDUAL_MODE_MOVING = 1;
/**
* Residual analysis where the user chose to enter a LLA input as their position
@ -467,7 +467,7 @@ public class RealTimePositionVelocityCalculator implements GnssListener {
(mGroundTruth[2] * mPositionSolutionCount + posSolution[2])
/ (mPositionSolutionCount + 1);
mPositionSolutionCount++;
} else if (mResidualPlotStatus == RESIDUAL_MODE_DRIVING) {
} else if (mResidualPlotStatus == RESIDUAL_MODE_MOVING) {
// If the user is moving fast, we use single WLS position solution
mGroundTruth[0] = posSolution[0];
mGroundTruth[1] = posSolution[1];
@ -508,10 +508,10 @@ public class RealTimePositionVelocityCalculator implements GnssListener {
return;
}
switch (mResidualPlotStatus) {
case RESIDUAL_MODE_DRIVING:
case RESIDUAL_MODE_MOVING:
mPseudorangePositionVelocityFromRealTimeEvents
.setCorrectedResidualComputationTruthLocationLla(mGroundTruth);
logEvent("Residual Plot", "Mode is set to driving", mCurrentColor);
logEvent("Residual Plot", "Mode is set to moving", mCurrentColor);
break;
case RESIDUAL_MODE_STILL:

2
GNSSLogger/app/src/main/java/com/google/android/apps/location/gps/gnsslogger/SettingsFragment.java

@ -312,7 +312,7 @@ public class SettingsFragment extends Fragment {
// If user select auto, we need to put moving first and turn on AR updates
if (mResidualSetting == AUTO_GROUND_TRUTH_MODE) {
mResidualSetting
= RealTimePositionVelocityCalculator.RESIDUAL_MODE_DRIVING;
= RealTimePositionVelocityCalculator.RESIDUAL_MODE_MOVING;
mModeSwitcher.setAutoSwitchGroundTruthModeEnabled(true);
}
popupWindow.dismiss();

2
GNSSLogger/app/src/main/res/values/strings.xml

@ -71,7 +71,7 @@
</string-array>
<string-array name="residual_options">
<item>Manual - Still</item>
<item>Manual - Driving</item>
<item>Manual - Moving</item>
<item>Manual - Use LLA input</item>
<item>Automatic - AR Based</item>
</string-array>

Loading…
Cancel
Save