Backcountry Forum
Backpacking & Hiking Gear

Backcountry Forum
Our long-time Sponsor - the leading source for ultralite/lightweight outdoor gear
 
 
 
Amazon.com
Backpacking Forums
BackcountryGear.com
backcountry gear

---- Our Gear Store ----
The Lightweight Gear Store
 ULTRA-LIGHT 

Ultralight Backpacks
Ultralight Bivy Sacks
Ultralight Shelters
Ultralight Tarps
Ultralight Tents
Ultralight Raingear
Ultralight Stoves, Cookware
Ultralight Down Bags
Ultralight Synthetic Bags
Ultralight Apparel


the Titanium Page
WM Extremelite Bags

 CAMPING & HIKING 

Backpacks
Tents
Sleeping Bags
Hydration
Kitchen
Accessories

 CLIMBING 

Ropes & Cordage
Slings & Webbing
Protection & Hardware
Carabiners & Quickdraws
Climbing Packs & Bags
Big Wall
Rescue & Industrial
Ice & Snow
Helmets
Climbing Shoes
Climbing Accessories

 SNOWSPORTS 

Snowshoes
Avalanche Gear
Shovels
Tele-Accessories
Hats, Gloves, Gaiters
Accessories

 MEN'S APPAREL 

Jackets
Shirts
Baselayer
Headwear
Gloves
Accessories

 WOMEN'S APPAREL 

Jackets
Shirts
Baselayer
Headwear
Gloves
Accessories

 FOOTWEAR 

Men's Casual
Men's Climbing
Men's Trail
Women's Casual
Women's Climbing
Women's Trail

 CLEARANCE 

Backpacks
Mens
Womens
Climbing
Footwear
Accessories

 BRANDS 

Black Diamond
Granite Gear
La Sportiva
Osprey
Smartwool
all brands

 WINTER CAMPING 

Shelters
Bivy Bags
Sleeping Bags
Sleeping Pads
Snow Sports
Winter Kitchen

 WAYS TO SHOP 

Sale
Clearance
Award Winners
New Arrivals
Top Rated
Lightweight
Shop Green

 SHOP ECONOMICALLY 

Outdoor Gear Daily Deals
Outlets, Bargains, Sales

 SIBLINGS 

Backpacking Lite Home
Backpacking & Hiking Books
Backpacking Food
Backpacking Recipes


Stay Healthy--Eat Well

MARY JANES FARM ORGANIC MEALS

Mary Janes Farm Organic Backcountry Meals

NATURAL HIGH GOURMET MEALS

Natural High

 

Page 4 of 6 < 1 2 3 4 5 6 >
Topic Options
Rate This Topic
#162353 - 02/17/12 02:14 AM Re: Dumb question on GPS [Re: squark]
billstephenson Online   content
member

Registered: 02/07/07
Posts: 3341
Loc: Ozark Mountains in SW Missouri
I found some code to calculate the distance between two lat/lon coordinates here:

http://www.zipcodeworld.com/samples/distance.pl.html

Pretty geeky stuff, but easy to incorporate it into our code and this is what I got out of the sample data I'm using in the code previously posted:

(distance is in miles, and elevation has been converted to feet)

Distance between lines 1 and 2: 0.00196259979104037 :: Elevation Difference: 3.14960630400012
Distance between lines 2 and 3: 0.00511218802656558 :: Elevation Difference: 12.6312336149999
Distance between lines 3 and 4: 0.0035948343884507 :: Elevation Difference: 4.72440945599999
Distance between lines 4 and 5: 0.000834205282553515 :: Elevation Difference: 1.57480315199987

Total Distance calculated without elevations accounted for is 0.0115038274886102

What would it be with the elevations provided above?

_________________________
--

"You want to go where?"



Top
#162377 - 02/17/12 03:04 PM Re: Dumb question on GPS [Re: squark]
billstephenson Online   content
member

Registered: 02/07/07
Posts: 3341
Loc: Ozark Mountains in SW Missouri
Originally Posted By: squark
so you'd have to calculate the increment gained each time the GPS collects data (say, every 30 seconds, or so?), and add up the result:

delta_x = horizontal distance
delta_z = vertical distance

pathlength += Sqrt[ delta_x^2 + delta_z^2 ]


Okay, using this data set:

Quote:
The fields are:

Lat, Lon, Ele (in meters), Time

