This is what I have :
void GAUGE::clbkPreStep(double SimT, double SimDT, double MJD) {
//double pitch = 0.5 + (GetPitch() / 2 * PI);
//1rad × 180/π 0.5 + (GetBank() / 2 * PI)
//SetAnimation(anim_pitch, pitch);
//double roll = 0.5 + (GetBank() / 2 * PI);
//SetAnimation(anim_ROLL, roll);
double pitch = GetPitch();
double roll = GetBank();
anim_pitch_state = 0.5 + (pitch / (2 * PI));
anim_roll_state = 0.5 + (roll / (2 * PI));
//if (anim_roll_state > .99)anim_roll_state = .99;
//if (anim_roll_state <=0 )anim_roll_state = 0;
sprintf(oapiDebugString(), "pitch %FF bank %ff ", anim_pitch_state, anim_roll_state);
SetAnimation(anim_pitch, anim_pitch_state);
SetAnimation(anim_ROLL, anim_roll_state);
}
void GAUGE:

efineAnimations(void)
{
anim_pitch = CreateAnimation(.5);
anim_ROLL = CreateAnimation(.5);
ANIMATIONCOMPONENT_HANDLE GUAGE1;
static UINT rollGrp[1] = { 4 };
static MGROUP_ROTATE ROLL(0, rollGrp, 1, _V(0, 2, 0), _V(0, 0, 1), (float)(120 * RAD));
GUAGE1=AddAnimationComponent(anim_ROLL, 0.0, 1, &ROLL);
static UINT PITCHGrp[1] = { 2};
static MGROUP_TRANSLATE PITCH(0, PITCHGrp, 1, _V(0, -4, 0));
AddAnimationComponent(anim_pitch, 0.0, 1, &PITCH, GUAGE1);
}
I guess once this is figured out and reduce the size to fit on the copter dash. I can add a mfd mesh group but no clue about LUA. I guess some of the other gauges may need to be redone