DR.txt        DEAD RECKONING in APRS (and APRSdr.exe)


     Since the objective of APRS is to display the current
location of all stations and objects, it attempts to dead reckon
all moving objects to their estimated current positions based on
the elapsed time since the time of the last position report.  Not
only is this automatic tool very valuable, a new feature has been
added to permit objects to follow a given course by dead
reckoning, instead of just a straight line.  For planned events,
such as marathons and 10K runs, this allows APRS to track the
lead and tail runners without even using GPS!

    But before getting into this path following mode, there are
some important concepts using normal DRing that APRS users must
understand:

1) APRS accounts for all speeds in Knots.  6 Knots = 7 MPH. Each
MINUTE of LATITUDE is = 1 NAUTICAL MILE.  This is handy...

2) APRS only DR's to the nearest minute.  

3) You PC clock must be within a few seconds of real time, or
even brand new POSITS will be DR'ed on receipt.  Many new APRS
users mistakenly turn off DR in order to solve this problem of
DRed posits.  But what they SHOULD DO INSTEAD is simply sync
their PC clock to real time!  Use the alt-SETUP-GPS-TIME-sync
command to cause APRS to synchronize your clock on the NEXT
receipt of a raw GPS position report from your GPS or someone
else on frequency.  This command only works on MINUTES, so you
must at least be in the right hour or time zone...

4) APRS stops DRing at 24 hours.  The assumption is, that even on
HF, there is good propogation at least once every 24 hour period.

5) DR'ed positions are only updated on your map under the
following conditions:

   a) Each time the map is re-drawn
   b) Each time a POSIT is received.  For autotrackers, this
      is meaningless, since each report is a NEW position, but
      for manually entered reports, each new copy of an old
      report is assumed to mean that the station is on the same
      course and speed, so it is DR'ed.
   c) For your own posit, each time APRS transmits your posit.


PATH FOLLOWING AUTO-DR OPERATIONS in APRSDR.EXE:

   Because this feature would not fit in APRS, it was added to a
basic APRS with all the other WX and DX stuff removed.  The
program is called APRSDR.  It was invented for ease of tracking
known events along known courses, such as marathons, and other
public service events.  This is a very powerful technique which
can provide the same measure of tracking but without spending
$600 per GPS package to implement!  The concept is simple, the
position of the lead runner of a marathon, the lead handicapped,
the lead woman, and tail-end-charley are all completely
predictible!  WHen the starting gun fires, you simply place all
objects at the starting line and give them a speed of 9,10,8 and
6 knots respectively.  If you mark these objects for path
following, they will then proceed down the course at the given
speeds, making all turns as needed.  Then throughout the next
severl hours, you listen for voice reports and update these
moving positions as needed.

   Here's how it works.  First, when APRS loads the current map,
it will remember the location of the beginning of the LAST purple
line in the file.  Presumably this is the race course added to an
APRS map.  When you place an object on the map, the course will
be scanned starting at this point, looking for a line segment
near your object.  It does this via rectangles drawn with the
line segment as the diagonal.  This means that 45 degree lines
will have a big nearly square rectangle, while vertical and
horizontal lines will have vanishingly narrow search ranges.  TO
solve this problem for vertical and horizontal lines, APRS adds
and subtracts 1 form both ends to broaden the rectangle.  Once it
finds a matching segment, it remembers that segment for each
different object.  Look at the following 4 segment race course.

                                      2
      - - - - - - - - - - - - - - - - *----------------
      |                           *   |   *           |
      |                       *       |       *       |
      |                   *           |           *   |
      |               *               | - - - - - - - * 3
      |           *                   |      |       *|
      |       *                       |      |      * |
      |   *                           |      |     *  |
    1 * - - - - - - - - - - - - - - - -      |    *   |
   Start                                     |   *    |
                                             |  *     |
   Finish                                    | *      |
       - - - - - - - - - - - - - - - - - - - |*       |
    5 *  *  *  *  *  *  *  *  *  *  *  *  *  * - - - -
       - - - - - - - - - - - - - - - - - - - | 4


    Knowing the segment and its angle, once every N minutes (set
via the alt-SETUP-POSRATE command) APRS will DR the object along
the same azimuth as the given line segment and transmit the new
position.  Its new position will be compared to the edges of the
rectangle at the end point of that line segment.  If the
predicted position is beyond the edge of the rectangle, then it
will be moved to that end point.  When this is done, the segment
number for that object is incremented by one so that on the next
DR, the AZIMUTH of the next line sement will be used.  This
process continues throughout the event.  Whenever the end point
of the complete course is reached, the velocity is set to zero so
that no further DR occurs.  Actually truncating each leg at the 
end point would result in lost time on each leg.  This is corrected 
by having the comparison made to plus AND minus 50% of the dead
reckoned distance from the end point.  This way, sometimes the
object is moved AHEAD to the end point, and some times it is
moved BACK to the end point.  In the long run, these two effects
will balance out.

     At any time, if the dead reckoned object gets ahead or
