It would be nice if the Get Flight Plan can accept a list of flight ids, maybe comma separated or as an array.
Example: https://api.infiniteflight.com/public/v2/flight//flightplan?id=12312541&id=9877835&id=219873
I believe this can be a fairly frequent use case and would help, especially after the removal of the Get All Flight Plans endpoint which is currently deprecated.
I am currently reworking on my bot with Discord 13 features. I used the previous Get All Flight Plans to fetch the route of each user.
So after the deprecation of that endpoint, I am paginating the results to 10 for each āpageā (The next 10 are fetched after a button click after the message) to reduce the response time on my bot as well the load on the IF servers. So it would be quite nice to be able to fetch all of those 10 flight plans together.
i donāt know how frequent this use case would be though, haha.
Iāve been doing some Public API work recently and this looks like an interesting feature. Would you mind adding it to the API Trello board? This is mostly where I look when I decide what to implement. You may also notice some things in the āDoneā column that we havenāt announced yet - all in due course š
Hey Kai, I had actually put a request like this on the board a while back, but it seems to have been moved into the āWonāt addā category. Has the verdict changed since then?
The main reason we deprecated the endpoint that used to do this and the reason why weāre reluctant to implement it again is because we store flight plan individually. Theyāre stored in a key-value fashion, and we can only look them up individually - itās not like a database where we can get them all at one. That means itās a lot of time, computing power, and bandwidth to get multiple flight plans. If I were to implement an endpoint like this where you can request multiple, Iād have to do some testing to see what is fast but Iād probably cap it at like 5 or 10 per request, and of course youāve still got the rate limit.
If you like, perhaps you could give some more details on your use case and Iāll see if thereās any other way it can be done.
Itās been a while since I made that request so I forget what exactly I wanted to do, but I think I was trying to calculate ETAs for flights using the waypoints in their flight plan at a scale of more than just one flight per request. I wanted to do this to get more accurate ETAs as going from point A to point B might not account for the in between difference. For example:
Straight line distance from EHAM to KATL is 3815nm.
With a more thought out flight plan, including waypoints, approaches, etc., this distance is closer 4000nm.
This could be scaled up to make the difference greater depending on the FPL
I guess, shortly put, I was looking for a way to calculate flight times more accurately. Of course this is not factoring in other variables such as wind and speed changes, but itās a start. Maybe there is a better way of doing this?
Hi Ethan,
I was thinking about this problem, and I found the best solution would be to create a distance calculator for yourself with one of the existing great circle distance calculators. And this can be called for all waypoint pairs to calculate the distance almost accurately. Iām using the Haversine formula for calculation, not sure about which one IF uses, but it seems pretty accurate.
If you donāt mind me asking, why not just do this on-demand on a per-flight basis? Itās a fairly quick calculation, at least the ones Sanket has provided are.
That brings me to another question Kai. The code for calculating distances that I have currently, donāt take into account the bulges of the earth. Would it be possible for you to share the formula used for the calculation between two coordinates in the Infinite Flight App?
Yes, that would work in most cases, but one case iām thinking of in particular is getting a list of inbounds for an airport, then displaying that list with ETAs for each (even if only the top 10-20 were more accurately calculated). What I have now works just fine (calculating from point a to b with curvature taken into account), just was curious when I saw this topic open and you mentioning to add it to the board.
Unfortunately thatās proprietary code, as we use our own algorithms that are specific to our use case. Any great circle formula should work. For instance, for the new version of LiveFlight weāre using āarcā NPM package which is working fine.
Just spoke to Cam about this. Weāve got an endpoint in our internal API that does what youāre after. Would you mind adding a Trello card with your exact use case (or link to this thread) and Iāll take a look when I get a chance.