# Acceleration threshold for location.periodic movement detection?

**URL:** <https://discuss.blues.com/t/acceleration-threshold-for-location-periodic-movement-detection/1862>\
**Category:** Notecard API\
**Created:** [December 21, 2023, 6:26pm UTC](https://discuss.blues.com/t/acceleration-threshold-for-location-periodic-movement-detection/1862 "2023-12-21T18:26:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![daterdots](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@daterdots](https://discuss.blues.com/u/daterdots)\
**Post date:** [December 21, 2023, 6:26pm UTC](https://discuss.blues.com/t/acceleration-threshold-for-location-periodic-movement-detection/1862/1 "2023-12-21T18:26:15Z")

</div>

The documentation [says](https://dev.blues.io/notecard/notecard-walkthrough/time-and-location-requests/#sampling-at-predefined-intervals) that

> To preserve battery, when the Notecard’s GPS module is in periodic mode, GPS is only enabled if the built-in accelerometer detects movement since the last GPS enable.

How much does the notecard have to move? I have an application that has a lot of vibration, but very little translation. Are there any additional resources that describe the threshold and/or algorithm that determine whether or not the Notecard has “moved?”

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [December 21, 2023, 6:38pm UTC](https://discuss.blues.com/t/acceleration-threshold-for-location-periodic-movement-detection/1862/2 "2023-12-21T18:38:42Z")

</div>

Hi @daterdots,

Normally it takes very little motion to “trigger” the accelerometer on the Notecard. If you look at the [card.motion.mode API](https://dev.blues.io/api-reference/notecard-api/card-requests/#card-motion-mode), you’ll see a `sensitivity` argument that lets you set the accelerometer sample rate as well. You can try increasing this value to see if your results improve, as sometimes subtle vibrations are not registered at the default setting.

Rob

---

<div class="post-metadata">

**Author:** ![daterdots](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@daterdots](https://discuss.blues.com/u/daterdots)\
**Post date:** [December 21, 2023, 6:49pm UTC](https://discuss.blues.com/t/acceleration-threshold-for-location-periodic-movement-detection/1862/3 "2023-12-21T18:49:39Z")

</div>

I am having the opposite problem of what I think you’re suggesting. My asset is a trailer with a big generator and other stuff on it. It normally sits outside and vibrates/shakes/people jump on it. When that happens, it has not moved, so I don’t want/need to waste energy with GPS tracking. However, I do want to do GPS tracking if/when the trailer really actually moves down the road. I am hung up on this because this a battery-powered solution and our energy budget is really tight.

I noticed the `card.location.treshold` that will prevent GPS from being triggered until a large number of motion events have accumulated. I could just set this to a high number, I guess.

I looked through the docs to try to better understand what defines a “motion event,” but I am also unsure how that is defined.

If you were me, and you were trying to track a trailer at an interval of roughly once per hour when it is _actually moving down the road_ but didn’t want to waste energy locking GPS when the trailer is stationary but shaking/vibrating/etc, what would you do?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/blues/original/2X/5/53e8d8a620e85db4f78d13556f4c39bfa952fcf3.png)

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [December 23, 2023, 5:13pm UTC](https://discuss.blues.com/t/acceleration-threshold-for-location-periodic-movement-detection/1862/4 "2023-12-23T17:13:35Z")

</div>

Hi @daterdots,

Thanks for the explanation…I think I see a couple potential paths forward, but both would require some experimentation:

1. Set the `sensitivity` to `1` (least sensitive) and use the `card.location.mode/threshold` argument to set a higher threshold as you mentioned. What that value should be is very much TBD though!

2. Alternatively, in firmware you could poll the GPS location at a regular cadence (say, every hour, in periodic mode). If there is a change in location from the previous lat/lon to the current lat/lon, you could change the frequency of gathering GPS location, use continuous mode, etc. It’s not the most elegant solution I admit.

Rob

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [January 4, 2024, 5:42pm UTC](https://discuss.blues.com/t/acceleration-threshold-for-location-periodic-movement-detection/1862/5 "2024-01-04T17:42:50Z")

</div>

Hi @daterdots,

We just released the [LTS v6.1.1 firmware](https://dev.blues.io/notecard/notecard-firmware-updates/#lts-v6-1-1-january-3-2024) which may help you in this scenario. With this version of the firmware, you can effectively determine whether a Notecard is in a “moving” state or a “stopped” state. It’s a little complicated, but I wrote up a short guide on [how it’s implemented here](https://dev.blues.io/guides-and-tutorials/notecard-guides/asset-tracking/#wake-host-or-send-note-on-motion-status-change). Hope that helps!

Rob
