|go ahead... be a heretic|
Better Logic?by orbital (Scribe)
|on Mar 21, 2001 at 01:06 UTC||Need Help??|
orbital has asked for the
wisdom of the Perl Monks concerning the following question:
Currently I am working on writing a Perl Mod that will calculate the elevation of a specific point. The reason why I am doing this is, I don't have the cash to throw down on a DGPS unit, all I can afford is just your consumer end GPS models. The problem with this is even though Selective Avaliablity was removed by Clinton, my altitude reading are not very accurate. This is due largely from the fact that it takes at least 4 known points to calculate your altitude, being in tree cover can break the signal for just a split second, causing errors because of the 3 sec latency to the sat. Also, moisture in the tops of trees can have a big impact on the results as well. I would like a more percise reading because I would like to start creating elevation profiles of my hikes (Planning on climbing ~20 fourteeners in CO this summer).
My plan is to take the SDTS data (read Coordinate for more info.) from the USGS and calculate each specific waypoint of my GPS data, and find which 4 known coordinates are closest to my current point. Once I have these points I will then be able to get a pretty go estimate of what my specific altitude is.
This Mod is going to tie into another Mod that I am currently working on called Convert::SDTS which dynamically find the known quadrant the data resides in, by looking through the USGS data tables, I am also using Coordinate to figure out which USGS file I exactly need to grab.
My question is there a better way to write the following snippet of code?
This just seems very clumbsy, and I am sure I am missing something easy to clean this up a bit. Please help me out all wise ones.