Skip to content

SIM_XPlane: Check if a docker container is being used.#32218

Open
KevinShek wants to merge 1 commit intoArduPilot:masterfrom
KevinShek:docker_container_check_for_xplane
Open

SIM_XPlane: Check if a docker container is being used.#32218
KevinShek wants to merge 1 commit intoArduPilot:masterfrom
KevinShek:docker_container_check_for_xplane

Conversation

@KevinShek
Copy link

This PR aims to address the following issue #20471 (comment). A docker container with ArduPilot is able to receive data packet from X-Plane 11 but unable to send commands to X-Plane 11.

A check was added to see if a docker container is being used and if it is then it does not execute the following function last_recv_address. This is due to how docker sends data packet coming from Windows to the docker container and assigned it a different IP address than the actual Windows IP Address.

Changes:

  • Added file SIM_Docker.h
  • Added file SIM_Docker.cpp
  • Modified file SIM_XPlane.h
  • Modified file SIM_XPlane.cpp

Reproducing the issue:

Running the following commands within a docker container with ArduPilot with a port open to "49001:49001/udp" for X-Plane.

sim_vehicle.py -v ArduPlane -f xplane --map --console 
sim_vehicle.py -v ArduPlane -f xplane --map --console --sim-address <PC's IP Address>

Fixes:

Running the following command allows the user to use the IP address they want to send data too.

sim_vehicle.py -v ArduPlane -f xplane:<PC's IP Address> --map --console

Additional possible issue:

The following warning appears in the terminal when connected to X-Plane, but X-Plane was able to receive commands from SITL:
"Warning, time moved backwards. Restarting timer."

@KevinShek KevinShek force-pushed the docker_container_check_for_xplane branch 3 times, most recently from a5f9ac5 to c2a295d Compare February 16, 2026 22:04
…ot based on the IP from the listening port.

Added a check for docker container so that connection was not based on the IP from the listening port due to docker uses a gateway IP address.

added in the missing ;
@KevinShek KevinShek force-pushed the docker_container_check_for_xplane branch from c2a295d to f2217a7 Compare February 17, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant