On 4/13/07, Vivian Meazza <[EMAIL PROTECTED]> wrote:
>
> Exactly my point: AIBase only reads generic values. Offsets are not generic
> values, and their reading should remain where they are at present. If
> another AI Object comes up with a requirement, then that is a different
> matter.

They are generic in the sense that it may be an offset of anything.
Yes, currently only the carrier uses it and it is not even in a
function there - it is duplicated! See below.

> It is right that TACAN assignments should be global - that's the way it is
> in RL - they are not made up locally. Of course it's not really hard to
> change the settings if you get the urge.

I was thinking that the command line arguments are essentially the ground crew.
So if I start FG with a fictional future parameter --tacan=041X then
this would have to be passed over MP to everyone and see me on that
channel. No global xml and no hardcode.

> > 4) the FLOLS/ParkPos issue -- that is just a code cleanup
> > without any change in functionality whatsoever. Maybe I
> > should have split that into a separate patch.
>
> Yes - this is Mathias' business, I really can't comment, except to say that
> I would be surprised if there were anything much wrong with his code, and
> certainly not his mathematics.

Didn't say anything about mathematics. Here is what is wrong:

    // Transform to the right coordinate frame, configuration is done in
    // the usual x-back, y-right, z-up coordinates, computations
    // in the simulation usual body x-forward, y-right, z-down coordinates
    flols_off(0) = - flols->getDoubleValue("x-offset-m", 0);
    flols_off(1) = flols->getDoubleValue("y-offset-m", 0);
    flols_off(2) = - flols->getDoubleValue("z-offset-m", 0);

... and later ...

    // Transform to the right coordinate frame, configuration is done in
    // the usual x-back, y-right, z-up coordinates, computations
    // in the simulation usual body x-forward, y-right, z-down coordinates
    double offset_x = -(*it)->getDoubleValue("x-offset-m", 0);
    double offset_y = (*it)->getDoubleValue("y-offset-m", 0);
    double offset_z = -(*it)->getDoubleValue("z-offset-m", 0);

See? Code duplication, even including the comment. This cries for a
helper function. And since every AI object potentially reads from a
scenario (there is a FGAIBase::readFromScenario after all), they could
benefit from a function like this at some later time.

> > Have I missed anything?
>
> Yup - if it ain't broke don't fix it.

I was trying to improve it, not fix. Looks like we have fundamentally
different views on this, but that's okay :)

Greets,
Csaba

-------------------------------------------------------------------------
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