[Xastir-dev] Broken "ST_DIRECT" flag? (fwd)

Curt, WE7U archer at eskimo.com
Tue Dec 21 12:55:38 EST 2004


Forwarding this to the list.  Comments?  On the right track?

--Curt

---------- Forwarded message ----------
Date: Mon, 20 Dec 2004 13:33:22 -0800 (PST)
From: "Curt, WE7U" <archer at eskimo.com>
To: Tom Russo <russo at bogodyn.org>
Cc: "Curt Mills, WE7U" <archer at eskimo.com>
Subject: Re: [Xastir-dev] Broken "ST_DIRECT" flag?

On Fri, 17 Dec 2004, Curt Mills wrote:

> As I recall that ST_VIATNC flag is set if you EVER hear a station
> direct.  Perhaps we need to add a timestamp in there and clear the
> ST_DIRECT flag if we haven't heard a station for the last hour and
> we're touching that station record again for any reason.
>
>
> > I don't know how I heard this via TNC, it was probably digipeated through
> > several of the other urfmsi mountaintop digis.  But the RF path is clobbered by
> > the internet path, and the ST_DIRECT logic looks at the path as part of
> > its decision making.  Note that there is no asterisk anywhere in the path.
>
> Yea, I see the problem.  We've overwritten the direct path with the
> internet path by then, so the logic is messed up.  We either need to
> save the direct path as well, or clear the ST_DIRECT/ST_VIATNC flags
> when we receive a packet on the internet.  I don't like the latter
> solution as station on both TNC and INET would not show any stations
> direct, or very few.

How'z about this?


if (INET packet) {

    if (ST_VIATNC) {
        //
        // Station's been seen on RF before
        //

        if (st_direct_timeout is timed out) {
            //
            // Station has not been heard on RF within the last hour
            //
            ST_VIATNC = 0;          // Clear flag
            ST_DIRECT = 0;          // Clear flag
            path = inet_path;       // Save internet path
        }

        else {
            //
            // Do nothing, keep RF path
            //
        }
    }
    else {
        //
        // Station has not been heard on RF
        //
        ST_VIATNC = 0;              // Clear flag
        ST_DIRECT = 0;              // Clear flag
        path = inet_path;           // Save internet path
    }
}
else {
    //
    // RF packet
    //
    ST_VIATNC = 1;                  // Set flag
    Set ST_DIRECT if direct path    // Set/clear flag
    restart st_direct_timeout       // Set timer
    path = rf_path;                 // Save RF path
}


This logic gives priority to saving the RF path if you're receiving
packets from both RF and Inet.  If a packet isn't received from RF
within the last hour, the inet path will be saved and the ST_VIATNC
and ST_DIRECT flags will be cleared.

--
Curt, WE7U.   APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir-dev mailing list