Hello everyone,
I have a Hardware in the Loop system that includes ArduPilotMega with ArduPlane 3.2.2 and FlightGear flight simulator running in Windows computer.
I noticed that 'MAVlink.xml' and 'FGShim.c' files which were used to interface FlightGear and ArduPilot. Both of these files indicated that 'airpseed' was not transferred from FlightGear to the ArduPilot. Yet ArduPilot ground station (Mission Planner) shows airspeed value. However, this airspeed looked incorrect and was always equal to groundspeed.
Then, I introduced various wind in FlightGear. I observed both airspeed and groundspeed in ArduPilot groundstation as well as FlightGear. While FlightGear correctly showed airspeed and groundspeed in accordance with wind, the Mission Planner did not.
I came to the conclusion that, airspeed is not integrated in the Hardware in the Loop simulation at all. The AutoPilot is still showing airspeed. This looked incorrect to me.
I made an attempt to modify both 'MAVlink.xml' and 'FGShim.c' files such that FlightGear transmitted airspeed to the ArduPilot. However, with modified files I did not get airspeed in the Mission Planner readings.
I would like to ask following questions:
1. Have anyone transmitted 'airspeed' of FlightGear to the ArduPilot?
2. Is changing 'mavlink.xml' and 'FGShim.c' files enough to integrate 'aispeed' in HiL mode?
3. Do I need to modify 'Mission Planner' source code in addition to 'MAVlink.xml' and 'FGShim.c' files?
4. If I need to do further modifications in groundstation software, is it easier to work with 'Mission Planner' (Windows) or QGroundControl (Linux)?
Note: In my opinion this is a typical problem and incompleteness of Hardware in the Loop simulation. Many people will need to use true 'airspeed' if they are to develop full simulation. Anyone with idea please contribute to this discussion. Once I get it working, I will write up a full instruction to deal with this type of problems.
I would like to request HiL DEVELOPERS to add answer to this problem.
I have attached modified MAVlink.xml and FGShim.c files below.
Replies