Pet GPS Tracking via Mobile App
GPS tracker on cat's collar sends coordinate every 30 seconds. Owner opens map — point stationary 10 minutes, cat clearly ran away. Problem isn't tracker — it works. Problem is app doesn't distinguish "stationary" from "lost signal": both look same without showing last update time and signal level.
Displaying pet position
Map marker with pet photo from profile — minimum. Must show nearby: last update time ("2 mins ago"), GPS accuracy (horizontalAccuracy from tracker packet), GSM signal level, battery charge. Four fields owner wants without tapping marker.
Color indicator of data freshness: green — updated <2 min, yellow — 2–10 min, red — >10 min. Simple logic, removes 90% of "is tracker hung?" questions.
Marker animation. New coordinate arrives — marker moves smoothly, doesn't jump. On Android: ValueAnimator with LatLngInterpolator.Linear. On iOS: UIView.animate(withDuration: 0.5) on MKAnnotationView.coordinate. In Flutter via google_maps_flutter — update Marker with new LatLng, smoothness via Tween<LatLng> in AnimationController.
Safe zone
Circular geofence around home — main pet tracker feature. User draws on map: taps center (usually home), drags handle to set radius. Recommended minimum — 50–100 meters to avoid GPS error triggering false alerts.
False alerts — real pain. Ground-level GPS with trees gives "jumps" to 20–30 meters. Kalman filter on server or simple moving average of last 3 points reduces false exits. Without filter night push "Whiskers left home" at 3:00 makes people disable notifications fast.
Live tracking
Default tracker runs in economy mode: position every 5 minutes. Owner enables live tracking — taps button, server sends command to tracker to increase updates (every 10–15 seconds). Tracker responds with confirmation.
Command via server: POST /trackers/{id}/mode {mode: "live"} → worker → MQTT publish to device topic → tracker responds. Mobile client waits for confirmation via WebSocket (tracker_mode_changed event). Wait timeout — 30 seconds, then UI shows "device not responding."
On live tracking screen — breadcrumb track for last 15–30 minutes via Polyline with decreasing opacity as points age.
Push on zone exit
APNs alert push with sound: default and badge: 1. Content: "Whiskers left safe zone — 120 m from home." Link to map via deep link in userInfo.
Important to let user customize notifications: separate toggle "Notify only 7:00–23:00" — cat can walk at night, owner knows. UNNotificationTrigger with dateMatching or server filtering by user schedule.
Timeline
Implementing pet GPS tracking (map, live tracking, safe zone, push alerts) with ready tracker API: 4 hours — 2 working days. Cost calculated after detail clarification.







