Wet Compass Help

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
SmokeMakerJr
Posts: 2
Joined: Sun Jan 31, 2021 1:46 am

Wet Compass Help

#1 Post by SmokeMakerJr »

Hi Guys,

I've been having a hard time recently with pulling and adapting some code from ADNSS's Generic Wet Compass. I am currently attempting to replicate the idea onto a Sperry A/P system for the DC3 (among others). I've made all the PNG files with Skinman and have loaded them up in AM. Here is where I am rather stuck and would appreciate some help. The following is ADNSS's Wet Compass Code:
"move(img_comp_drum, -497 + hdg * 501 / 360, nil, nil, nil)"

I can infer that the -497 is the starting position of the PNG, but does anyone know where the 501 and 360 are coming from.

Thanks for your help in advance guys,

Cheers :)

(PS, A little preview)





2021-01-31.png

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

Re: Wet Compass Help

#2 Post by Sling »

Hi and welcome to the forum,

I haven’t got the instrument in front of me but this is pretty straight forward and common place code you may find in an AM instrument. The 501 is the number of pixels the image will move from one end to the other end of its scale. The 360 is simply the full revolution of a compass in degrees. So as an example when the heading is at 180 it moves 180/360 or 1/2 of the 501 pixels.

I hope this helps.

Tony

SmokeMakerJr
Posts: 2
Joined: Sun Jan 31, 2021 1:46 am

Re: Wet Compass Help

#3 Post by SmokeMakerJr »

Hi Tony,

Thank you for your prompt reply. Yeah I was thinking there would be a simple explanation for it! So with my Compass, the image is 1000 pixels long, with the midpoint being 500px. I guess I will just have to plug the numbers in and try it out!

Thank you again,

Joshua

Post Reply