Skip to content

iOS companion app for DJI drones with telemetry logging, flight analytics and post-flight analysis

License

Notifications You must be signed in to change notification settings

Bogdusik/SkyTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SkyTools

SkyTools App Icon

A professional iOS companion app for DJI drones

Telemetry logging, flight analytics, and pilot utilities

Swift iOS License


πŸ“± Overview

SkyTools is a production-ready iOS application designed as a companion tool for DJI Mini/Mavic series drones. Unlike DJI Fly, SkyTools focuses on telemetry logging, flight analytics, and post-flight analysis rather than FPV control.

Key Features

  • βœ… Real-time Telemetry Logging - Battery, GPS, altitude, speed, heading, RC signal
  • βœ… Flight Session Management - Automatic session tracking with persistent storage
  • βœ… Interactive Flight Map - Visualize flight paths with MapKit (start/finish/home markers)
  • βœ… Event Markers - Mark interesting shots, problems, wind conditions during flight
  • βœ… Flight Analytics - KPI cards (max altitude, max speed, distance, battery drop)
  • βœ… Multi-format Export - JSON, CSV, GPX export for analysis
  • βœ… Mock Drone Mode - Test and develop without a physical drone
  • βœ… Privacy-First - No user location tracking, all data stored locally

πŸ—οΈ Architecture

Tech Stack

  • Language: Swift 5.9+
  • UI Framework: SwiftUI
  • SDK: DJI Mobile SDK iOS
  • Maps: MapKit / CoreLocation
  • State Management: Combine + ObservableObject
  • Persistence: FileManager + UserDefaults

Project Structure

SkyTools/
β”œβ”€β”€ SkyTools/                      # Main application code
β”‚   β”œβ”€β”€ SkyToolsApp.swift          # App entry point + DJI SDK registration
β”‚   β”œβ”€β”€ ContentView.swift          # Main TabView (4 tabs)
β”‚   β”œβ”€β”€ DashboardView.swift        # Live telemetry + KPI cards
β”‚   β”œβ”€β”€ FlightMapView.swift        # Interactive map with flight track
β”‚   β”œβ”€β”€ LogsView.swift             # Session history + export
β”‚   β”œβ”€β”€ SystemView.swift           # SDK status + settings
β”‚   β”œβ”€β”€ OnboardingView.swift       # First launch experience
β”‚   β”œβ”€β”€ SettingsView.swift         # App settings
β”‚   β”œβ”€β”€ DroneStore.swift           # Central state management (ObservableObject)
β”‚   β”œβ”€β”€ TelemetryLogger.swift      # Telemetry logging service
β”‚   β”œβ”€β”€ TelemetryRecord.swift      # Telemetry data model
β”‚   β”œβ”€β”€ FlightSummary.swift        # Flight analytics
β”‚   β”œβ”€β”€ SessionManager.swift       # Session persistence
β”‚   β”œβ”€β”€ ExportManager.swift        # CSV/GPX export
β”‚   β”œβ”€β”€ EventManager.swift         # Event markers management
β”‚   β”œβ”€β”€ AppSettings.swift          # Settings singleton
β”‚   └── MockDroneService.swift     # Mock drone for testing
β”œβ”€β”€ docs/                          # Documentation
β”‚   β”œβ”€β”€ DJI_CONNECTION.md          # DJI connection guide
β”‚   β”œβ”€β”€ LOCALIZATION.md            # Localization settings
β”‚   β”œβ”€β”€ PRIVACY.md                 # Privacy policy
β”‚   └── PROJECT_REPORT.md          # Project report
β”œβ”€β”€ screenshots/                   # App screenshots
β”œβ”€β”€ Pods/                          # CocoaPods dependencies
β”œβ”€β”€ README.md                      # Main documentation
β”œβ”€β”€ LICENSE                        # MIT License
└── Podfile                        # CocoaPods configuration

Architecture Pattern

