# bdxt_wx **Repository Path**: elygg/bdxt_wx ## Basic Information - **Project Name**: bdxt_wx - **Description**: 【北斗星探-微信小程序源码】bdxt_wx是一个专注于微信小程序开发的开源项目,提供丰富的组件和工具,帮助开发者快速构建高效、美观的小程序应用。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-16 - **Last Updated**: 2026-11-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # bdxt_wx - GPS Trajectory Collection WeChat Mini Program A WeChat mini program for collecting GPS trajectory data by connecting to BLE GPS devices in real-time. Supports data export in CSV and GeoJSON formats. ## Features - 🔵 **BLE Device Connection** - Auto-discover and connect to BLE GPS devices (supports Nordic UART and standard services) - 📍 **Real-time Positioning** - Display latitude, longitude, altitude, accuracy, speed, heading and more - 📊 **Trajectory Collection** - Support multiple trajectory management with real-time point recording - 💾 **Data Export** - Export to CSV and GeoJSON formats, save locally or share - 🛰️ **NMEA Parsing** - Full support for GNPOS, GNDEV, GGA, RMC, GST, VTG sentences - 🗺️ **Map Display** - Real-time map showing current position, trajectory routes and collection points - 🔧 **Coordinate Conversion** - Automatic WGS84 to GCJ02 coordinate system conversion ## Architecture ``` pages/ ├── map/ # Map page (main) ├── index/ # Home page ├── logs/ # Logs page └── ble/ # Bluetooth page utils/ ├── ble.js # BLE device communication module ├── parser.js # NMEA sentence parser └── coord.js # Coordinate system conversion components/ └── navigation-bar/ # Custom navigation bar ``` ## Requirements - WeChat version: 3.15.2 or higher - Base library: 3.0.0 ~ 3.14.0 - Device: Android or iOS phone with BLE support - GPS Device: BLE GPS module supporting NMEA standard sentences ## Installation 1. **Clone the repository** ```bash git clone cd bdxt_wx ``` 2. **Open with WeChat Developer Tools** - Scan QR code or enter AppID: `wxf98a7a6587e11cf9` - Import project folder 3. **Grant Permissions** - Location permission required - Bluetooth permission required ## Usage ### Basic Workflow 1. **Connect Device** - Tap the Bluetooth button "Click to connect device" - Select target GPS device from list - Wait for connection (indicator turns blue) 2. **View Real-time Data** - Device automatically displays positioning data after connection - Tap top panel to expand detailed info (heading, differential status, signal strength) - Map updates device position in real-time 3. **Create and Manage Trajectories** - Tap "New" to create new trajectory - Tap "+ Collect" to record current position - Tap "Undo" to delete last collection point - Tap trajectory name to view, switch or delete 4. **Export Data** - Tap "CSV" or "GeoJSON" to choose export format - Select current trajectory or all trajectories - Save locally or share with friends ## Supported Data Formats ### GNPOS Sentence (Proprietary) Complete position info: longitude, latitude, altitude, fix status, accuracy, speed, etc. ### NMEA 0183 Standard Sentences - **GGA/GNGGA** - Global Positioning System Fix Data - **RMC/GNRMC** - Recommended Minimum Navigation Information - **GST/GNGST** - Position Error Estimate - **VTG/GNVTG** - Course and Speed ### Fix Status Codes - `0` - No fix - `1` - Single point positioning - `2` - Differential positioning - `4` - RTK fixed solution - `5` - RTK float solution - `7` - Base station mode ## File Reference | File | Description | |------|-------------| | `app.js` | Global app config and lifecycle | | `app.json` | App configuration (pages, permissions) | | `utils/ble.js` | BLE device communication and characteristic discovery | | `utils/parser.js` | NMEA sentence parsing and coordinate conversion | | `utils/coord.js` | WGS84/GCJ02 coordinate system conversion | | `pages/map/map.js` | Map page logic and data handling | | `pages/map/map.wxml` | Map page UI | | `pages/map/map.wxss` | Map page styles | ## Contributing Issues and Pull Requests are welcome! 1. Fork the repository 2. Create Feat_xxx branch 3. Commit your code 4. Create Pull Request ## License MIT License ## FAQ **Q: No data after connecting device?** A: Check if device is sending NMEA sentences correctly. Check console logs for `[BLE] line:` messages. **Q: Map display not working?** A: Skyline renderer has limited canvas support in dev tools. Test on real device. **Q: Data export failed?** A: Check phone storage space and ensure file read/write permissions are granted. ## Changelog ### v1.0.0 (2026-05-16) - Initial release - BLE GPS device connection support - NMEA sentence parsing - Trajectory collection and data export