behind schedule, you may hook the object and move the cursor to
the newest reported position and hit INSert key to update its
position.  When you hit the INSert key, the remembered segment
number is zeroed and a scan is performed again to find the
nearest leg of the course.  This works fine except for the case
where the course intersects itself, backtracks, or re-traces some
segments.  In these instances, the location of the object may be
within several overlapping segment rectangles.  Only the first
will be identified by the scan.   APRS solves this problem by
giving the user the opportunity to indicate that the 1st, 2nd or
3rd segment should be used.  The prompt assumes the 1st leg, so
that a default (ENTER) response will work most of the time, but
if it is the 2nd or 3rd time through an area, the user can so
indicate.

     When you move an object with the HOOK-INSert method, you
dont need to enter the COURSE, it will be derived by the path-
following routine...

CAUTIONS:  This is a complex process and should be monitored
closely.  The operator should be completely familiar with this
process and the following cautions. 

1) Since Dead reckoning is only done on a minute by minute basis,
the PakPosRate should never be set less than 60 seconds.

2) This one minute increment causes a secondary consideration on 
the length of each leg on a course.  If the legs are shorter than 
one minute, then errors will build up since it still takes a minimum 
of one minute increment to go from the starting point of a segment 
to the end point.   In some cases, this is unavoidable in order to 
have the course match the tight turns in a city environment.  By
anticipating these delays, a good operator can work around them
by increasing the speed, or updating the position manually in
such a labrynth.  If you want precision detail, draw the streets
in fine detail, but overlay the race course in cruder longer
segments.  Zoom into WASHDC.map to see a real our marathon..

3) When you HOOK-INSert-MOVE to correct the position of an
object, the PATH-FOLLOWING algorithm only derives the AZIMUTH
from the nearest line segment, it does not correct the position. 
In other words, if you place the object 200 yards to the right of
the path, then it will be dead-reckoned with approximately that
same offset until it gets to the perpindiculars marking the end
point..  

3) In order to resolve the rectangles around line segments, draw
the maps with enough resolution (pixels per degree) so that even
the shortest line segments are more than just one pixel between
end points.

4)  Since this entire scenario is based on the course drawn in
purple on the current map display, it would not work if you ever
leave the given map.  For this reason, as soon as you mark a
station for FOLLOWING, the present map is locked.  Obviously,
before you FIRST hook and OBJECT on the P list, and mark if for
FOLLOWING, you MUST have displayed the MAP at least once.  If you
UNLOCK the map, the objects will be UN-MARKED for FOLLOWING.

APRSDR.exe uses your same VALIDATION number, but requires a DF
number to activate it for more than one OBJECT to be marked for
FOLLOWING.  Yes, that is a DF registration.  This is because I
didnt want to add another registration number, and since so few
people have registered for DF, we may as well give them an
incentive...