MVVM-like with centralized state management:

  • Model: TelemetryRecord, FlightEvent, FlightSummary
  • View: SwiftUI views (DashboardView, FlightMapView, etc.)
  • ViewModel: DroneStore (single source of truth), TelemetryLogger, EventManager

πŸš€ Getting Started

Prerequisites

  • Xcode 15.0+
  • iOS 15.0+ device or simulator
  • CocoaPods installed
  • DJI Developer Account (for real drone connection)

Installation

  1. Clone the repository:

    git clone https://github.com/Bogdusik/SkyTools.git
    cd SkyTools
  2. Install dependencies:

    pod install
  3. Open the workspace:

    open SkyTools.xcworkspace
  4. Configure DJI SDK:

    • Register your app at DJI Developer
    • Add your App Key to Info.plist (if using real drone)
    • Set USE_MOCK_DRONE = false in SkyToolsApp.swift for production
  5. Build and run:

    • Select your target device
    • Build (⌘+B) and Run (⌘+R)

πŸ”Œ Connecting a Real DJI Drone

How It Works

SkyTools connects to your DJI drone through the DJI Mobile SDK:

  1. Physical Connection:

    • Connect your iPhone/iPad to the drone's remote controller via USB cable
    • Or connect via Wi-Fi (for supported models like DJI Mini 3 Pro)
  2. SDK Connection Flow:

    App Launch β†’ DJI SDK Registration β†’ Product Detection β†’ Telemetry Subscription
    
  3. Automatic Telemetry:

    • Once connected, SkyTools automatically subscribes to telemetry callbacks
    • Data flows: DJI SDK β†’ DroneStore β†’ TelemetryLogger β†’ UI
    • No manual configuration needed

Supported Models

  • DJI Mini series (Mini 2, Mini 3, Mini 3 Pro, Mini 4 Pro)
  • DJI Mavic series (Mavic Air 2, Mavic 3, etc.)
  • Any DJI drone compatible with DJI Mobile SDK iOS

Connection Steps

  1. Enable Mock Mode (for testing):

    • Set USE_MOCK_DRONE = true in SkyToolsApp.swift
    • App will simulate drone telemetry without hardware
  2. Use Real Drone:

    • Set USE_MOCK_DRONE = false
    • Connect iPhone to remote controller via USB
    • Launch SkyTools
    • App will automatically detect and connect to the drone
    • Check System tab for connection status
  3. Start Flight Session:

    • Connection is automatic (if "Auto Start Session" is enabled in Settings)
    • Or manually start from Dashboard
    • Telemetry begins logging immediately

πŸ“Š Features in Detail

1. Real-time Telemetry Dashboard

  • Live Metrics: Battery, altitude, speed, heading, GPS satellites
  • Signal Quality: Visual indicators for GPS and RC signal strength
  • KPI Cards: Max altitude, max speed, flight distance, battery drop
  • Flight Summary: Duration, average speed, total distance

2. Interactive Flight Map

  • Flight Track: Visual path of the entire flight
  • Markers:
    • 🟒 Start Point - Where the flight began
    • πŸ”΄ End Point - Final position (for saved sessions)
    • 🏠 Home Point - Takeoff location
    • πŸ“ Max Distance - Furthest point from home
    • 🎯 Event Markers - Custom markers (interesting shot, problem, wind)
  • Interactive Controls:
    • Pan, zoom, rotate, pitch
    • "Follow Drone" button to return to automatic tracking

3. Event Markers

  • Quick Actions: Mark interesting shots, problems, wind conditions
  • Custom Events: Add notes and custom event types
  • Context: Events are saved with GPS coordinates and timestamps
  • Visualization: Displayed on map and in logs

4. Session Management

  • Automatic Sessions: Start/end based on drone connection (configurable)
  • Persistent Storage: All sessions saved to Documents/Sessions/
  • Session History: Browse past flights with date/time
  • Export Options: JSON (full telemetry), CSV (tabular), GPX (route)

