How do I set the EKF2 position parameters in reference to body frame? Is 0, 0, 0 assuming the sensor position is at the center of the body frame? For example if the IMU is not in the center of the quadrotor will populating these parameters with centimeter accuracy help achieve a more accurate solutions? I’m trying to achieve the most accurate vehicle position and attitude possible for a mapping application.
Yes, if your IMU is far away from the CoG correctly defining the IMU offset will greatly increase the estimator performance. The parameters are defined as the distance from you CoG to the IMU in meters with the x axis pointing towards the front, y axis pointing towards the right and z axis pointing downwards.
(You can also set the distance from the CoG to the GPS unit in the same way)