Skip to content

Commit

Permalink
Add metal detector guide with new format
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Nov 24, 2023
1 parent b1631cf commit a31ce18
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ import android.content.Context
import android.hardware.Sensor
import com.kylecorry.andromeda.sense.Sensors
import com.kylecorry.trail_sense.R
import com.kylecorry.trail_sense.shared.sensors.SensorService
import com.kylecorry.trail_sense.tools.guide.domain.UserGuide
import com.kylecorry.trail_sense.tools.guide.domain.UserGuideCategory

object Guides {

fun guides(context: Context): List<UserGuideCategory> {

val hasCompass = SensorService(context).hasCompass()

val general = UserGuideCategory(
context.getString(R.string.general), listOf(
UserGuide(
Expand Down Expand Up @@ -78,6 +81,11 @@ object Guides {
null,
R.raw.packing_lists
),
if (hasCompass) UserGuide(
context.getString(R.string.tool_metal_detector_title),
null,
R.raw.guide_tool_metal_detector
) else null,
UserGuide(
context.getString(R.string.clinometer_title),
context.getString(R.string.tool_clinometer_summary),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ object Tools {
R.drawable.ic_tool_metal_detector,
R.id.action_action_experimental_tools_to_fragmentToolMetalDetector,
ToolCategory.Other,
guideId = R.raw.guide_tool_metal_detector
) else null,
Tool(
29,
Expand Down
34 changes: 34 additions & 0 deletions app/src/main/res/raw/guide_tool_metal_detector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Calibration
Calibrating the metal detector improves the accuracy of readings. To calibrate:

1. Hold your phone 2-3 inches (5-8 cm) above the ground with the screen facing up.
2. Press 'Calibrate'.
3. Recalibrate occasionally for accuracy.

The detector automatically calibrates when started.

## Detecting Metal
The detector only finds magnetic metals like iron. To detect metal:

1. After calibrating, hold your phone 2-3 inches (5-8 cm) above the area to scan with the screen facing up.
2. Slowly move your phone, keeping the distance and orientation consistent.
3. When metal is detected, the phone will vibrate and indicate detection.

## Understanding Readings
The graph shows magnetic field strength over time. Metal causes spikes up or down. If spikes occur that don't trigger the metal detector, lower the threshold to increase sensitivity.

Readings at the top of the screen show field strength in microteslas (uT).

## Threshold
Lower threshold values increase sensitivity. Higher values decrease it. Adjust with the on-screen slider.

## High Sensitivity Mode
This removes noise filtering for maximum sensitivity. The graph becomes noisier and false positives occur more frequently. Enable with the 'High sensitivity' switch.

## Metal Direction (experimental)
This experimental feature attempts to indicate metal direction with two on-screen dots. One points towards the metal and the other away from it. Unfortunately, it's uncertain which is which. Move your phone towards one dot; if the number in the center increases, you are getting closer. If the dots swap, it likely means you just passed over the metal. This requires a gyroscope sensor.

Enable it on Settings > Experimental > Show metal direction.

## Use Cases
Find dropped magnetic metal objects like keys or knives. Cannot detect coins or jewelry.

0 comments on commit a31ce18

Please sign in to comment.