December 31, 201114 yr Dear Gauge Experts,I'd like to display the distance to ADF in my HUD but don't know how to calculate this, can anybody help me with a string?Thanks in advance.SLAMMER, Virtual Royal Netherlands Air Force
December 31, 201114 yr Hello SLAMMERAs in the real world distance to an NDB is not available from the ADF reciever in FS however you can get it by searching the station ident and using geocalc in the GPS module to get distance and bearing.Search for Taguilo in this forum for the relevant code to do this. Paul EGLD
January 1, 201214 yr Hi,Which ADF, nearest?Then try for example:<FormattedText etc<String>%(0 (>@c:NearestNdbCurrentLine))%((@c:NearestNdbCurrentDistance,nmiles))%!2.1f!</String></FormattedText>Jan Jan "Beatus ille qui procul negotiis..."
January 1, 201214 yr Author Jan and Paul,First i'd like to wish you all a happy new year and save landings. Thanks for helping me out on this one. Jan, for your question about which ADF it is any ADF that i tune in to, i've tried your string but unfortunatly the output is 0.0 on every ADF Freq.Greetz Slammer
January 1, 201214 yr Hi,Happy 2012 too!Did you try it with the necessary gps macro's and updates in your hud, like:<Macro Name="c">C:fs9gps</Macro>................etc.<Update Hidden="No">..............(A:PLANE LATITUDE,Radians) (>@c:NearestNdbCurrentLatitude,Radians)(A:PLANE LONGITUDE,Radians) (>@c:NearestNdbCurrentLongitude,Radians)20 (>@c:NearestNdbMaximumItems) 80 (>@c:NearestNdbMaximumDistance,NMiles)............</Update>If you just tune an ADF and expect the distance it becomes more complicated because there are a lot with same name and /or frequency.My code code only works for nearest ndb.A working way around:If you tune some ADF, it will be obvious one in the neighbourhood.Then instead of 0 (>@c:NearestNdbCurrentLine) you can use some L:Var to cycle between the available NDB'slike (L:NDB selection,number) (>@c:NearestNdbCurrentLine)You can see the ident and distance on the screen, but that will change because another one will take the place of the chosen, cause you 're flying and distances will vary.Naturally you need somewhere on the hudpanel a knob to cycle between the numbers like:<Click Kind="LeftSingle+RightSingle" Repeat="Yes">(M:Event) 'LeftSingle' scmp 0 == if{ (L:NDB selection,number) 1 - 0 max (>L:NDB selection,number) }(M:Event) 'RightSingle' scmp 0 == if{ (L:NDB selection,number) 1 +20 min (>L:NDB selection,number) }</Click>Succes!Jan Edited January 1, 201214 yr by phjvh Jan "Beatus ille qui procul negotiis..."
January 2, 201214 yr Hi,tested this code and it works: <Macro Name="c">C:fs9gps</Macro><Update>(A:PLANE LATITUDE,Radians) (>@c:NearestNdbCurrentLatitude,Radians)(A:PLANE LONGITUDE,Radians) (>@c:NearestNdbCurrentLongitude,Radians)20 (>@c:NearestNdbMaximumItems) 160 (>@c:NearestNdbMaximumDistance,NMiles)</Update><String>%((@c:NearestNdbCurrentIdent))%!s!n%((@c:NearestNdbCurrentDistance,nmiles))%!2.1f!</String><Click Kind="LeftSingle+RightSingle">(M:Event) 'LeftSingle' scmp 0 ==if{(L:NDB Select,enum) 1 - 0 max (>L:NDB Select,enum)(L:NDB Select,enum) (>@c:NearestNdbCurrentLine)}(M:Event) 'RightSingle' scmp 0 ==if{(L:NDB Select,enum) 1 + 20 min (>L:NDB Select,enum)(L:NDB Select,enum) (>@c:NearestNdbCurrentLine)}</Click> Jan Edited January 2, 201214 yr by phjvh Jan "Beatus ille qui procul negotiis..."
Create an account or sign in to comment