Calculating Yaw Setpoint

I have a simulation model of a hexacopter and have integrated the MC_Attitude_Control Code. However, my setpoints are not matching those from the ulog. I understand the quaternion control theory but I am missing the bit that translates a value between -1 and 1 from the RC controller into -v_att_sp.yaw_body so that I can calculate my q_d. If q_d is calculated first and the euler angles from that where is that calculation.

Is it that no one knows the answer, nobody cares to answer, or I should already know the answer?

I have a simulation model of a hexacopter and have integrated the MC_Attitude_Control Code.

What do you mean with “integrated the MC_Attitude_Control Code” ?

my setpoints are not matching those from the ulog

What do you mean with your setpoints not matching those from the ulog?

I am running a simulation. Within my simulation I have the flight physics of a hexacopter. I was originally notified that the end customer was using the Attitude Controller from PX4 to control the aircraft. As such I took the MC_Attitude_Controller and the relevant parts of the PX4 need to make it run and compiled it into a library that would then drive my physics model. That is if I put a set-point demand into it, I would get the 4 actuator values needed to drive my model. That worked fine taking a desired attitude and heading, calculating the quaternions for them and driving the attitude controller.

When I compared the real flight data to the simulation model, however, what I thought were the setpoints coming from the RC controller did not tie up with what I expected from the simple attitude approach. It seems that there is some significant conversion between roll pitch yaw sticks and throttle from the RC controller and the roll pitch yaw and throttle setpoints used by the Attitude controller. It is these that I am struggling to find in the code. Obviously it is not part of the attiude controller, so even in simple attitude control mode there is something else that is determining from the stick positions what the actual attitude angles are. It is the location and formulae for this that I am looking for. I understand how the Roll and Pitch Work (although I have done that through elimination not by finding the code) but I am lost for yaw.

If somebody could point me to where the RC inputs are converted to attitude setpoints, that would be great.

Is this what you are looking for?