August 13, 201213 yr Gents, In my Heads Up Display (HUD) i have two tapes along each other: 1. Airspeed Tape (A:GROUND VELOCITY,knots) 2. Required G/S pointer (@REQGS) (this bitmap has the same dimensions as Airspeed Tape and has only one pointer at the middle of this tape) Both tapes run up and down when the speed runs up and down which is good. Problem: The pointer which has to be at the required G/S (which is more or less then the actual speed) is a fixed position with the following statement <Position X="170" Y="1200"/> and cannot be set at the required speed. Here is the code: <!-- ########################################### AIRSPEED ############################################# --> <Element> <Shift> <Value Maximum="16" Minimum="5.5">(A:Circuit general panel on, bool) (A:GEAR HANDLE POSITION,bool) && if{ @DEVY } els{ 6.92 }</Value> <Scale Y="43.00"/> </Shift> <Element> <Visible>(A:Circuit general panel on, bool)</Visible> <Position X="0" Y="-300"/> <MaskImage Name="Airspeed_back_mask_white-6.bmp" ImageSizes="280,628"> <Axis X="127" Y="1157"/> </MaskImage> <Image Name="Airspeed_Tape_white.bmp" Bright="Yes" ImageSizes="63,765"> <Nonlinearity> <Item Value="1305" X="0" Y="1110"/> <Item Value="0" X="0" Y="2235"/> </Nonlinearity> </Image> <Shift> <Value Maximum="1305" Minimum="0"> (A:GROUND VELOCITY,knots) (A:AIRSPEED TRUE,knots) 40 < if{ 0 } els{ (A:AIRSPEED TRUE,knots) 43 max } (A:AIRSPEED INDICATED,knots) 40 < if{ 0 } els{ (A:AIRSPEED INDICATED,knots) 43 max } 3 (L:HUD-SPD,enum) case </Value> </Shift> </Element> <Element> <Position X="0" Y="-300"/> <Image Name="Airspeed_back_mask_white-1.bmp" Bright="Yes" ImageSizes="183,55"/> </Element> <Element> <Visible>(A:Circuit general panel on, bool)</Visible> <Clip Left="40" Right="675" Top="250" Bottom="400"/> <Position X="170" Y="1200"/> <Image Name="Airspeed_Pointer_Tape_white.bmp" Bright="Yes" ImageSizes="63,765"> <Nonlinearity> <Item Value="1305" X="0" Y="1110"/> <Item Value="0" X="0" Y="2235"/> </Nonlinearity> </Image> <Shift> <Value Maximum="1305" Minimum="0"> (@REQGS) (A:AIRSPEED TRUE,knots) 40 < if{ 0 } els{ (A:AIRSPEED TRUE,knots) 43 max } (A:AIRSPEED INDICATED,knots) 40 < if{ 0 } els{ (A:AIRSPEED INDICATED,knots) 43 max } 3 (L:HUD-SPD,enum) case </Value> </Shift> </Element> <Element> <Position X="170" Y="12"/> <Text Bright="Yes" X="60" Y="18" Length="5" Font="arial" Color="#FFFFFF" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No"> <String>%(@REQGS (A:GROUND VELOCITY,knots) -)%!5d!</String> <Nonlinearity> <Item Value="1305" X="170" Y="1110"/> <Item Value="0" X="170" Y="2235"/> </Nonlinearity> </Text> </Element> I'm not able to work around this problem, can anybody help? Greetz Slammer
August 14, 201213 yr The only thing i see is a missing </Element> (first element) Cannot test it further. Jan "Beatus ille qui procul negotiis..."
August 15, 201213 yr Author Jan, That is correct, but it is a part of a bigger code. The instrument shows up so no problem. I've tried to use the following code with my values but didn't work eather. Any other way around? <!--target range scale and text--> <Element> <Element> <Element> <Clip Left="40" Right="675" Top="1" Bottom="625"/> <Position X="510" Y="250"/> <Image Name="Target_Distance_Scale_white.bmp" Bright="Yes"> </Image> </Element> <Element> <Clip Left="40" Right="675" Top="1" Bottom="625"/> <Position X="490" Y="133"/> <Image Name="Vertical_speed_pointer_white-1.bmp" Bright="Yes"> </Image> <Shift> <Value Minimum="0" Maximum="10">0 10 (L:Radar Target Distance, number) rng if{ (L:Radar Target Distance, number) } els{ (L:Radar Target Distance, number) 0.5 * } </Value> <Nonlinearity> <Item Value="10" X="490" Y="230"/> <Item Value="0" X="490" Y="360"/> </Nonlinearity> </Shift> </Element> </Element> <Element> <Clip Left="40" Right="675" Top="1" Bottom="625"/> <Position X="490" Y="250"/> <Text Bright="Yes" X="60" Y="18" Length="4" Font="arial" Color="#FFFFFF" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No"> <String>%((A:GROUND VELOCITY,knots) (L:Radar Target Speed,number) - )%!4d!%</String> </Text> <Shift> <Value Minimum="0" Maximum="10"> 0 10 (L:Radar Target Distance, number) rng if{ (L:Radar Target Distance, number) } els{ (L:Radar Target Distance, number) 0.5 * } </Value> <Nonlinearity> <Item Value="10" X="454" Y="242"/> <Item Value="0" X="454" Y="372"/> </Nonlinearity> </Shift> </Element> </Element> As soon if i change the x and y values the pointer and range disappear. Greetz Slammer
August 19, 201213 yr Author Jan, i hope you can see the picture! on the left side you see the airspeed tape, right from that you see a pointer (<) which is now below 300 kts and should be pointing at 461 kts. I have the following code: <Element> <Element> <Clip Top="250" Left="10" Right="701" Bottom="390"/> <Position X="190" Y="310"/> <Image Name="Vertical_speed_pointer_white-2.bmp" Bright="Yes" ImageSizes="28,137"> </Image> <Shift> <Value Maximum="1305" Minimum="0" > (@REQGS) (A:AIRSPEED TRUE,knots) 40 < if{ 0 } els{ (A:AIRSPEED TRUE,knots) 43 max } (A:AIRSPEED INDICATED,knots) 40 < if{ 0 } els{ (A:AIRSPEED INDICATED,knots) 43 max } 3 (L:HUD-SPD,enum) case</Value> <Nonlinearity> <Item Value="0" X="190" Y="-245"/> <Item Value="1305" X="190" Y="865"/> </Nonlinearity> </Shift> </Element> </Element> It runs up and down with the speed but it does not place the pointer at the required ground speed! If i want to change the position of the pointer i have to change the values in the nonlinearity code, which should do this automatically. Thanks for helping out! Greetings Slammer
August 19, 201213 yr For the speedtape i use: <Shift> <Value> (A:Airspeed select indicated or true,knots) </Value> etc. and for the pointer: <Shift> <Value> (A:Airspeed select indicated or true,knots) (A:Autopilot airspeed hold var,knots) - </Value> etc. With the proper nonlinearity tables and positions this will give exactly what is needed. Maybe you can distellate something useful from it. Jan "Beatus ille qui procul negotiis..."
August 20, 201213 yr Author Is there an explanation why my last code would not work since @REQGS is the calculated requested speed, which is at this point 461 kts (See data at TOS page in the Data Entry Display, DED, on the right side) and should point this with the nonlinearity values? Ed
August 20, 201213 yr First, Why (@REQGS) ? and not @REQGS. Second, the scale of the nonlinearity tables must be the same and you only have to show how much pixels is a NM. So this will work (just example): <Item Value= "-10" X= "0" Y="-20"/> <Item Value= "0" X= "0" Y= "0"/> <Item Value= "10" X= "0" Y= "20"/> Then the code of the pointer must be subtracted from the code of the speedladder. In your case something like: <Value> (A:Airspeed select indicated or true,knots) (@REQGS) (A:AIRSPEED TRUE,knots) 40 < if{ 0 } els{ (A:AIRSPEED TRUE,knots) 43 max } (A:AIRSPEED INDICATED,knots) 40 < if{ 0 } els{ (A:AIRSPEED INDICATED,knots) 43 max } 3 (L:HUD-SPD,enum) case - </Value> Hope you can do something with it. NB. pic shows my HUD with 277 ias and 300 selected airspeed and 12700 indicated altitude and 13000 selected altitude, same principle. Jan "Beatus ille qui procul negotiis..."
August 20, 201213 yr Author Jan, i've tried several things you said, result is that the pointer doesn't move at all. Here is the code with the normal airspeedtape and the extra element with the pointer. total length of the tape is 1125 pixels from 0 to 1305 kts is 0.862 pixels per kts. //-----************************* AIRSPEED SCALE / LEFT DATA BLOCKS (SHIFTING) ******************************************** <!-- ########################################### AIRSPEED ############################################# --> <Element> <Shift> <Value Maximum="16" Minimum="5.5">(A:Circuit general panel on, bool) (A:GEAR HANDLE POSITION,bool) && if{ @DEVY } els{ 6.92 }</Value> <Scale Y="43.00"/> </Shift> <Element> <Visible>(A:Circuit general panel on, bool)</Visible> <Position X="0" Y="-300"/> <MaskImage Name="Airspeed_back_mask_white-6.bmp" ImageSizes="280,628"> <Axis X="127" Y="1157"/> </MaskImage> <Image Name="Airspeed_Tape_white.bmp" Bright="Yes" ImageSizes="63,765"> <Nonlinearity> <Item Value="1305" X="0" Y="1110"/> <Item Value="0" X="0" Y="2235"/> </Nonlinearity> </Image> <Shift> <Value Maximum="1305" Minimum="0"> (A:GROUND VELOCITY,knots) (A:AIRSPEED TRUE,knots) 40 < if{ 0 } els{ (A:AIRSPEED TRUE,knots) 43 max } (A:AIRSPEED INDICATED,knots) 40 < if{ 0 } els{ (A:AIRSPEED INDICATED,knots) 43 max } 3 (L:HUD-SPD,enum) case </Value> </Shift> </Element> <Element> <Position X="0" Y="-298"/> <Image Name="Airspeed_back_mask_white-1.bmp" Bright="Yes" ImageSizes="183,55"/> </Element> <Element> <Element> <Clip Top="250" Left="10" Right="701" Bottom="390"/> <Position X="190" Y="310"/> <Image Name="Vertical_speed_pointer_white-2.bmp" Bright="Yes" ImageSizes="28,137"> </Image> <Shift> <Value Maximum="1305" Minimum="0" > (@REQGS) (A:AIRSPEED TRUE,knots) 40 < if{ 0 } els{ (A:AIRSPEED TRUE,knots) 43 max } (A:AIRSPEED INDICATED,knots) 40 < if{ 0 } els{ (A:AIRSPEED INDICATED,knots) 43 max } 3 (L:HUD-SPD,enum) case</Value> <Nonlinearity> <Item Value="0" X="190" Y="-245"/> <Item Value="1305" X="190" Y="865"/> </Nonlinearity> </Shift> </Element> </Element> Somehow i miss something but cannot figure it out where to put the nonlinearity as you said. Do i have to replace the one of the pointer? Ed
August 20, 201213 yr I cannot test your code, but advice you to start simple: So first a good functioning speedladder with value IAS. Next build in the pointer with value IAS - Airspeed hold. Take simple nonlinearity like 1 knot is one pixel. When this functions properly, start replacing with your codes. Btw. i don't use a single bitmap, only text, polylines, circles etc. Jan "Beatus ille qui procul negotiis..."
August 20, 201213 yr Author Jan, thanks anyway for your help and pointing me in the right direction, i will continue trying to figure this one out. Ed
September 2, 201213 yr Author Gents, Finally i managed to get the airspeedbug alongside the altitude tape and it is working. The problem now is that the autopilot (AP) isn't functioning anymore. If i omit the (>K:AP_SPD_VAR_SET) statement in the macro than autopilot works normally but then the airspeedbug does not work anymore. Any clues? <Macro Name="REQGSAP">(A:GPS IS ACTIVE WAY POINT, bool))%{if}%((A:GPS FLIGHT PLAN WP Count,number) 1 - (L:STEERPOINT,number) (C:fs9gps:FlightPlanWaypointRemainingTotalDistance, nmiles) @DESTOSSECONDS / 3600 * (>K:AP_SPD_VAR_SET) </Macro> //-----************************* AIRSPEED SCALE / LEFT DATA BLOCKS (SHIFTING) ******************************************** <!-- ########################################### AIRSPEED ############################################# --> <Element> <Shift> <Value Maximum="16" Minimum="5.5">(A:Circuit general panel on, bool) (A:GEAR HANDLE POSITION,bool) && if{ @DEVY } els{ 6.92 }</Value> <Scale Y="43.00"/> </Shift> <Element> <Visible>(A:Circuit general panel on, bool)</Visible> <Position X="0" Y="-300"/> <MaskImage Name="Airspeed_back_mask_white-6.bmp" ImageSizes="280,628"> <Axis X="127" Y="1157"/> </MaskImage> <Image Name="Airspeed_Tape_white.bmp" Bright="Yes" ImageSizes="63,765"> <Nonlinearity> <Item Value="1305" X="0" Y="1110"/> <Item Value="0" X="0" Y="2235"/> </Nonlinearity> </Image> <Shift> <Value Maximum="1305" Minimum="0"> (A:GROUND VELOCITY,knots) (A:AIRSPEED TRUE,knots) 40 < if{ 0 } els{ (A:AIRSPEED TRUE,knots) 43 max } (A:AIRSPEED INDICATED,knots) 40 < if{ 0 } els{ (A:AIRSPEED INDICATED,knots) 43 max } 3 (L:HUD-SPD,enum) case </Value> </Shift> </Element> <Element> <Position X="0" Y="-298"/> <Image Name="Airspeed_back_mask_white-1.bmp" Bright="Yes" ImageSizes="183,55"/> </Element> <Element> <Position X="190" Y="2"/> <Image Name="Vertical_speed_pointer_white-2.bmp" Bright="Yes"> </Image> <Shift> <Value Minimum="-71" Maximum="80">(A:GROUND VELOCITY,knots) (A:Autopilot airspeed hold var, knots) -</Value> <Scale Y="0.80"/> </Shift> </Element> <Element> <Position X="170" Y="12"/> <Text Bright="Yes" X="60" Y="18" Length="5" Font="arial" Color="#FFFFFF" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No"> <String>% %(@REQGSAP)%</String> </Text> </Element> Slammer
September 2, 201213 yr Moderator Commands such as this should only be used in mouse callbacks, or at least with a "do once" flag to prevent them being executed 18 times/second! By sending a command so frequently, you're not giving the sim time to even detect much less execute any other commands. Is there some particular reason why you need to reset the target airspeed so often? Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
September 3, 201213 yr Author Bill, No, there is no special reason for that but explains why my AP goes bezerk at the moment i load a flightplan. If @REQGSAP is zero then AP is constantly flickering between zero and 160 until i select a waypointnumber then it turns to the max value (in this case 990 knots). I've being trying to figure this one out for about 2 weeks without success, thats why i came to you. cOuld you show me how to fix this one, i'm not too familiar with that routine. Thanks in advance. Slammer
Create an account or sign in to comment