[EHPweb] Change to the bearing function in the Nearest Cities
Lisa A Wald
lisa at usgs.gov
Mon Apr 11 15:28:47 UTC 2011
I would like to add that this new process was put into place several weeks ago as part of an ongoing task of moving dependencies from the old VAX to modern technology, and the bug was discovered only recently. We will work to prevent errors like this in the future.
- Lisa
--------------------------
Lisa Wald, Geophysicist
Web Team Manager/Project Manager
USGS Earthquake Hazards Program
Golden, CO
303-273-8543
lisa at usgs.gov
--------------------------
On Apr 8, 2011, at 2:05 PM, Matthew J Donnelly wrote:
The Problem: It was found that the bearing function used in nearest cities incorrectly calculated bearing if it required going over the 180 degree meridian. Also on further inspection, the algorithm it was using has great distortion of the bearing when at high latitudes.
The Solution: I developed a simple methodology for determining if the bearing crosses 180 and the way to handle bearing in that case. I also replaced the existing algorithm that calculates bearing by using Rhumb line (basically the planar bearing) with one that calculates it using a Great Circle calculation. By using the Great Circle it seems to have fixed the distortion we saw at high latitudes.
Matthew
-------------------------
Matthew J Donnelly
Information Technology Specialist
National Earthquake Information Center
US Geological Survey
Golden, CO 80401
Ph: 303-273-8590
_______________________________________________
EHPweb mailing list
EHPweb at geohazards.usgs.gov
https://geohazards.usgs.gov/mailman/listinfo/ehpweb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geohazards.usgs.gov/pipermail/ehpweb/attachments/20110411/7d8c224e/attachment.html>
More information about the EHPweb
mailing list