On Thu, 6 Jan 2011, Tom Browder wrote: > Date: Thu, 6 Jan 2011 05:57:49 -0600 > From: Tom Browder <tom.brow...@gmail.com> <snips />
>>>> For what it's worth, the best reference I could find for this was at: >>>> http://williams.best.vwh.net/avform.htm#Triangle >>> >>> Doesn't the "Lat/lon given radial and distance" formulae on that site >>> do what you want? >> >> In some cases, it gives a rough approximation. In other cases, it's >> incredibly wrong. I think his math is good -- he's highly recommended -- >> but his javascript implementation seems to have major problems in some >> areas. Using input from google maps (lat/long) and giving bearing and >> distance, I've gotten errors in results, which seem to be about 170 >> degrees off. I've triple-checked and in those certain cases it is very >> repeatably wrong. I suppose I should write to him, rather than to the >> BRLCAD folks. I don't know that there is much use in BRLCAD for >> computations of "great circle" problems, however large the universe or >> however small the ruler, to reference a nice paper that used to be >> distributed with the download. > > Well I for one am interested--this is part of a ballistics routine I > think. We can always go away if Sean kicks us off for being "off > topic". (And note that BRL-CAD has the capability of using miles and > km as units.) > > Can you post some examples? If you suspect it's his code, do you have > the source? Tom, Williams's web-calculator is at: http://williams.best.vwh.net/gccalc.htm The one that calculates x,y given bearing and distance is the second one down the page. If you load this into Firefox/Mozilla and "view page source", the code's all there embedded as JavaScript. > > I haven't looked closely at the algorithms but I notice "bearings" > used. Are the angles being entered and handled properly for the > coordinate system? This may be the sticky part. He says that regardless of which format you use to enter the starting data, be it DD:MM:SS.ss or DD:MM.mmm or DD.dddd, it will parse it and handle it. Output is only available in the DD:MM.mmm format. Google uses DD.dddd Decimal Degrees. I've had to convert by taking the part after the colon in the DD:MM.mm format and divide by 60, as advised on another conversions page. The returned value becomes .dddd in DD.dddd format. Mapping thus: http://www.aspenhillnet.net/map/googlemaps/alltracts1.php Looking at the dark grey line to the left of the tracts maps, plotting clockwise, that last (longest) line is supposed to be running off at "South 70 degrees East" or 110 degrees with 0 degrees being due North, for 1452 feet. Instead it runs off for about 4 miles at about 80 degrees. The line-segment before that is meant to run at North 20 degrees East 1188 feet. The web-calculator seems to work well-enough on vectors headed north and/or west. If this was indeed ballistics, live fire would take out an old-folks' home rather than hitting the intended target. Fortunately it's just "urban archeology" and not ballistics. There _are_ commercially available products that run on an OS best left unmentioned, which have a built-in bearing-and-distance input or calculation feature that can either draw a line or return a lat-long pair,, google finds a lot of advice on how to do such calculations with that commercial product. I suppose that one way to do this entirely in BRLCAD would be to create a rectangular prism with a side of the desired length, rotate it to the desired angle, and then use the object pick to get the x,y of the endpoints and then scale those to lat-long for the google maps. Thanks, Tom, and to all, guess I should go back to school and audit Trig. Regards, "Is life so dear, or peace so sweet, as to be ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ BRL-CAD Users mailing list brlcad-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-users