'36.663116030395031 -92.902936963364482 353.899999999999977 2011-12-30T22:19:27Z'
'36.663144025951624 -92.902942998334765 354.860000000000014 2011-12-30T22:19:39Z'
'36.663215020671487 -92.902968982234597 358.70999999999998 2011-12-30T22:20:08Z'
'36.663261959329247 -92.902940986678004 360.149999999999977 2011-12-30T22:20:23Z'
'36.663261037319899 -92.902955990284681 359.670000000000016 2011-12-30T22:21:10Z'


These are the results I get using the code I'm running. Distance and Elevation are both converted to feet:

Quote:
Leg 1 - Distance : 10.3625268966932 ::: Elevation : 3.14960630400012
Leg 2 - Distance : 26.9923527802663 ::: Elevation : 12.6312336149999
Leg 3 - Distance : 18.9807255710197 ::: Elevation : 4.72440945599999
Leg 4 - Distance : 4.40460389188256 ::: Elevation : 1.57480315199987

Total Distance : 60.7402091398617 || Elevation Change : 22.0800525269999


That should give you the numbers you need to run your math and compare to the total distance shown. You should probably double check my numbers, but you only need to check two legs of data to confirm if they are good or not, and I'll fix them if they are bad.

I would run that last bit of math myself, but you'll have to explain what "delta_x^2" means. Is there a way to write that in longhand math that I can better understand?

