Skip to content

Primary Flight Display Graphics Framework for Mac + iOS

License

Notifications You must be signed in to change notification settings

Tapestes/PrimaryFlightDisplay

 
 

Repository files navigation

PrimaryFlightDisplay

This fork is a Swift Package Manager implementation, with the bare minimum files.

License MIT

PrimaryFlightDisplay is a Mac + iOS framework for use in ground control station and telemetry systems for micro UAVs (unmanned aerial vehicles).

The framework enables convenient embedding and animation of a primary flight display. Styles and colors are easily tuned whilst maintaining crisp graphics for any screen resolution.

Screenshot

Features

  • Artificial horizon
  • Pitch ladder
  • Bank indicator
  • Heading tape indicator
  • Airspeed / Groundspeed tape indicator
  • Altitude tape indicator
  • Crisp procedurally generated graphics
  • Highly configurable colors, sizes, and tape indicator scales
  • No library dependenices other than Apple's SpriteKit
  • Flight stack and protocol agnostic
  • Compatible with MAVLink

Requirements

  • iOS 9.0+ / Mac OS X 10.10+
  • Xcode 9.3+

Installation

Usage

Construct a new PrimaryFlightDisplayView with default styles, and add it to your view hierarchy.

let flightView = PrimaryFlightDisplayView(frame: frame)
flightView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
addSubview(flightView)

Send flight data to the primary flight display using the following API methods. The new flight data values will be animated immediately.

    flightView.setAttitude(rollRadians: Double(1), pitchRadians: Double(1.5))
    flightView.setHeadingDegree(Double(300))
    flightView.setAirSpeed(Double(20))
    flightView.setAltitude(Double(165))

Custom Styles

The styles for the default primary flight display are easily tuned, see Settings.swift for all tuneable styles.

See the blog post and example project MavlinkPrimaryFlightDisplay which demonstrate how to create the primary flight display in the screenshot below.

Screenshot

Contributing

Pull requests are welcome on the master branch.

About

Primary Flight Display Graphics Framework for Mac + iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%