Hi guys,
I’m trying to simulate a swarm of drones by integrating ardupilot into the Omnet++ simulation environment attempt to minimize changes to ardupilot code. Examining the ardupilot’s source code (arducopter sketch) I noticed a global variable “Copter copter;” inside Copter.cpp file that depict drone itself and is used in serveral files.
In Omnet++ I have one process which controls the whole simulation and makes multiple instances of drones, so AFAIK I must make the copter variable local in order to avoid having the same global variable shared between drones. Unfortunately this change lead to modify several code inside ardupilot project.
Someone can tell me if there is an alternative approach to resolve this problem?
Thanks in advance