[Dxspider-support] Reciprocal Heading Error
Saul B. Dinman
sdinman at gis.net
Tue Oct 22 16:37:09 BST 2002
Dirk:
Just thought I'd point out a problem you may or may not be aware of. The
calculation of Reciprocal beam heading in sh/head (or anywhere else it's
used) is not correct. I looked at the bdist function that does the deed
and it looks like maybe there's a sign problem because you're
calculating the reciprocal bearing by using the range and bearing
function and just reversing the from and to coordinates. I didn't try to
isolate the problem in the calculation but, wouldn't it be simpler to
just calculate the reciprocal heading by just adding 180 degrees if the
heading is less than 180 or subtracting 180 if heading is greater than
or equal to 180? I don't know if you use the distance part of the
reciprocal bearing/distance calculation, but the distance is the same as
that calculated in the bearing/distance in the first place. If you need
the distance returned in the reciprocal calculation, just use the same
distance calculated for the bearing.
73,
Saul Dinman, K1BI
(K1RK DX Cluster in Woods Hole, MA)
More information about the Dxspider-support
mailing list