|
| 1 | +# Dynamic Point of Interest (POI) Feature |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The Point of Interest system now supports dynamic positioning using data-lake syntax, allowing POIs to track live objects by referencing real-time data variables. |
| 6 | + |
| 7 | +## Key Features |
| 8 | + |
| 9 | +### 1. Dynamic Positioning |
| 10 | +- Use data-lake expressions like `{{ mavlink/buoy/latitude }}` for live position tracking |
| 11 | +- Automatic updates when data variables change |
| 12 | +- Fallback to last known position when data is unavailable |
| 13 | + |
| 14 | +### 2. Visual Status Indicators |
| 15 | +- **Live tracking**: Normal POI color indicates real-time position data |
| 16 | +- **No position data**: Grayed-out markers show last known location |
| 17 | +- **Enhanced tooltips**: Display tracking status and data availability |
| 18 | + |
| 19 | +### 3. Mixed Mode Support |
| 20 | +- Static POIs continue to work as before |
| 21 | +- Dynamic POIs can use expressions for one or both coordinates |
| 22 | +- Seamless integration with existing POI functionality |
| 23 | + |
| 24 | +## Usage |
| 25 | + |
| 26 | +### Creating Dynamic POIs |
| 27 | + |
| 28 | +1. **Open POI Dialog**: Right-click on map and select "Place point of interest" |
| 29 | +2. **Enable Dynamic Mode**: Toggle the "Dynamic positioning" switch |
| 30 | +3. **Enter Expressions**: Use data-lake syntax in coordinate fields: |
| 31 | + - Latitude: `{{ mavlink/buoy/latitude }}` |
| 32 | + - Longitude: `{{ mavlink/buoy/longitude }}` |
| 33 | +4. **Save**: The POI will automatically track the specified data variables |
| 34 | + |
| 35 | +### Supported Expression Formats |
| 36 | + |
| 37 | +- **Full expressions**: `{{ mavlink/buoy/latitude }}` |
| 38 | +- **Static values**: `37.7749` (when dynamic mode is off) |
| 39 | +- **Mixed mode**: Dynamic latitude with static longitude, or vice versa |
| 40 | + |
| 41 | +### Data Variable Examples |
| 42 | + |
| 43 | +- `{{ mavlink/buoy/latitude }}` - Buoy position from MAVLink |
| 44 | +- `{{ GLOBAL_POSITION_INT/lat }}` - Vehicle position latitude |
| 45 | +- `{{ NAMED_VALUE_FLOAT/target_lat }}` - Custom named value |
| 46 | +- `{{ compass/heading }}` - Any numeric data lake variable |
| 47 | + |
| 48 | +## Visual Feedback |
| 49 | + |
| 50 | +### POI Marker Colors |
| 51 | +- **Normal color**: POI has valid position data |
| 52 | +- **Gray**: POI has no current data, showing last known position |
| 53 | + |
| 54 | +### Tooltip Information |
| 55 | +- Static POIs: Standard location info |
| 56 | +- Dynamic POIs with data: "Live tracking" + coordinates |
| 57 | +- Dynamic POIs without data: "No position data - showing last known location" |
| 58 | + |
| 59 | +## Technical Implementation |
| 60 | + |
| 61 | +### Data Storage |
| 62 | +- Static coordinates: Stored in `coordinates` field |
| 63 | +- Dynamic expressions: Stored in `latitudeExpression` and `longitudeExpression` fields |
| 64 | +- Last known positions: Cached in `lastKnownCoordinates` field |
| 65 | +- Status tracking: `isDynamic` and `hasValidPosition` flags |
| 66 | + |
| 67 | +### Real-time Updates |
| 68 | +- Automatic data-lake variable listeners for dynamic POIs |
| 69 | +- Coordinate re-evaluation when source data changes |
| 70 | +- Marker updates and re-styling based on data availability |
| 71 | + |
| 72 | +### Backward Compatibility |
| 73 | +- Existing static POIs continue to work unchanged |
| 74 | +- New fields are optional and don't affect legacy POIs |
| 75 | +- Graceful handling of missing or invalid expressions |
| 76 | + |
| 77 | +## Use Cases |
| 78 | + |
| 79 | +1. **Tracking Vehicles**: Monitor other vehicles, boats, or drones |
| 80 | +2. **Environmental Monitoring**: Track buoys, sensors, or weather stations |
| 81 | +3. **Mission Targets**: Follow dynamic waypoints or objectives |
| 82 | +4. **Search and Rescue**: Track personnel or assets with GPS transmitters |
| 83 | +5. **Fleet Management**: Monitor multiple assets with live position feeds |
| 84 | + |
| 85 | +## Error Handling |
| 86 | + |
| 87 | +- Invalid expressions default to [0, 0] with warning message |
| 88 | +- Missing data variables show last known position in gray |
| 89 | +- Malformed coordinates are handled gracefully |
| 90 | +- Users receive clear feedback about data availability status |
0 commit comments