Reposition Aircraft
msfs_set_aircraft_positionReposition an aircraft in Microsoft Flight Simulator for test scenarios. Sets latitude, longitude, altitude, heading, pitch, bank, airspeed, and on-ground state, then verifies the position read back from the sim.
Instructions
Reposition the aircraft (test scenario setup).
Uses SimConnect's SIMCONNECT_DATA_INITPOSITION, which repositions the aircraft atomically. Writing PLANE_LATITUDE/LONGITUDE individually, as this used to, is unreliable and cannot set the on-ground state.
The response reports the position read back from the sim after the
move, in latitude/longitude/etc -- never the request, which is
echoed separately under requested for comparison. A field the
read-back could not confirm is null (and listed in unverified), not
silently replaced by what was asked for. status still reports "ok"
since the reposition command itself may well have succeeded even if the
confirming read did not; check unverified/warning for that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bank | No | Bank in degrees | |
| pitch | No | Pitch in degrees | |
| heading | No | Target heading in degrees true. Omit to keep the current heading. | |
| airspeed | No | Target airspeed in knots (0 for a stationary placement) | |
| altitude | No | Target altitude in feet. Omit to keep the current altitude. | |
| latitude | Yes | Target latitude, degrees | |
| longitude | Yes | Target longitude, degrees | |
| on_ground | No | Place the aircraft on the ground at the position |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |