I’ve been trying to teach myself C++ for the past 3 years and I’m wondering how/if I’d be able to access the API. I had an idea the other day to make some sort of C++ flight-helper tool, that I would run on my laptop as I fly. The idea was there but the actual way I thought this would be done involved periodically entering details about the plane as I was flying… which would be a complete failure. I also considered trying to emulate an FMC in some basic program, but it would be too useless to be worth it. Having found out about the API, it looks like the perfect tool to use.
I am not an app developer, nor will I end up making an app for infinite flight - as I don’t have the skills to do that yet - but I would love to take a look at the API and see what I can do with it!
Hello Lewis …
Try contacting Matt ( Developer ) through PM to take a look at the API. I’m pretty sure he’s the right person for it.
Hey Lewis - what you’re interested in building sounds like it would be best suited for the Connect API (it’s local, over TCP).
I built LiveFlight Connect based on this, open sourced.
The Windows version is in C#:
OS X has networking stuff in Objective C (which uses lower-level C, which is more similar to the C++ you’ll be dealing with):
It’s pretty much self documented - just sending JSON encoded commands (needs to be sent as a 4 byte int with little endian headers).
The alternative API is the REST API, but this returns data that probably isn’t what you’re looking for (it is easier to work with, mind you). You’d need to request an API key for this.
Feel free to drop me a message if you need any help :)
Thanks for the info. As I’ve said, I can’t make an app like LiveFlight! Which is the API that allows a development pc to connect to Infinite Flight open on another device (locally) and get info like altitude, heading, speed etc?
That the key is required for?
Oh, is Connect open source!?
Example projects which document it are. Check out the first two links I posted as well as:
Right, so I’ve been asking for access to an open source api! xD Thanks for your help - I did look through that repo, but I could only find networking stuff, so dismissed it as the wrong one! Only just now I’ve found latitude longitude, gearstate etc - that’s what I’m going for! Thanks again for your help. Sorry for wasting time, and post space xD
If you ever want to learn Java or LUA. hit me up
Thank-you :) I will get to Java one day, definitely.
No worries. Drop me a PM if you need any help.
Just had a good session trying ti get to know the API, and trying to fly using Matt’s xaml window example. Lots of clicking.
Anyway, I think it’s just C# I’ll have to get used to, in order to be able to make something - I don’t know what bits of Matts code I can change and what bits I can’t, without breaking everything! I found MainWindow() and started outputting stuff to the console, and made a new APIAircraftState object. I tried outputting APIAircraftState.AltitudeAGL to the console in a while loop, and watched the value as I took off in an F22. Just stayed at 0. I’ll have a snoop around LiveFlight - see how/where that’s done :)
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.