|
|
|
@ -264,9 +264,9 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
ToastUtils.showShort(getString(R.string.disconnect_device_use_input_point)); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
String inputSurveyX = currentCoordinate != null ? Util.formatDouble2String(currentCoordinate.getX(), 4) : ""; |
|
|
|
|
String inputSurveyY = currentCoordinate != null ? Util.formatDouble2String(currentCoordinate.getY(), 4) : ""; |
|
|
|
|
String inputSurveyZ = currentCoordinate != null ? Util.formatDouble2String(currentCoordinate.getZ(), 4) : ""; |
|
|
|
|
String inputSurveyX = currentCoordinate != null ? Util.formatDouble2String(currentCoordinate.getX(), App.notNumber) : ""; |
|
|
|
|
String inputSurveyY = currentCoordinate != null ? Util.formatDouble2String(currentCoordinate.getY(), App.notNumber) : ""; |
|
|
|
|
String inputSurveyZ = currentCoordinate != null ? Util.formatDouble2String(currentCoordinate.getZ(), App.notNumber) : ""; |
|
|
|
|
new CustomInputListDialog.Builder(this).setTitle(getString(R.string.input_current_point)) |
|
|
|
|
.setInputHint01("X") |
|
|
|
|
.setInputHint02("Y") |
|
|
|
@ -857,15 +857,15 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
|
|
|
|
|
targetCompassHelper.updateTargetAzimuth(result.targetAzimuth); |
|
|
|
|
|
|
|
|
|
distance = TextFactory.distanceFormatDouble2String(getString(R.string.distance) + getString(R.string.colon), PointUtils.getDistance2D(new BasePoint(targetStakePointRecord.x, targetStakePointRecord.y, targetStakePointRecord.h), new BasePoint(currentCoordinate.getX(), currentCoordinate.getY(), currentCoordinate.getZ())), 6); |
|
|
|
|
distance = TextFactory.distanceFormatDouble2String(getString(R.string.distance) + getString(R.string.colon), PointUtils.getDistance2D(new BasePoint(targetStakePointRecord.x, targetStakePointRecord.y, targetStakePointRecord.h), new BasePoint(currentCoordinate.getX(), currentCoordinate.getY(), currentCoordinate.getZ())), App.notNumber); |
|
|
|
|
binding.tvDistance.setText(distance); |
|
|
|
|
|
|
|
|
|
moveDigFill = currentCoordinate.getZ() > targetStakePointRecord.h |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.down_dig), currentCoordinate.getZ() - targetStakePointRecord.h, 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.up_fill), targetStakePointRecord.h - currentCoordinate.getZ(), 6); |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.down_dig), currentCoordinate.getZ() - targetStakePointRecord.h, App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.up_fill), targetStakePointRecord.h - currentCoordinate.getZ(), App.notNumber); |
|
|
|
|
binding.tvDigFill.setText(currentCoordinate.getZ() > targetStakePointRecord.h |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.down_dig) + getString(R.string.colon), currentCoordinate.getZ() - targetStakePointRecord.h, 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.up_fill) + getString(R.string.colon), targetStakePointRecord.h - currentCoordinate.getZ(), 6)); |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.down_dig) + getString(R.string.colon), currentCoordinate.getZ() - targetStakePointRecord.h, App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.up_fill) + getString(R.string.colon), targetStakePointRecord.h - currentCoordinate.getZ(), App.notNumber)); |
|
|
|
|
|
|
|
|
|
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) { |
|
|
|
|
switch (PreferencesUtil.getMoveMethodTypeTS()) { |
|
|
|
@ -921,39 +921,39 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
|
|
|
|
|
double foreBackMoveValue = moveDistance.getX(); |
|
|
|
|
moveBeforeAfter = foreBackMoveValue >= 0 |
|
|
|
|
? TextFactory.distanceFormatDouble2String("向前", Math.abs(foreBackMoveValue), 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String("向后", Math.abs(foreBackMoveValue), 6); |
|
|
|
|
? TextFactory.distanceFormatDouble2String("向前", Math.abs(foreBackMoveValue), App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String("向后", Math.abs(foreBackMoveValue), App.notNumber); |
|
|
|
|
|
|
|
|
|
binding.tvTopThree.setText(foreBackMoveValue >= 0 |
|
|
|
|
? TextFactory.distanceFormatDouble2String("向前" + getString(R.string.colon), Math.abs(foreBackMoveValue), 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String("向后" + getString(R.string.colon), Math.abs(foreBackMoveValue), 6)); |
|
|
|
|
? TextFactory.distanceFormatDouble2String("向前" + getString(R.string.colon), Math.abs(foreBackMoveValue), App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String("向后" + getString(R.string.colon), Math.abs(foreBackMoveValue), App.notNumber)); |
|
|
|
|
|
|
|
|
|
double leftRightValue = moveDistance.getY(); |
|
|
|
|
moveLeftRight = leftRightValue >= 0 |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_right), Math.abs(leftRightValue), 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_left), Math.abs(leftRightValue), 6); |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_right), Math.abs(leftRightValue), App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_left), Math.abs(leftRightValue), App.notNumber); |
|
|
|
|
|
|
|
|
|
binding.tvTopFour.setText(leftRightValue >= 0 |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_right) + getString(R.string.colon), Math.abs(leftRightValue), 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_left) + getString(R.string.colon), Math.abs(leftRightValue), 6)); |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_right) + getString(R.string.colon), Math.abs(leftRightValue), App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_left) + getString(R.string.colon), Math.abs(leftRightValue), App.notNumber)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void moveWestEast() { |
|
|
|
|
moveWestEast = currentCoordinate.getY() > targetStakePointRecord.y |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_west), currentCoordinate.getY() - targetStakePointRecord.y, 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_east), targetStakePointRecord.y - currentCoordinate.getY(), 6); |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_west), currentCoordinate.getY() - targetStakePointRecord.y, App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_east), targetStakePointRecord.y - currentCoordinate.getY(), App.notNumber); |
|
|
|
|
|
|
|
|
|
moveSouthNorth = currentCoordinate.getX() > targetStakePointRecord.x |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_south), currentCoordinate.getX() - targetStakePointRecord.x, 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_north), targetStakePointRecord.x - currentCoordinate.getX(), 6); |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_south), currentCoordinate.getX() - targetStakePointRecord.x, App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_north), targetStakePointRecord.x - currentCoordinate.getX(), App.notNumber); |
|
|
|
|
|
|
|
|
|
binding.tvTopThree.setText(currentCoordinate.getY() > targetStakePointRecord.y |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_west) + getString(R.string.colon), currentCoordinate.getY() - targetStakePointRecord.y, 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_east) + getString(R.string.colon), targetStakePointRecord.y - currentCoordinate.getY(), 6)); |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_west) + getString(R.string.colon), currentCoordinate.getY() - targetStakePointRecord.y, App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_east) + getString(R.string.colon), targetStakePointRecord.y - currentCoordinate.getY(), App.notNumber)); |
|
|
|
|
|
|
|
|
|
binding.tvTopFour.setText(currentCoordinate.getX() > targetStakePointRecord.x |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_south) + getString(R.string.colon), currentCoordinate.getX() - targetStakePointRecord.x, 6) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_north) + getString(R.string.colon), targetStakePointRecord.x - currentCoordinate.getX(), 6)); |
|
|
|
|
? TextFactory.distanceFormatDouble2String(getString(R.string.to_south) + getString(R.string.colon), currentCoordinate.getX() - targetStakePointRecord.x, App.notNumber) |
|
|
|
|
: TextFactory.distanceFormatDouble2String(getString(R.string.to_north) + getString(R.string.colon), targetStakePointRecord.x - currentCoordinate.getX(), App.notNumber)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -967,13 +967,13 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
private void updateBottomInfo(String stakingName, double x, double y, double z) { |
|
|
|
|
if (!TextUtils.isEmpty(stakingName)) { |
|
|
|
|
binding.tvStakingPointName.setText(getString(R.string.staking_point_name) + getString(R.string.colon) + stakingName); |
|
|
|
|
binding.tvTargetX.setText(TextFactory.distanceFormatDouble2String("X" + getString(R.string.colon), x, 6)); |
|
|
|
|
binding.tvTargetY.setText(TextFactory.distanceFormatDouble2String("Y" + getString(R.string.colon), y, 6)); |
|
|
|
|
binding.tvTargetZ.setText(TextFactory.distanceFormatDouble2String("Z" + getString(R.string.colon), z, 6)); |
|
|
|
|
binding.tvTargetX.setText(TextFactory.distanceFormatDouble2String("X" + getString(R.string.colon), x, App.notNumber)); |
|
|
|
|
binding.tvTargetY.setText(TextFactory.distanceFormatDouble2String("Y" + getString(R.string.colon), y, App.notNumber)); |
|
|
|
|
binding.tvTargetZ.setText(TextFactory.distanceFormatDouble2String("Z" + getString(R.string.colon), z, App.notNumber)); |
|
|
|
|
} else { |
|
|
|
|
binding.tvSurveyX.setText(TextFactory.distanceFormatDouble2String("X" + getString(R.string.colon), x, 6)); |
|
|
|
|
binding.tvSurveyY.setText(TextFactory.distanceFormatDouble2String("Y" + getString(R.string.colon), y, 6)); |
|
|
|
|
binding.tvSurveyZ.setText(TextFactory.distanceFormatDouble2String("Z" + getString(R.string.colon), z, 6)); |
|
|
|
|
binding.tvSurveyX.setText(TextFactory.distanceFormatDouble2String("X" + getString(R.string.colon), x, App.notNumber)); |
|
|
|
|
binding.tvSurveyY.setText(TextFactory.distanceFormatDouble2String("Y" + getString(R.string.colon), y, App.notNumber)); |
|
|
|
|
binding.tvSurveyZ.setText(TextFactory.distanceFormatDouble2String("Z" + getString(R.string.colon), z, App.notNumber)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|