diff --git a/FlightKit.xcodeproj/project.pbxproj b/FlightKit.xcodeproj/project.pbxproj index 9786ece..c2aea38 100644 --- a/FlightKit.xcodeproj/project.pbxproj +++ b/FlightKit.xcodeproj/project.pbxproj @@ -176,6 +176,8 @@ /* Begin PBXFileReference section */ B51BDDE0200C9CD500064154 /* SQLInsertAircraftStatement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQLInsertAircraftStatement.h; sourceTree = ""; }; + B51BDDE5200D455600064154 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + B51BDDE6200D4AFE00064154 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = ""; }; B579C9FE200C27B300493754 /* AirplaneControls.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AirplaneControls.cpp; sourceTree = ""; }; B579C9FF200C27B300493754 /* AirplaneControls.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = AirplaneControls.hpp; sourceTree = ""; }; B579CA09200C876800493754 /* DataRecording.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DataRecording.cpp; sourceTree = ""; }; @@ -321,6 +323,8 @@ B5C89E7E1FF433EB002A2A37 = { isa = PBXGroup; children = ( + B51BDDE5200D455600064154 /* README.md */, + B51BDDE6200D4AFE00064154 /* LICENSE.md */, B5C89EF91FF43717002A2A37 /* ObjC Wrapper */, B5C89EE71FF434AD002A2A37 /* Core */, B5C89E8A1FF433EB002A2A37 /* FlightKit */, diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..d133a40 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2018 Daniel Vancura + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..938a5e9 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# FlightKit + +## Purpose + +Open Source SDK for iOS, macOS, watchOS and tvOS to communicate with [X-Plane](http://www.x-plane.com) flight simulator via UDP interface. The SDK is written primarily +in C++11 to be kept mostly platform independent. + +## Components + +- `FKTConnection` - Objective-C wrapper to establish a connection to Xplane from any Apple OS platform. +- `XplaneConnection` - Main C++ component for establishing a network connection to Xplane. +- `DataRecording` - Stream listener for capturing flight data in a Sqlite database. + +## Usage + +X-Plane offers a simple UDP data stream interface. A reference of the data format can be found [here](http://www.nuclearprojects.com/xplane/xplaneref.html). To start sending +and receiving data in X-Plane, go to `Settings` --> `DataOutput` and check `Send network data output`. Enter an IP to send data to (the computer listening to the data +stream) as well as the port to send to. To start reading data as it comes in, open a `FKTConnection` via `- (nonnull id) initReceivingOn:(NSInteger) inPort`. + +To be able to send data to X-Plane you will further have to make sure that the `Port we receive on` in `Settings` --> `Network` is set to `49000` or make sure that you call +`- (nonnull id) initReceivingOn:(NSInteger)inPort sendingTo: (NSInteger)outPort` with `outPort` set to the port next to `Port we receive on`. + +To let *FlightKit* actively request aircraft data from X-Plane (recommended), you can use +`- (nonnull id) initWithIP:(nullable NSString *)ip receivingOn: (NSInteger)inPort sendingTo: (NSInteger)outPort`. The IP you enter will be the IP +of the computer running X-Plane, `inPort` the port set in `Data Output` and `outPort` the `Port we receive on` in `Network`. + +Once *FlightKit* has connected to X-Plane, it will trigger a sound snippet in the flight simulator to indicate the connection. + +## License + +[MIT License](LICENSE.md)