October 6, 200223 yr Hi,I am working on a whiskey compass where I also can see the preselected heading of the autopilot. My problem is that when the preselected heading is below 0/360 the heading indicating triangle is positioned a long way to the right instead of the left see my picture.So how can solve this problem?Best regardsEugen(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor%((A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor)%!03d!
October 6, 200223 yr Author Eugen, Been thinking about this one all day.. Maybe this will help. You would use a non-linearity table where "zero" is in the middle and 335 on the left and 25 on the right. But you would need 2 tables, left and right. You may want the bug to disappear if greater than 25 and less than 335. (A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees, degrees) - dnor s1 335 > l1 359.9999 < &l1(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees, degrees) - dnor s1 0 > l1 25 < &l1Replace the red Xs with coordinates for left, center and right placements. Also I noticed in your string that your are finding the difference.. Would you not want the actual autopilot selected heading to be displayed ?%((A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor)%!03d!%((A:Autopilot heading lock dir, degrees))%!03d!Maybe this will help, maybe not... Not tested.. Just an idea and may be better ways. Note, the way it looks here on the forum is different since HTML has processed it. On paper the " < " would be " & l t ; " , the " > " would be " & g t ; " and the " & " would be " & a m p ; ". All without the quotes and remove spaces between characters.Regards,Roman[link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug FS RTWR SHRS F-111 JoinFS Little Navmap
October 6, 200223 yr Roman,Many thanks for your dedicated support, I'll have look at it tomorrow while it is past midnight here and it is bedtime, simming late :-) Lets stay in touch Btw I had look at your 737 project screenshots looks really really good, looking forward for the release :-)BrgdsEugen
October 7, 200223 yr Roman,I was experimenting with the following code below to get it to work. If the value is above 180 then make it negative by subtracting 360but I did'nt manage maybee wrong syntax ? It Always chooses the second if condtion? Wonder why?(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor s1 180 <= if{ l1 } els { l1 360 - }%((A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor s1 180 <= if{ l1 } els { l1 360 - } )%!03d! Best regardsEugen
October 7, 200223 yr Author Eugen, WOW that should work then with one ... I would still use the tag w/ the following:(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees, degrees) - dnor s1 180 <= if{ l1 } els{ l1 360 - s1 } + l1 -25 > l1 25 < &And the folllowing table: As for your problem with the if{ } els{ } the only thing I see is that you have a space ( a no no ) between the els and the {Regards,Roman[link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug FS RTWR SHRS F-111 JoinFS Little Navmap
October 7, 200223 yr Hi Roman,It was the space so the code below works now :-)However one strange thing that I discovered was that -09 and above becomes 0-9 but -10 is alright see attached picture. A bug? Any idea why it happens?BrgdsEugen(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees, degrees) - dnor s1 180 <= if{ l1 } els{ l1 360 - s1 } + l1 -25 > l1 25 < &(A:Autopilot heading lock dir, degrees) (A:Wiskey compass indication degrees,degrees) - dnor s1 180 <= if{ l1 } els{ l1 360 - }
October 7, 200223 yr Author Eugen, Try just !d! or a version of the !f! print parameter without the preceding 0 "zero".Regards,Roman[link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug FS RTWR SHRS F-111 JoinFS Little Navmap
October 7, 200223 yr Roman,How does this "string formatting" work I have just studied the code in other gauges and done try and error I haven't really understood how it works, what is the structure and logic?BrgdsEugen
October 8, 200223 yr Author Eugen, Inside he uploaded was another zip named Format Specification Fields.zip. Inside of that is "some" of what actually works in FS2002. The follwing is the main document ( _crt_printf_precision_specification.htm ) that describes the print fields where some work, some donot. ( d , f , s so far tested ) It is all good reading though. PS Back in the old days ( early 70s ) I remember my old man struggling with this stuff ( print fields and strings )... Transistors where the size of roaches. ( Cans )and to program a computer was to make punch cards before loading into a very, very sensitive card reader ( enviromentally wise ). Then being processed by those "cans" with a massive current consumption... Power cables where 1" in diameter and the room.. YES room,, where the computer was located was kept at a cool 55*- 60* farenheit .. But yet those same print fields are still in use today... go figure. P.S.S. Packers over Dah Bears !!!!! Regards,Roman[link:www.jspanels.com|Project 737-400][link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug FS RTWR SHRS F-111 JoinFS Little Navmap
October 8, 200223 yr Thanks, That did it! I had missed the zipped files in Arne Bartels xml guide.An other question is there a way to get the actual track (trk) and the flight path angle fpa I saw somewhere that fs 2002 does'nt support this, is there a workaround can it be calculated?BrgdsEugen
October 8, 200223 yr Author Hi Eugen, For flight track try (from 747-400 hsi):(A:Velocity world X, m/s) (A:Velocity world Z, m/s) atg2 (A:Magvar, radians) - (A:Plane heading degrees gyro, radians) - For FPA I truly think its possible. I made some design notes for this.. ( Damn if I can find them now ) But.... If you take the groundspeed, feet per second and apply some trig..(vertical speed ft/sec) (groundspeed ft/sec) / tan * = FPAI think that is right... My trig is lacking. But to control FPA is another story as VS is limited by the autopilot to +/- 100 Ft/min ( 1.666 Ft/sec ).. You most likely would have to have your own VS section made to control this as the ground speed changes so does the V/S rate to keep the same angle.. You could though just display current FPA in the VS window using above formula.. ( if correct )Regards,Roman[link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug FS RTWR SHRS F-111 JoinFS Little Navmap
Create an account or sign in to comment