I have big plans for it, the most challenging being basic FBW, specifically the roll channel.
As I mentioned before, XML is not my area of expertise.
According to the FCOM and other sources, the primary flight computers (PFCs) maintain bank angle when:
- —Yoke is neutral
—Bank is less than 33 deg either side
—PFCs are connected (mapped to avionics master switch)
Some psuedocode I’ve thought out is below.
- Code: Select all
if ((abs(aileron_pos) < 0.1 ) && (abs(bank_deg) < 33) && (AV_MASTER=1))
{
tgt_bank=bank_deg;
if(bank_deg > tgt_bank)
{
aileron_trim - 0.2 * abs(tgt_bank - curr_bank);
}
if(bank_deg < tgt_bank)
{
aileron_trim + 0.2 * abs(tgt_bank - curr_bank);
}
}
else
{
aileron_trim=0;
}
Could I get help for implementing this in XML?
Thanks,
zachary77