Hello!

I have looked into tacan code when investigating a bug found by Nick.
>From the one-liner fix it grew to this massive patch. Here is what I did:

Moved tacan parameters from carrier_nav.dat to the appropriate model
node in the property tree (eg. /ai/models/carrier/navaids/tacan).
Implementation added to AIBase (could even make a different class, say
AIBaseWithTacan). Ideally, the values should come from 3 places: i)
the scenario, ii) the model and iii) the network. Until iii) works I
automatically set up a tacan channel for mp aircraft with callsign
MOBIL (the isTanker flag was set based on this anyway.) While normally
a configuration file is preferable to hardcoding things, in this case
I think it is a bad choice to pollute the globals with information
needed by a hack. And nobody ever tweaked these settings.

Added support for tacan position offset from the model position. For
now I just put in a temporary solution that should work OK for
carriers (the only place where this is used currently). I don't know
how to properly add a body-relative vector to the lat,lon,alt
coordinates.

I have changed the "channel-ID" to lower case in the scenario xml and
the property tree. A quick search didn't show anything that used it,
so hopefully nothing is broken. Just a matter of personal preference,
feel free to ignore.

Also, code cleanups here and there. At least I think they are cleanups :)
The TACAN::update function could use some optimization so that it does
not update unchanged nodes.

There is an indicated-ground-speed-kt property which seems to hold the
closing speed. Should it be the ground speed of the selected target,
or do we need a rename? In the second case, we should also add a
little integration or something to make the values more stable. (Given
that ETA is also calculated from this, I think it is a misnomer.)

With these changes theoretically it should be possible to operate the
tacan from the source aircraft in MP for example.

Grab the patch from: http://w3.enternet.hu/jester/fgfs/tacan-20070412.diff

Now you can start telling me why this doesn't make any sense :)

Greets,
Csaba

PS: Note to people with cvs write access: please do *not* commit this (yet).

-------------------------------------------------------------------------
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
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to