Is it me, or is APM code just really hard to find one's way around?

I'm trawling through the APM Arduplane 2.28 code base trying to locate where the PID loops are calculated and hence where the gains applied.

I want to be able to implement a density altitude/Mach/TAS-based factor on the PID gains to allow (simulated) flight at high altitudes, but so far my search for the illusive PID loop code is just frustrating.  Can anyone shed some light on where to look?

My search based on RLL2SRV, pidServoRoll, SERVO_ROLL_P and others as well as just general browsing have lead me nowhere.

Thanks in advance! 

Views: 130

Reply to This

Replies to This Discussion

in the AP_PID library

Thanks Michael!

I'm beginning to get a foothold now and I can nearly see what I need to do!

I see there is already a speed scalar implemented - maybe this is the cause of my problem.

Good - fixed up my little problem! 

 

The scalar limits of 0.5 and 2.0 were causing the problem - well, at least the 0.5 was at altitudes of 80000 feet and more, when TAS goes stratospheric.

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service