Course Deviation line in 'dots'

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
Roxus
Posts: 58
Joined: Wed Sep 02, 2020 7:30 pm

Course Deviation line in 'dots'

#1 Post by Roxus »

Doing an HSI and I see the relevent XP11 datarefs are nav1_hdef_dot and gps_hdef_dot (and others etc)

I have yet to do the maths on moving the deviation line the "percent" these datarefs represent, thats not a big deal.

The issue I have is how is it normally done when the course is rotated from N (zero).

Do you normally do some sin()/cos() to work out how much to move the image of the deviation line after rotating it (or before, I guess it doesnt matter what orders its done?) ?

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Course Deviation line in 'dots'

#2 Post by Sling »

Yep a bit of trig maths is how it’s done in a few instruments. Take a look at the store instruments to see exactly how it’s done.

A word of caution though. If you plan to use the new animation features the trig method produces some weird cdi bar movements while in transition. I’ve recently come up with another solution that requires no trig maths to overcome these limitations.

Tony

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: Course Deviation line in 'dots'

#3 Post by JackZ »

Great!
Really comforting to know that Tony has actually come to a solution. This simple fact actually solves the whole issue and the problem of the OP, as usual.

For my part, I am pleased to announce that I solved the problem of hunger in the whole world, and the end of all wars at the same time, and without any money involved.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Course Deviation line in 'dots'

#4 Post by Sling »

JackZ,

Why this tone. This is generally not like you. Surprised to say the least.

I answered the question actually. Yes the trig method can be and is used was my answer. I offered the extra information as it just so happens I came across the animation problem recently. When I posted I was not at my sim machine and so I was never going to post a full chapter and verse solution but simply offered the extra piece of information so the OP is aware.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Course Deviation line in 'dots'

#5 Post by jph »

JackZ wrote: Thu Jul 22, 2021 9:39 am Great!
For my part, I am pleased to announce that I solved the problem of hunger in the whole world, and the end of all wars at the same time, and without any money involved.
;) :lol:
Joe. CISSP, MSc.

Roxus
Posts: 58
Joined: Wed Sep 02, 2020 7:30 pm

Re: Course Deviation line in 'dots'

#6 Post by Roxus »

Sling wrote: Thu Jul 22, 2021 3:01 am Yep a bit of trig maths is how it’s done in a few instruments. Take a look at the store instruments to see exactly how it’s done.

A word of caution though. If you plan to use the new animation features the trig method produces some weird cdi bar movements while in transition. I’ve recently come up with another solution that requires no trig maths to overcome these limitations.
Sorry, borked my back that weekend and been laid up for 2 weeks.

I dont think I'm encountering the animation feature (I didnt lookup to see what is new) but I did find that all my rotate and translate were a little jerky.
I see the XP11 data thats relevent for this updates VERY often and thought maybe its just too much, too fast.
I put in a little optimization to not do anything unless the values changed significantly enuff and it seems smoother now (to me, could be PC performance anxiety, IDK)

Post Reply