A proof of concept for a professional maritime navigation mobile application built with Flutter. This app provides offline maps with OpenSeaMap integration, GRIB weather file import, and GPS tracking capabilities.
-
Interactive Map Display
- OpenStreetMap base layer
- OpenSeaMap nautical overlay
- Smooth pan and zoom (2-18 zoom levels)
- Fixed north orientation
- Real-time GPS position tracking
- Current coordinates display
-
Offline Maps
- Download map regions for offline use
- Configurable zoom level ranges
- Automatic size estimation before download
- Storage management
- Region deletion
-
GRIB Import
- File picker for GRIB files (.grib, .grib2, .grb, .grb2)
- Basic GRIB file validation
- File metadata storage
- Import history management
-
GPS Tracking
- Real-time position updates
- Speed display (in knots)
- Heading indicator
- Altitude tracking
-
UI/UX
- Maritime-themed design (ocean blues, whites)
- Light/Dark mode support
- Intuitive navigation drawer
- Responsive layout
- Flutter 3.24+ (Dart 3.x)
- Riverpod 2.5.0 - State management
- Drift 2.16.0 - SQLite database
flutter_map7.0.0 - Map renderinglatlong20.9.0 - Coordinate handlinggeolocator13.0.0 - GPS locationpermission_handler11.0.0 - Permission managementpath_provider2.1.0 - File system accesshttp1.2.0 - Network requestsfile_picker8.0.0 - File selection
lib/
├── core/
│ ├── config/ # App configuration constants
│ ├── theme/ # Maritime theme (colors, typography)
│ ├── utils/ # Tile calculations utilities
│ ├── database/ # Drift database definitions
│ └── providers/ # Global Riverpod providers
├── features/
│ ├── map/
│ │ ├── domain/ # Location service
│ │ ├── services/ # Offline tile provider
│ │ └── presentation/# Map screen UI
│ ├── offline/
│ │ ├── domain/ # Tile downloader
│ │ └── presentation/# Offline manager screen
│ └── grib/
│ ├── domain/ # GRIB parser (simplified)
│ └── presentation/# GRIB import screen
└── main.dart
-
Flutter SDK (3.24 or later)
flutter --version
-
Platform Setup
- Android: Android Studio with Android SDK
- iOS: Xcode 15+ (macOS only)
-
Clone or navigate to the project directory
cd maritime_nav_poc -
Install dependencies
flutter pub get
-
Generate code (for Drift database)
flutter pub run build_runner build --delete-conflicting-outputs
-
Run the app
# For Android flutter run # For iOS (macOS only) flutter run -d ios # For a specific device flutter devices flutter run -d <device_id>
The AndroidManifest.xml is already configured with required permissions:
INTERNET- Network access for tile downloadsACCESS_FINE_LOCATION/ACCESS_COARSE_LOCATION- GPSWRITE_EXTERNAL_STORAGE/READ_EXTERNAL_STORAGE- File storage
The Info.plist is configured with permission descriptions:
- Location permissions for GPS tracking
- Storage permissions for offline maps
- Pan: Drag with one finger
- Zoom: Pinch to zoom or use +/- buttons
- Center on location: Tap the location icon in the app bar
- Open the navigation drawer (☰)
- Select "Offline Maps"
- Tap the + button
- Configure region name and zoom levels
- Review estimated size and tap "Download"
- Wait for download completion
- Maps are now available offline
Test Region: Pre-configured area near Marseille, France (43.20-43.35°N, 5.30-5.45°E)
- Open the navigation drawer (☰)
- Select "Import GRIB"
- Tap the + button
- Select a GRIB file from device storage
- File is validated and imported
- View in the GRIB files list
Note: GRIB visualization on map is a placeholder in this POC. Full implementation would require:
- Wind arrow overlays
- Pressure contours
- Wave height visualization
- Time slider for multi-temporal data
- Frame Rate: >30 FPS during map interactions ✅
- Tile Load Time: <2 seconds per tile ✅
- Storage Limit: Warning at 1GB, max 5GB
- GPS Update Rate: Every 5 seconds or 10 meters
- Metadata for cached map tiles
- Tracks z/x/y coordinates and source
- Offline region definitions
- Stores bounds, zoom levels, size
- Imported GRIB file records
- Stores path, import date, valid time
-
GRIB Parsing: Simplified mock parser
- Does not decode actual GRIB data
- Returns mock weather data for demonstration
- Production needs proper GRIB library (wgrib2, gribdart)
-
GRIB Visualization: Not implemented
- Import and storage works
- Map overlay rendering is placeholder
-
Region Selection: Pre-defined test region
- Rectangle selection on map not implemented
- Uses hardcoded Marseille area for testing
-
Download Resume: Not supported
- Downloads must complete in one session
- Cancellation discards progress
-
Tile Caching: Basic implementation
- No expiration or refresh logic
- No compression
- Interactive region selection on map
- Real GRIB parsing (integrate wgrib2 or similar)
- GRIB overlay rendering on map
- Download pause/resume functionality
- Route planning and waypoints
- AIS (Automatic Identification System) integration
- Tide predictions
- Marine weather forecasts
- Track recording and GPX export
- Compass integration
- Multi-language support (i18n)
- Anchor watch alarm
- MOB (Man Overboard) function
- Night mode optimization
To analyze performance:
flutter run --profile
# Then use DevTools
flutter pub global activate devtools
flutter pub global run devtoolsMonitor:
- Frame rendering times
- Memory usage (especially tile cache)
- Network requests
- Storage I/O
flutter testflutter test test/widgets/flutter drive --target=test_driver/app.dartProblem: database.g.dart not found
flutter pub run build_runner build --delete-conflicting-outputsProblem: Permission errors on Android
- Check
AndroidManifest.xmlpermissions - Request permissions at runtime (already handled by app)
Problem: Location not working on iOS Simulator
- Use real device or set custom location in simulator
Problem: Tiles not loading
- Check internet connection
- Verify tile URLs in
AppConfig - Check app permissions
Problem: GPS not working
- Enable location services on device
- Grant location permission to app
- Use real device (GPS limited in simulators)
Problem: GRIB import fails
- Ensure file has correct extension
- Check file is valid GRIB format (basic validation only)
- Flutter DevTools
- QGIS - GRIB visualization for testing
- wgrib2 - GRIB inspection
This is a proof of concept project. License TBD.
This is a POC project. Contributions and feedback welcome for planning Phase 2.
For questions about this POC, please refer to the project specifications document.
Version: 1.0.0 Date: 2025 Status: POC Complete ✅