5. Settings & Customization

  • Logging Frequency: 1 Hz / 2 Hz / 5 Hz
  • Units: Speed (m/s ↔ km/h), Altitude (m ↔ ft)
  • Auto Session: Enable/disable automatic session start/end
  • Event Markers: Toggle event marker functionality

πŸ§ͺ Testing with Mock Drone

SkyTools includes a Mock Drone Service for development and testing:

  • No Hardware Required: Test all features without a physical drone
  • Realistic Simulation: Generates realistic telemetry data
  • Full Feature Access: All features work identically to real drone mode

To enable:

let USE_MOCK_DRONE = true  // In SkyToolsApp.swift

πŸ”’ Privacy & Security

SkyTools is privacy-first:

  • βœ… No User Location Tracking - App does NOT access device GPS via CLLocationManager
  • βœ… Drone Data Only - Only reads drone position from DJI SDK
  • βœ… Local Storage - All data stored locally on device
  • βœ… No Cloud Sync - No automatic data transmission
  • βœ… User-Controlled Export - You decide when to share data

See PRIVACY.md for full privacy policy.


πŸ“ Data Export Formats

JSON Export

Complete telemetry log with all fields:

{
  "sessionId": "...",
  "timestamp": "2026-01-08T10:30:00Z",
  "battery": 85,
  "altitude": 45.2,
  "speed": 8.5,
  "latitude": 55.8642,
  "longitude": -4.2518,
  ...
}

CSV Export

Tabular format for spreadsheet analysis:

timestamp,battery,altitude,speed,latitude,longitude,heading
2026-01-08 10:30:00,85,45.2,8.5,55.8642,-4.2518,180.5
...

GPX Export

Flight route for Google Earth / QGIS:

<gpx>
  <trk>
    <trkseg>
      <trkpt lat="55.8642" lon="-4.2518">
        <ele>45.2</ele>
        <time>2026-01-08T10:30:00Z</time>
      </trkpt>
      ...
    </trkseg>
  </trk>
</gpx>

πŸ› οΈ Development

Project Setup

  1. CocoaPods:

    pod install
    pod update
  2. Xcode Configuration:

    • Open SkyTools.xcworkspace (not .xcodeproj)
    • Select your development team
    • Configure signing & capabilities
  3. DJI SDK:

    • Register at DJI Developer
    • Add App Key to Info.plist (for production)

Code Quality

  • Architecture: MVVM-like with centralized state
  • Error Handling: Comprehensive error states and user feedback
  • Performance: Fixed-rate logging (1/2/5 Hz), memory management (max 1000 records)
  • Documentation: Key components have inline comments

Testing

  • Mock Mode: Full feature testing without hardware
  • Real Drone: Field testing with actual DJI drone
  • Edge Cases: Empty states, disconnection handling, error recovery

πŸ“Έ Screenshots

Dashboard View

Dashboard

Real-time telemetry, KPI cards, and flight summary

Flight Map

Flight Map

Interactive map with flight track, markers, and event points

Flight Logs

Logs

Session history and export options (JSON, CSV, GPX)

System Status

System

DJI SDK connection status and settings

Settings

Settings

Customizable logging frequency, units, and session management


🀝 Contributing

This is a portfolio project, but contributions are welcome:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • DJI - For the Mobile SDK
  • Apple - For SwiftUI and iOS frameworks
  • Open Source Community - For inspiration and tools

πŸ“§ Contact

Bohdan Bozhenko


🎯 Project Status

SkyTools v1.1 - Production Ready βœ…

  • βœ… All core features implemented
  • βœ… UI polished and user-friendly
  • βœ… Privacy-first architecture
  • βœ… Ready for real-world use
  • βœ… Portfolio-ready codebase

Built with ❀️ using Swift & SwiftUI

For DJI drone pilots who want more control over their flight data

About

iOS companion app for DJI drones with telemetry logging, flight analytics and post-flight analysis

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published