Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XML math for attitude flight director linkage bars

Featured Replies

HiI have been trying to create the code for the two small bars that drives the flight director, but no success yet. Or, limited success only.What I'm looking for is the math needed to shift these bars horizontally and vertically so that their top link is located at the same spot the flight director is located during it's pitch shift and bank rotation.How do I need to "think" math, in order to make this work properly?See the picture on what actually happens currenyly at great bank and pitch angles, and the txt file for the current code for this part (linkages and flight director bar).Any suggestions?

Is this assembly a parallelogram? If yes:let r be the half horizontal distance at bank 0. then the y shift is the pitch+sin(bank)*r the x shift is -r*(1-cos(bank)) (left linkage) and r*(1-cos(bank)) (right linkage)I hope I got the directions right, maybe it's -bank.Arne Bartels

I reread your code and it looks OK I think. Have you checked the Scales? Arne Bartels

I have tried modifying the scales, and I'm only getting back to where I am now, roughly. I didn't check my maths against your suggestion, I assume yur statement "looks Ok I think" is good enough for me :)And it does move sortof correctly for medium banks and pitches. When things get extreme though it dissconnects the links badly.I guess what I have been able to setup is a parallelogram movement, but I'm not considering that the links are in fact connected to a V rather than straight line.So, how do I take the V shape (creating offsets) into account?

Hm, didn't thought properly about it. Finally I might have some time to spare (first half of last years holiday).It is based on the Baron attitude indicator? I'll play around with the bitmaps and dimensions, or mail me your stuff and I have a look.Arne Bartels

To take V shape into account you can "prerotate" by adding (subtracting) the half V angel and work with the lengths of the legs as radius.Arne Bartels

  • 4 weeks later...

Sorry for being so stupid :) I've tried a few "rotations" but I'm not getting anywhere with it. If doing this rotation stuff, how do you add these calculations into the vertical and horisontal for the linkage bars? Do you have an example, or how you would go at it?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.