My team is using paparazzi to fly a quadrotor vehicle (Booz board) and we are having trouble with our flight plan. When we compile, there are many errors relating to redefinitions of navigation-related functions (such as WaypointX and so on). This results from having two or more copies of navigation code, in the firmwares/rotorcraft directory (navigation.h) as well as in the subsystems directory (nav.h) and subsystems/navigation directory (common_nav.h).
Can you be a bit more specific? You should not get compilation errors, works fine here... Unless you are using fixedwing stuff as well.
1) Why are there three apparantly conflicting copies of navigation codes around?
The navigation code for fixedwings and rotorcrafts is different (obviously has to be in some places, since fixedwings can't hover, etc.). A lot of basic routines are the same though.
2) Which one should I be using?
The firmwares/rotorcraft/navigation.h is for rotorcrafts obviously, and not so obviously the subsystems/nav.h and the ones in subsystems/navigation directory are for fixedwings.
3) How would I select which navigation code to use?
For fixedwings you include the navigation subsystem (which is just a makefile conf/autopilot/subsystems/fixedwing/navigation.makefile).
For rotorcrafts the basic navigation is currently already included in the firmware makefile (conf/autopilot/rotorcraft.makefile).
This comment pertains to the INS horizontal flilter, hence it is also in that section. It works but is not really nice...
New filters, improvements, etc. are always welcome :-)
Any help straightening this out is greatly appreciated
Some more comments on the difference between fixedwings and rotorcraft... fixedwings use UTM as navigation coordinate system, rotorcrafts use a local NED navigation coordinate frame. Also for fixedwings we have different variables for e.g. altitude (estimator_z ...) than for rotorcrafts (ins_enu_pos.z).
We want to do away with this and provide a general "state interface" that is then used by fixedwings and rotorcrafts.
Also see
http://paparazzi.enac.fr/wiki/DevGuide/StateInterface for a collection of thoughts on this.
Cheers, Felix