On Friday 06 April 2007 23:10:25 Vivian Meazza wrote:
> Nick Warne wrote:
> > On Friday 06 April 2007 14:00:14 AJ MacLeod wrote:
> > > The tanker in refueling_demo doesn't have TACAN at all.  In fact, I
> > > think we have a bit of needless duplication with those
> >
> > demos, and one
> >
> > > of them could be removed without too much pain...
> >
> > OK, Csaba found the bug I was seeing, and he fixed it, so no
> > doubt a fix is on
> > the way soon - I am so pleased, I thought I was going mad.
> > Thanks Csaba!!!
> >
> >
> > As to the refueling_demo.xml.  I think this should stay, as
> > it can be used for
> > you own tanker scenerio.  I was testing over FHAW (Ascention
> > Island) and
> > tweaked the file so that it used TACAN also:
> >
> >   <entry>
> >    <callsign>ESSO1</callsign>
> >    <TACAN-channel-ID>040X</TACAN-channel-ID>
> >    <type>aircraft</type>
> >    <class>tanker</class>
> >    <model>Models/Geometry/KC135/KC135.xml</model>
> > <!--   <latitude>37.61633</latitude>
> >    <longitude>-122.38334</longitude> -->
> >    <latitude>-7.974748</latitude>
> >    <longitude>-14.382520</longitude>
> >    <altitude>3000</altitude>
> >    <heading>020</heading>
> >    <speed>280</speed>
> >    <roll>-15</roll>
> >   </entry>
> >
> >
> > It is very handy to have around.
>
>  I'm sure you have spotted it by now - the TACAN code in C++ relates the
> aircraft or carrier callsign to the assigned TACAN frequency (not channel).
> The tag <TACAN-channel-ID> is for display purposes only so that if you open
> the property browser you can quickly identify the assigned channel. So,
> provided the mobile unit has one of the pre-assigned callsigns, it will
> also have the pre-assigned TACAN frequency, no matter if the tag is present
> or correct. For example:
>
> 12  999        999           0   11030       0.000 ES1  ESSO1 TACAN
>
> The reason for this is historical - the nav.dat data file only contains
> TACAN frequency for fixed sites, and not TACAN channel. The file
> carrier_nav.dat is simply an extension of that file for mobile units.
>
> Just to make this clear - the tag <TACAN-channel-ID> has no effect on the
> actual TACAN channel/frequency of a mobile unit - tag <callsign> determines
> that.

Yes, I 'discovered' this after trying/getting TACAN to work - I didn't know 
where it was assigned though, so thanks for this information.


So, seeing as Csaba is now off on holiday, here is the bug and fix he found.

The bug arises if you do not have carrier demo running (exactly my case).

The [dirty] fix - in tacan.cxx around line 284:

    // reset search time
    _time_before_search_sec = 1.0;
+    _mobile_valid = false;

I also see this was once *fixed*, but removed again for some reason:

http://cvs.flightgear.org/cgi-bin/viewvc/viewvc.cgi/FlightGear/src/Instrumentation/tacan.cxx?r1=1.20&r2=1.21


I can say that all works perfectly now with this line added to tacan.cxx

Nick

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to