ADF Card jumps when turned [SOLVED]

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
Thair.nl
Posts: 144
Joined: Thu Apr 07, 2016 8:27 pm
Location: EHRD
Contact:

ADF Card jumps when turned [SOLVED]

#1 Post by Thair.nl »

I am in the process of creating analog instruments for a Cessna 182 MIP. When creating the ADF Gauge I noticed something strange which I cannot figure out or explain. When turning the OBS Card 180 degrees that card moves one position up and to the left. I tried several "tricks" within SkinMan (position one less horizontally and vertically, creating hte card one larger horizontally and vertically) and also fiddled with the values within the Lua script. All to no avail.

I then checked the ADF gauges downloaded from the website (Cessna 172 version by Jason Tatum and the Cessna 172 Complete panel by Russ Barlow) and they also have the same behavior. Normally you will not make a 180 degree turn and I only noticed it while testing, but even when you make a slow turn the OBS Card will move out of position at some point and the card is not centered anymore (visible by being off center from the cover).

My instrument has a size of 318x318. The inside of the instrument is located 24px from the top and the left and has a size of 270px. The card is located 26px from the top and the left and has a size of 266px. Within Air Manager I use the "img_add" command from the API with the values "0, 0, 318, 318" and I rotate the card with the command "img_rotate (ADF_Card, ADF_Heading * -1)".

Has anybody also noticed this erroneous display of the ADF card and if so what is the solution to this problem.

Greetings,

Theo.
Last edited by Thair.nl on Fri Apr 08, 2016 10:36 am, edited 2 times in total.
Boeing 737-800 simulator (under construction): http://thair.nl, Beechcraft Baron B58 simulator (also under construction): http://b58.thair.nl.

User avatar
Ralph
Posts: 7933
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: ADF Card jumps when turned

#2 Post by Ralph »

I'm not 100% sure what you mean. Do you use the move function in this instrument?

User avatar
Thair.nl
Posts: 144
Joined: Thu Apr 07, 2016 8:27 pm
Location: EHRD
Contact:

Re: ADF Card jumps when turned

#3 Post by Thair.nl »

I am still in the process of developping these instruments so there is no connection with my flight simulator (Prepar3D) yet. I use the options available on the right hand side of the "Create/Edit" tab (after clicking on the "Run" button) to enter a value for a specific variable. Normally these fields contain "0.0" and the ADF Card hence is in the "N" position. After entering "180" in the "ADF Card" field and pressing the "Send" button the ADF Card moves to "S" and is shifted (a little) to the top and left hand side.

I tested this also with the afore mentioned available Cessna 172 ADF gauge and it has the same behaviour (although far less than my ADF version). This morning I also tested the default Cessna 172 NAV1 and NAV2 dials and they too have the same behaviour although also hardly noticable as with the 172 ADF gauge. In the mean time I have downloaded the other available ADF gauges (Cessna 152, ATR 72, Eurocopter AS350 and Seneca V) and they don't have this strange behaviour. I will checkout the code for the ADF Card within these scripts to see how they work and where they are different from the Cessna 172 (and offcourse my own Cessna 182) version.

Greetings,

Theo.
Boeing 737-800 simulator (under construction): http://thair.nl, Beechcraft Baron B58 simulator (also under construction): http://b58.thair.nl.

User avatar
Thair.nl
Posts: 144
Joined: Thu Apr 07, 2016 8:27 pm
Location: EHRD
Contact:

Re: ADF Card jumps when turned

#4 Post by Thair.nl »

I am starting to narrow down the problem. I have taken the "dial.png" file from the Cessna 172 and placed this in the "resource" directory of my Cessna 182 gauge. I then changed the dial image name to this 152 dial and all works OK. It looks like there has to be something wrong with the drawing of the dial for my Cessna 182 gauge. I checked the values of this drawing and I am still confused. The total size of the drawing is 318x318. The inside of the instrument ring is at 24/24 and has a size of 270 so in total again 318. My dial panel is located at 26/26 and has an outside size of 266, again 318 in total. The inside size is located at 64/64 and has a size of 190, also 318 in total and my stripes are located at 63/63 and have a size of 192, again 318. The stripes have a negative StarDepth to point them outwards. However without these stripes (just the panel) and even without the shielding of the inner part of the ADF dial, this problem persists.

Greetings,

Theo.
Boeing 737-800 simulator (under construction): http://thair.nl, Beechcraft Baron B58 simulator (also under construction): http://b58.thair.nl.

User avatar
Thair.nl
Posts: 144
Joined: Thu Apr 07, 2016 8:27 pm
Location: EHRD
Contact:

Re: ADF Card jumps when turned

#5 Post by Thair.nl »

:oops: :oops: I have solved the problem. Everything within the drawing of the ADF gauge calculated to 318 (as described before). Whatever I altered the ADF card kept jumping. I finally took a look at the canvas size :oops: :oops: and instead of 318x318 it had a size of 316x316. :oops: :oops: After altering that size to the desired 318x318 everything worked well. :oops: :oops:

Now that I have found the culprit, I checked the basic image which I copied for all my small gauges. It appeared that there also was a faulty canvas size. I did not notice it before because I started with the simplest instruments to get the hang of SkinMan and Lua scripting within Air Manager. Because this is the first small gauge with a rotating dial I never came accross this canvas size problem. I will have to alter all the drawings of my small gauges and export the new derived images to the appropriate instrument folders so everything will be as it should.

Greetings,

Theo.
Boeing 737-800 simulator (under construction): http://thair.nl, Beechcraft Baron B58 simulator (also under construction): http://b58.thair.nl.

User avatar
Ralph
Posts: 7933
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: ADF Card jumps when turned [SOLVED]

#6 Post by Ralph »

If you use a fullscreen image, you can use image_add_fullscreen(.....), maybe that prevents some mistakes in the future?

User avatar
Thair.nl
Posts: 144
Joined: Thu Apr 07, 2016 8:27 pm
Location: EHRD
Contact:

Re: ADF Card jumps when turned [SOLVED]

#7 Post by Thair.nl »

I know that function Ralph, but I can't use it because each instrument will also be placed in a complete MIP panel covering three monitors (which has a total resolution of 3584x1280). With "just" the img_add I can place each instrument exactly where I want it to be located. Thanks for the tip anyway.

Greetings,

Theo.
Boeing 737-800 simulator (under construction): http://thair.nl, Beechcraft Baron B58 simulator (also under construction): http://b58.thair.nl.

Post Reply