[REPORT] Calculating Angle of Attack from .yfs File Data

YSFlight general discussion & everything in between
Post Reply
User avatar
decaff_42
Staff
Staff
Posts: 3562
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 625 times
Been thanked: 1363 times
Contact:

[REPORT] Calculating Angle of Attack from .yfs File Data

Post by decaff_42 » Mon Nov 16, 2015 12:07 am

For those of you who would like to learn more about how YSFlight records data and how this data can be extracted to derive aircraft performance parameters, please read my 3-page report on using Euler Angle Rotation. You can also download a code sample of how I did this for Excel VBA.

Visit My Site Here
(PDF updated with 3x3 Combined Rotation Matrix)
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1270
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 759 times
Been thanked: 280 times
Contact:

Re: [REPORT] Calculating Angle of Attack from .yfs File Data

Post by u2fly » Mon Nov 16, 2015 1:14 am

I only reccomend you make it in LibreOffice or Gnumeric, and drop it dependency to MS Excel VBA.

Test this online convertor:
http://www.business-spreadsheets.com/vba2oo.asp
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [REPORT] Calculating Angle of Attack from .yfs File Data

Post by Flake » Mon Nov 16, 2015 2:42 am

That's some dank matrix mathematics yo!
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
decaff_42
Staff
Staff
Posts: 3562
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 625 times
Been thanked: 1363 times
Contact:

Re: [REPORT] Calculating Angle of Attack from .yfs File Data

Post by decaff_42 » Tue Nov 17, 2015 12:25 am

OfficerFlake wrote:That's some dank matrix mathematics yo!
Thanks! As soon as I realized what was going on, I knew I needed to do something like these, but then I remembered a course I took in school about GPS and stuff like that and boom... Euler Rotations FTW :D
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1270
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 759 times
Been thanked: 280 times
Contact:

Re: [REPORT] Calculating Angle of Attack from .yfs File Data

Post by u2fly » Tue Nov 17, 2015 10:13 am

@decaff_42,
Think you must use sans font in you PDF documents generated from LaTeX.
For this your tutorial it's not good readable on PC screens.
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
decaff_42
Staff
Staff
Posts: 3562
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 625 times
Been thanked: 1363 times
Contact:

Re: [REPORT] Calculating Angle of Attack from .yfs File Data

Post by decaff_42 » Sun Nov 22, 2015 12:57 am

I have successfully gotten a combined 3x3 rotation matrix to work and calculate AoA and AoS with zero error compared to 3 single rotation matrices. I did a few trial calculations to see what difference it made and found approximately 0.85% savings in time for a 8600 frame trial (500 seconds of full-speed YSF flight data). I eliminated everything but the AoA calculations, to keep the number of actions as low as possible.

I will update the PDF with this new information later this evening!
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests