[brlcad-tracker] [ brlcad-Feature Requests-3152646 ] Coordinates Conversion by Bearing and Distance
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: SourceForge.net <no...@so...> - 2011-02-12 03:53:22
|
Feature Requests item #3152646, was opened at 2011-01-06 16:09 Message generated for change (Comment added) made by tbrowder2 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640805&aid=3152646&group_id=105292 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Geometry Conversion Group: Minor Effort Status: Open Resolution: None Priority: 3 Private: No Submitted By: thardman (thardman) Assigned to: Nobody/Anonymous (nobody) Summary: Coordinates Conversion by Bearing and Distance Initial Comment: It would be useful to have a way to provide start coordinates and the specify bearing and distance and thus to generate end coordinates. This should provide options for "Great Circle" point-to-point on spherical surfaces, and should allow for various formats input and output such as "digital degrees", "degree:minute:second.sss", "degree:minute.mmm, etc. Ideally this would be a commandline application that can read a table of input data and output a processed table. ---------------------------------------------------------------------- Comment By: Tom Browder (tbrowder2) Date: 2011-02-11 21:53 Message: While browsing Perl modules today I see that most (if not all) of the functions needed are in the standard Math::Trig module. On your Linux system do "man Math::Trig" and see what I mean. (Note that "standard" means that the module is distributed as part of the base Perl package.) ---------------------------------------------------------------------- Comment By: thardman (thardman) Date: 2011-01-13 17:54 Message: Extended usage: beardist -lat lat -lng lng -b bearing -d dist [-ell ellipsoid -ug units-geometry -ud degree-units -ci CSV-input -co CSV-output -si space-separated-input -so space-separated-output -a append-output-to-copy-of-input] Default usage: beardist lat long bearing distance For example 39.7765 -77.4477 315 500 (start at 39.7765 -77.4477 heading NW 500 feet) Output: 39.77747 -77.44895 Note that all lat long should be in Decimal Degrees, input and output. I should mention here that this would be, so far as I know, the first open-source *NIX commandline tool to perform this function. It might become more ubiquitous than you might think right now. ;) Note that this should be WGS84 ellipsoid, and also note that the output as specified needs incredibly little massaging to be in the Google Maps API format. Five significant figures to the right of the decimal place should be just fine. Many thanks! ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2011-01-13 15:44 Message: Let's not get too crazy now.. :) Implementing output formatting options isn't usually warranted until a tool is in prevalent use. I don't see this tool ever getting to that frankly so the design criteria should just make the output simple enough that it can be reformatted with other tools. So that said, what would your ideal default usage and output format look like? Be exact. CSV tables fed on input and produced on output? What do the columns contain exactly? Which parameters are absolutely essential just to be at all useful, and which options are just convenience or nice to have? We need to distill this down to the smallest possible project that would be of value, and then build UP capability from there depending on how complicated things get. We have to start small though. Your comments are all over the place at the moment... :) Good start, though. ---------------------------------------------------------------------- Comment By: thardman (thardman) Date: 2011-01-07 18:21 Message: Another Useful Option would be the ability to specify ordering of x,y or y,x for either or both input and output. This also should be something that can be either specified on the commandline or read from the environment variable set. For example beardist -i0 -o0 [data] would accept input and would output ordered as latitude longitude. beardist -i1 -o0 [data] would accept input as longitude latitude and output as latitude longitude. ---------------------------------------------------------------------- Comment By: thardman (thardman) Date: 2011-01-07 09:50 Message: Perhaps a usage could be like this: beardist -lat lat -lng lng -b bearing -d dist [-ell ellipsoid -ug units-geometry -ud degree-units -ci CSV-input -co CSV-output -si space-separated-input -so space-separated-output -a append-output-to-copy-of-input] (Anything in brackets is "special purpose" and could be specified ideally both on command line or in environmental variables.) Alternatively, the ellipsoid spec (WGS84, NAD27, whatever) could be an environmental variable, as could the units of geometry (inches, feet, yards, perches, miles, nm, mm, cm, m, km etc) and degree format (decimal degrees, D:M:S.s, D:MM.mm etc). If all of that was set in env vars, behavior assuming -lat -lng -b and -d could exist, so that something like beardist 39.0000 -77.0000 180 1450 would be assumed to mean a start point at 39.0000 N, 77.0000 W, bearing due south, 1450 feet. With env vars set and default behavior, beardist < IN-TABLE > OUT-TABLE should be able to plow through a table of lat,long,bearing,distance and write out to a table of end-points. It might or might not make the most sense for it to default to accepting input as CSV (comma separated values) for easy interaction with database and spreadsheet import/export. "PHP friendly" for LAMP use might be a subsidiary goal. It might make sense for the default to be the -a option, which takes in a 4-column spec of x,y,bearing,distance and outputs 6 columns, x,y,bearing,distance,x2,y2. Perhaps a sub-option to -a to insert a different separator between the 4 original columns and the result columns might be useful, so that 'cut -f 2 -d "_"' could run nicely from 'bash'. See also the man page for "cs2cs" under OSGEO's "proj" project. It's open-source and they probably don't mind sharing. http://trac.osgeo.org/proj/wiki/man_cs2cs and http://trac.osgeo.org/proj/ Cheers, I hope I'm not being too wildly optimistic here. ;) ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2011-01-07 00:12 Message: So what would the exact usage of this tool ideally look like? Can you provide a mock input/output "screenshot" showing a few sample command line uses? For the tool to be more generally useful, it'd ideally have some option(s) for specifying geoid/ellipsoid dimensions instead of assuming a perfect sphere. The usage should take that into account as well. The calculators at http://williams.best.vwh.net/gccalc.htm look promising and the javascript probably wouldn't be too hard to convert, but how those convert to some sort of command-line tool could be tricky. If you can sort those details out, it would greatly simplify the implementation. ---------------------------------------------------------------------- Comment By: Tom Browder (tbrowder2) Date: 2011-01-06 18:48 Message: In case this is approved, I have received permission from Mr. Ed Williams to use data and code from his aviation formulary site (http://williams.best.vwh.net/avform.htm), with suitable attribution: On Thu, Jan 6, 2011 at 17:39, Ed Williams <ed...@ed...> wrote: > At 02:26 PM 1/6/2011, you wrote: >> >> Mr. Williams, would you permit the use of your aviation formulary >> information to be incorporated into Perl or other code for use on the >> BRL-CAD web site (<http://brlcad.org>? >> >> Thanks for your consideration. >> >> Regards, >> >> -Tom >> >> Thomas M. Browder, Jr. >> Niceville, Florida >> USA > > Absolutely. Just give credit as necessary. WILCO Regards, -Tom ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640805&aid=3152646&group_id=105292 |