Attitude compensated electronic compass for aircraft navigation