How to add waypoints via Connect API (V1)

Hey all,

I am trying to add waypoints to the flight plan via IFC-Evolved (GitHub - Sam-Neale/ifc-evolved), for IFFMC (IFFMC Reborn). However for some reason the following code does not add waypoints:

IFC.sendCommand({
    "Command": "Commands.FlightPlan.AddWaypoints",
    "Parameters": [{"WPT": "KLAX"}]
});

I’m really not sure why this is occurring, as I believe I am adding these correctly. Yes, I have checked that other commands (including clearing the FPLN) work, but this one in particular seems to not be working.

Anyone have any ideas?

1 Like

I had to dig up a bit in an old code base from one of my apps to get a lead.
It seems that with the API v1, to use the add waypoints, you should send the command in this format :

{ 
    "Command": "Commands.FlightPlan.AddWaypoints",
    "Parameters": [ { "Name": "WPT", "Value": "KLAX" } ]
}

(It expects in each object of the array two strings tied to the keys “Name” & “Value”)

I hope it works :)

2 Likes

Legend! That worked! Thanks a lot, was starting to go insane lmao

Follow up question, how do I handle duplicate waypoints?

Take the example of JELLI a waypoint on the Runway 25 approach into YSSY, there is a waypoint by the same name in South America, how should I go about making sure the Runway 25 one is chosen over the SA one.

There is, unfortunately, no direct method, through the API, to solve this problem.


Currently, nor the API v1 nor v2 offers an “endpoint” allowing us (third-party devs) to run a search to fetch a list of navigational “points” (such as VORs & waypoints) based on a regular string or regex.

I doubt IF will expose such an “endpoint” for the Connect API. A couple of years ago, they started to use Navblue as their primary source of navigational data (source: IF’s front page). You can now see where lies the issue… We could otherwise quickly reverse engineer Navblue’s entire Navigation+ database for free.


To solve it then, you must then use your own nav database. If the name can be found repeatedly, you can then send a lat/long coordinate to infinite flight instead of a “simple” name.

To garner the necessary data you can use this repo (IF’s original source before Navblue) which is maintained primarily by volunteers from the IFAE team :

NOTE : I have not linked the latest version. Several JSON files were deleted (e.g. Fixes.json) for no explicitly stated reason after a PR two months ago (07/09). ​


Alternatively (or as a complement), after you have set the flight plan, you can query the API for that FPL (with all the “proper” coordinates). From there, you can analyse it for any suspicious entries based on the coordinates provided.

Great. Welp, that sucks. I get why, don’t get me wrong, but it still sucks a lot.

As the person who deleted said files, I did so because they were redundant and no longer being updated 🙂

1 Like