Extracting pitch,roll,yaw,throttle data from Controller real time

In my university research I’m trying to extract the pitch,roll,yaw,throttle data from the controller using the mission planner source. But so far I was unable to find the code segment where these values are received. Can someone please help me with this?

please have a look at this page
http://ardupilot.org/dev/docs/buildin-mission-planner.html#building-the-simpleexample