Dear community, I am trying to build AI Flight Planner button in Mission planner Plan tab which receives 3 clicked waypoints in plan tab by operator and then operator clicks AI Planner button which opens chatbox where operator types commands and it is sent to backend (with openAI API) which generates waypoints for one type of vtol specs which is fixed in backend. and it sends waypoints back to plan tab and should insert but now , showing 15-20 waypoints in bottom but nothing in map
- Mission Planner v1.3.82 build 1.3.9398
- Custom plugin: AIPlannerForm
- On Plan tab, add 3 points (takeoff, mission center, land).
- Open AI Planner, type mission prompt, click Send Plan.
- Backend (OpenAI) returns JSON (~12–20 waypoints).
- Rows appear in Commands table, but only Home is visible on the map.
- Clicking Write → error:
ArgumentNullException: Value cannot be nullinFlightPlanner.getCmdID(JsonConvert.DeserializeObject(...)).
Expected
Generated waypoints should appear on both the grid and map, and Write should upload the mission.
Actual
- Grid shows waypoints, map shows only Home.
- Write fails with
ArgumentNullException.
What I tried
- Inserted rows directly into Commands grid.
- Tried refreshing map (Invalidate/ReloadWaypoints/etc.).
- Logged cell values.
- Used reflection to update pointlist (unstable).
Hypothesis
- Write expects a valid Command value.
- If Command cell is null/empty or wrong format,
getCmdIDcrashes.
Questions
- What exact format does the Command column need (e.g.,
"WAYPOINT", JSON, object)? - Does Write build the mission from Commands grid, pointlist, or both?
- What’s the correct API/helper to insert waypoints so both map + UI stay in sync?