[aprssig] smartbeacon fast rate

Tom Russo russo at bogodyn.org
Fri May 25 16:58:00 EDT 2007


On Fri, May 25, 2007 at 04:24:39PM -0400, we recorded a bogon-computron collision of the <wes at kd4rdb.com> flavor, containing:
>  Nope... corner pegging is disabled when your speed is > highspeed...
>  // Adjust beacon rate according to speed
> 
>        IF (speed > high_speed)
>                beacon_rate = fast_beacon_rate;
>        ELSE
>                beacon_rate = fast_beacon_rate * high_speed / speed;
> 
>        // Corner pegging
> 
>        turn_threshold = turn_min + turn_slope / mph;
> 
>        IF (heading_change_since_beacon > turn_threshold) AND
>           (secs_since_beacon> turn_time)
>                  {
> 
>                secs_since_beacon = beacon_rate;
>                  }
>        }
> 
> 
>  The pseudo code is missing the open curly bracket after the IF (speed
> > high_speed) line.... I'll see if I can dig around in the ham hud
>  code and verify this though....

Well, I was just going by what the pseudo code says and how it's indented.
If the HamHud code actually matches the pseudocode, corner pegging is on
if anywhere above the low speed setting.  Perhaps the pseudocode is missing
something, but Xastir's real SmartBeaconing code is based on that web site, 
and here it is (with some stuff edited out for clarity):

    if (speed <= sb_low_speed_limit) {
        // Set to slow posit rate
        sb_POSIT_rate = sb_posit_slow; 
    }
    else {  // We're moving faster than the low speed limit
        // Start with turn_min degrees as the threshold
        turn_threshold = sb_turn_min;

        // Adjust rate according to speed
        if (speed > sb_high_speed_limit) {  // We're above the high limit
            sb_POSIT_rate = sb_posit_fast;
        }
        else {  // We're between the high/low limits.  Set a between rate
            sb_POSIT_rate = (sb_posit_fast * sb_high_speed_limit) / speed;

            // Adjust turn threshold according to speed
            turn_threshold += (int)( (sb_turn_slope) / speed);
        }
//[...]
 
        // Corner-pegging.  Note that we don't corner-peg if we're
        // below the low-speed threshold.
        heading_change_since_beacon = abs(course - sb_last_heading);
        if (heading_change_since_beacon > 180)
            heading_change_since_beacon = 360 - heading_change_since_beacon;

        if ( (heading_change_since_beacon > turn_threshold)
                && (secs_since_beacon > sb_turn_time) ) {
            beacon_now++;   // Force a posit right away
        }

This turns off corner pegging below the low speed, and leaves it on for any
speed above that low speed setting.

>  This code says to me that if speed not > highspeed setting, set beacon
>  rate based on speed/time, set the turn threshold and check for heading
>  changes.

Only if one puts in the curly brace you say is missing and assumes the 
indentation of the pseudocode is incorrect.

>  On 5/25/07, Tom Russo <russo at bogodyn.org> wrote:
> > On Fri, May 25, 2007 at 10:07:42AM -0400, we recorded a bogon-computron 
> > collision of the <mckeehan at mckeehan.homeip.net> flavor, containing:
> > > I picked the 60MPH for easy calculations :-)
> > >
> > > I did not realize until I saw this note that corner pegging is disabled 
> > above
> > > the fast speed.
> >
> > It isn't, at least not in Xastir.  Xastir disables corner pegging below the
> > slow speed.
> >
> > Above the high speed, the "min turn angle" is the turn threshold for corner
> > pegging.  Between high and low speeds, the turn threshold is adjusted by
> > the turn slope and speed (it is supposed to become less sensitive as speed
> > decreases, i.e. higher turn threshold).
> >
> > It might be that other devices than xastir *do* disable corner pegging at
> > high speed, too.  On the hamhud site:
> >
> > <http://www.hamhud.net/hh2/smartbeacon.html>
> >
> > the pseudocode fragment shows corner pegging working at all speeds above
> > the low speed setting.  Xastir's implementation differs from this pseudo
> > code only in that bit about the turn threshold --- the pseudocode shows
> > turn_threshold always depending on speed, but xastir sets it to "turn_min"
> > when above high speed, and uses the formula in the pseudocode only when
> > between high and low speeds.
> >
> > --
> > Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
> > Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 
> > http://kevan.org/brain.cgi?DDTNM
> > "And, isn't sanity really just a one-trick pony anyway? I mean all you get 
> > is
> > one trick, rational thinking, but when you're good and crazy, oooh, oooh,
> > oooh, the sky is the limit!"  --- The Tick
> >
> > _______________________________________________
> > aprssig mailing list
> > aprssig at lists.tapr.org
> > https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig
> >
> >
> 
> 
> 
>  -- 
>  In theory there is no difference between practice and theory.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
 one trick, rational thinking, but when you're good and crazy, oooh, oooh,
 oooh, the sky is the limit!"  --- The Tick




More information about the aprssig mailing list