Skip to content

StateMachineJunkie/OpenSkyFlightTracker

Repository files navigation

OpenSkyFlightTracker

Overview

This project contains a test or sample program for my OpenSkyAPI package. It demonstrates how to leverage said package to get flight information within a given region of a provided user-location and then display flight details and tracking for a selected flight.

For a detailed description of OpenSkyAPI and OpenSky-Network, follow the link for the package.

OpenSky-Network Account Required

Note that you will need a valid username and passsword for OpenSky-Network.org. Visit the site and tap the Register button to be taken to the registration page. Without a valid account and credentials, most of this code will not work for you. Some of the API calls do not need authentication but most of the ones I use, do.

Once you have a valid set of credentails, update the ProdNetwork.xcconfig file with the username and password then you can successfuly compile and run the application.

Apple Frameworks, Technology, and Techniques

This program and its associated package make use of the following Apple frameworks, technologies and techniques:

See the implementation of this program and its associated package for details.

App Behavior and Usage

When the app first starts up it will display flights in a 200 square kilometer region around the current location of the device. While the app is busy a generic activity indicator will be displayed in the center of the view. At the bottom you will notice a small overlay containing a Refresh button and segmented buttons that allow you to filter the flight display. You may tap the Refresh button at any time in order to fetch updates from the network. New flights will be added, old ones will be removed, and existing filghts will be updated as regards position and altitude. You can also apply an Airborn or On Ground status filter to the diplayed flights. The default state is for no filter to be applied, which is indicated by All.

Initial view after app load

You can select a flight by tapping one of the plane icons on the map. Once selected, the plane will change to the selection color and, at the bottom of the map, you will see an overlay containing flight details.

View with selected flight

Once you have a flight selected, a TRACK button will appear in the overlay. Tap it to show the tracking or location history for this flight by the OpenSky-Network.

View of selected flight with tracking turned on

In every view of the map, pinch/zoom is supported. I have not implemented MapKit Annotation Clustering for this sample. If this were a real app, I would do so but with a better design for the annotation to signify to the user that this icon represents a cluster of flights.

Zoomed in view

Error Handling

Currently errors are logged to the console. If something is wrong or does not seem to be working, check there.

TODO

  • The Refresh and Track buttons should be mutually exclusive.
  • I need to fix the flight selection bug which requires a user to deselect the current flight by tapping the map background before selecting another flight to monitor or track.
  • Display any thrown errors to the user via popup.
  • I am considering the addition of MapKit Annotation Clustering. But it is not really necessary for this sample app and I'm trying to avoid gold-plating.

License

OpenSkyFlightTracker is released under an MIT license. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages