I'm trying to create an application that keeps track of an anchored boat, and sounds an alarm if the boat moves outside of a certain radius (indicating the anchor is dragging instead of holding, or the boat is swinging around it to an undesirable location).
However, right off the bat, I've got an issue retrieving the device's location: the latitude and longitude values stop changing when the device is sitting still on the slow moving boat.
I'm setting desiredAccuracy to kCLLocationAccuracyBestForNavigation, but if I'm not holding the device in my hands, latitude and longitude updates stop coming in, and they won't come in regularly unless I pick up the device and rotate it around a little bit.
It seems to me like the GPS is being put to sleep at the system level because it's detecting that the device isn't moving very fast, and accelerometer data doesn't look like an active user, but I need to override that somehow so my app can stay on top of a boat's real-time location.
I've been able to reproduce this on multiple iOS devices, which is why I feel like something's going on at the system level, and isn't device-specific.
Is there any way for me to work around this behavior (other than building a motorized tray to keep physically rotating the device, of course :D)?