feat: publish iOS GPS to MQTT saltybot/ios/gps at 1 Hz (Issue #681) #2
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-ios/issue-681-ios-gps-mqtt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
MQTTClient.swift— minimal MQTT 3.1.1 client usingNetwork.framework, no external dependencysaltybot/ios/gpsat 1 Hz while streaming is activeBroker config
192.168.87.29:1883(LAN), usermqtt_sebNSAllowsLocalNetworkingalready covers this; added explicitNSExceptionDomainsentry for192.168.87.29JSON payload (matches
sensor_dashboard.py)Design
lastKnownLocationcached on everyCLLocationManagerdelegate callbackTimerpublishes to MQTT — rate is stable regardless of GPS update cadenceTest plan
SulTee/SulTee.xcodeproj, deploy to iPhone 15 Promosquitto_sub -h 192.168.87.29 -u mqtt_seb -P mqtt_pass -t saltybot/ios/gps— verify 1 Hz JSON messages🤖 Generated with Claude Code
- SulTee SwiftUI app targeting iOS 17+, iPhone 15 Pro - CoreLocation: dual-frequency GPS (L1+L5) continuous updates, background mode enabled - CoreMotion: 100 Hz IMU (accel + gyro + attitude + gravity), magnetometer via device motion - CMAltimeter: barometer relative altitude + pressure streaming - CLLocationManager heading updates for magnetometer heading - URLSessionWebSocketTask client connecting to ws://192.168.86.158:9090 - JSON protocol: {type, timestamp, data} for gps/imu/heading/baro messages - Auto-reconnect on disconnect (2s backoff) - Haptic feedback on incoming "haptic" messages from bot - Background streaming: UIBackgroundModes location + external-accessory in Info.plist - SwiftUI status UI: connection banner, sensor rate counters (Hz), start/stop follow-me button - Dev team Z37N597UWY (vayrette@gmail.com), bundle ID com.saltylab.sultee Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Adds minimal MQTT 3.1.1 client (MQTTClient.swift) using Network.framework — no external dependency. Implements CONNECT + PUBLISH (QoS 0) + PINGREQ keepalive. - Broker: 192.168.87.29:1883 (user: mqtt_seb) - Topic: saltybot/ios/gps - Rate: 1 Hz Timer, decoupled from GPS update rate - Payload matches sensor_dashboard.py format: {ts, lat, lon, alt_m, accuracy_m, speed_ms, bearing_deg, provider: "gps"} - lastKnownLocation cached from CLLocationManagerDelegate, published on timer - MQTT connect/disconnect tied to startStreaming()/stopStreaming() - ATS NSExceptionDomains extended to include 192.168.87.29 (MQTT broker LAN IP) - MQTTClient.swift registered in project.pbxproj Sources build phase Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Checkout
From your project repository, check out a new branch and test the changes.