Hopefully you'll forgive me for not being able to decipher the formula you've offered. I never had an opportunity to take any math classes past the eighth grade, schools in LA were pretty overcrowded in the `70s...


Edited by billstephenson (02/17/12 03:09 PM)
Edit Reason: clarification
_________________________
--

"You want to go where?"



Top
#162379 - 02/17/12 04:30 PM Re: Dumb question on GPS [Re: billstephenson]
squark Offline
member

Registered: 03/14/11
Posts: 60
Loc: SF bay area, CA
I'm not too familiar with perl, but it seems like it should be able to handle these operations. A quick search shows me that exponents (that I write with a caret) use double asterisks **, so the length of leg 1 would be

pathlength1 = ( distance**2 + elevation**2 )**(1/2)

or in numbers
( 10.3625268966932**2 + 3.14960630400012**2 )**(1/2) = 10.8306

and then add all the lengths together to get

10.8306 + 29.8016 + 19.5599 + 4.67766 = 64.8697

Sorry if my abbreviations for square and square-root aren't familiar; I spend my days staring at equations and tend to forget that most people don't. Let me know if that doesn't help any!

Top
#162380 - 02/17/12 04:50 PM Re: Dumb question on GPS [Re: squark]
billstephenson Online   content
member

Registered: 02/07/07
Posts: 3341
Loc: Ozark Mountains in SW Missouri
Thank you!!

I'll add that in and see what we get smile
_________________________
--

"You want to go where?"



Top
#162384 - 02/17/12 05:38 PM Re: Dumb question on GPS [Re: squark]
billstephenson Online   content
member

Registered: 02/07/07
Posts: 3341
Loc: Ozark Mountains in SW Missouri
Originally Posted By: squark
and then add all the lengths together to get

10.8306 + 29.8016 + 19.5599 + 4.67766 = 64.8697



That worked!

Here's what I got:

Flat Distance : 60.7402091398617
Adjusted for Terrain Distance : 64.8697213477516

That's a big difference for just 60 ft of travel, and that sample was taken from my GPS track of a hike in the hollow below my house. I did grab that small piece because it had a notable variation in elevation, so it's not an average sample, but what it shows is significant.

If anyone has a track they'd like to run through the code I'd be glad to post the results. For that matter, if anyone wants the code, I'd be glad to send it to you.

_________________________
--

"You want to go where?"



Top
#162388 - 02/17/12 06:53 PM Re: Dumb question on GPS [Re: squark]
Jimshaw Offline
member

Registered: 10/22/03
Posts: 3904
Loc: Bend, Oregon
Ummm - clearly the unit of measure used will determine the actual distance traveled. This is where CHAOS enters into the equation. Its like how many miles long is the west British coast? Now using a mm long measuring device and going around every rock and nuance, how long is it? The answer approaches infinity as the unit of measure shrinks.

A gps adds the horizontal distance between the points where it takes a data sample. If it is set to sample every minute and you meander, the distance covered will be less than if it samples every half minute, etc.

Of course the GPS will say the two waypoints are .87 miles apart. If you really did travel in a straight line up hill at 30 degrees, it would say .87 miles on its odometer - the sum of the horizontal distances between the data points.
Jim smile
_________________________
These are my own opinions based on wisdom earned through many wrong decisions. Your mileage may vary.

Top
#162399 - 02/17/12 08:55 PM Re: Dumb question on GPS [Re: billstephenson]
Barefoot Friar Offline
member

Registered: 01/23/09
Posts: 143
Loc: Houston, Alabama
Originally Posted By: billstephenson
/usr/bin/perl


Linux.

/fistbump

ETA: Or should I say, l33t.


Edited by Barefoot Friar (02/17/12 08:56 PM)
_________________________
"Stand in the ways and see, and ask for the old paths, where the good way is, and walk in it; then you will find rest for your souls."

Top
#162425 - 02/18/12 12:28 PM Re: Dumb question on GPS [Re: Barefoot Friar]
billstephenson Online   content
member

Registered: 02/07/07
Posts: 3341
Loc: Ozark Mountains in SW Missouri
Quote:
l33t

laugh

p#d

Not me though. I've bumped heads more than fists with perl 3l33tz.
_________________________
--

"You want to go where?"



Top
#162430 - 02/18/12 01:26 PM Re: Dumb question on GPS [Re: Jimshaw]
billstephenson Online   content
member

Registered: 02/07/07
Posts: 3341
Loc: Ozark Mountains in SW Missouri
Quote:
Ummm - clearly the unit of measure used will determine the actual distance traveled.


Yep, a GPS set on it's finest grain of data collection points does not provide a very high resolution picture of what you actually hiked, and the way your milage is calculated by a GPS ignores terrain all together.

There is solid logic behind that approach and your "This is where CHAOS enters into the equation" observation is the root of it.

That logic applies best to things like maps and boats and airplanes, and works just fine for cars on roads, but it's not so good for hikers that want to know how far they actually hiked. So the little app we are working on goes as far as possible with the data available from a GPS to give a better estimate of actual boots on the ground miles.

Still, compared to the most accurate piece of technology we currently have for measuring that, the best GPS still sucks. laugh

_________________________
--

"You want to go where?"



Top
#162431 - 02/18/12 01:38 PM Re: Dumb question on GPS [Re: wandering_daisy]
billstephenson Online   content
member

Registered: 02/07/07
Posts: 3341
Loc: Ozark Mountains in SW Missouri
Originally Posted By: wandering_daisy
There may be some GPS units that have a chip inside that converts, thus allowing you to choose how you want distance presented. I suspect most do not simply because there appear to be many different ways to calculation depending what you want to measure. Anyway Gershon needs to look in his manual and see if there is a setting that allows one or the other.


I'm not aware of one that does that, but companies like Garmin are pretty responsive to users, and if one requested a "Miles Hiked" feature that accounted for elevation I'm pretty sure they'd add it. If they added it to their "BaseCamp" software it'd be free and backwards compatible with their hardware, and it'd be a feature that'd hit their target market for that product.

On their hardware, they could add it with a software update, and if they kept only a running total they could obtain a much finer degree of accuracy while using little processing power or storage space.

I suggest we suggest it! wink
_________________________
--

"You want to go where?"



Top
Page 4 of 6 < 1 2 3 4 5 6 >


Shout Box

Highest Quality Lightweight Down Sleeping Bags
 
Western Mountaineering Sleeping Bags
 
Lite Gear Talk - Featured Topics
LW Shelter/Bivy?
by nate99
04/21/14 07:29 PM
Best way to cut weight in footwear?
by Cal_Hawkeye
04/18/14 05:08 PM
Gaiters- Suggestions?
by nate99
04/16/14 01:06 PM
Backcountry Discussion - Featured Topics
Backcountry Bucket List
by dylansdad77
04/22/14 02:13 PM
Trekking (Hiking) Poles Survey
by G0ph3rAH1k3
04/19/14 02:55 PM
Be careful eating those fish!
by billstephenson
04/18/14 11:33 AM
Make Your Own Gear - Featured Topics
Featured Photos
May 2012 Eclipse, Lassen Park
New Years Eve 2011
Havasu Canyon
Trip Report with Photos
Oat Hill Mine Trail 2012
Dark Canyon - Utah
Welcome to the Trip Report with Photos Forum
Who's Online
1 registered (), 23 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Jade1, shonofear, G0ph3rAH1k3, Amr7944, Edd
10951 Registered Users
Forum Links
Disclaimer
Policies
Site Links
HOME
Backpacking.net
Family Hiking
Lightweight Gear Store
Backpacking Book Store
Lightweight Zone
Hiking Essentials
 

Outdoor Gear Daily Deals
Outlets, Sales, Bargains

Our long-time Sponsor, BackcountryGear.com - The leading source for ultralite/lightweight outdoor gear:

Backcountry Forum
 
 

Since 1996 - the Original Backcountry Forum
Copyright © The Lightweight Backpacker & BackcountryForum.com