hikecalc

Table of Contents

1 Overview

The hikecalc is intended to help you find and plan hikes suitable for your available time and energy. It lets you pick alternatives that include various waypoints and provides total and cummulative miles. You provide constraints, it does the figuring.

The data file for hikecalc is a simple formatted text file. You can write your own or use data files that come with the package. Generally, one data file reflects distances between points in a fairly local region. For instance, one of the supplied data files is for the Catalina Mountain range that is North of Tucson, Arizona.

2 Example Use Cases

2.1 Get help

hc --help
usage: hc [-h] [--loglevel {CRTICAL,ERROR,WARNING,INFO,DEBUG}] [-f {csv,path}]
          [-n NAMES] [--db DB]
          {table,th,wp,shortest} ... infile

positional arguments:
  infile                Input file

optional arguments:
  -h, --help            show this help message and exit
  --loglevel {CRTICAL,ERROR,WARNING,INFO,DEBUG}
                        Kind of diagnostic output
  -f {csv,path}, --format {csv,path}
                        Input file format
  -n NAMES, --names NAMES
                        ID to Name mapping (csv)
  --db DB               Insert graph in this DB

subcommands:
  {table,th,wp,shortest}
                        sub-command help
    table               Output table of distances. Distance between every pair
                        of waypoints that are connected by a path of 1 or more
                        segments.
    th                  Output all trail-heads
    wp                  Output all waypoints
    shortest            Find shortest route
hc shortest --help
usage: hc shortest [-h] [-w WAYPOINT] [-c CAMP CAMP] [--details]
                   [--prefix_camp PREFIX_CAMP]

optional arguments:
  -h, --help            show this help message and exit
  -w WAYPOINT, --waypoint WAYPOINT
                        Waypoint to include. (multi allowed)
  -c CAMP CAMP, --camp CAMP CAMP
                        (waypoint night-number) of camp. Reset distance.
                        (multi allowed)
  --details             List cummulative distance)
  --prefix_camp PREFIX_CAMP
                        Prefix camp number with this string when outputting
                        details.

2.2 What trailheads are in the file?

hc th $CATDATA
Trail-heads:
  BearCynTH
  MtLemmonTH
  GordonHirabayashiTH
  PimaCynTH
  PalisadesTH
  ButterflyTH
  MarshallGulchTH
  PrisonCampTH
  PhonelineTH
  SabinoTH
  RomeroTH
  VentanaTH
  FingerRockTH
  MolinoTH
  PalisadesRangerTH
  BoxCampTH

2.3 What waypoints are in the file?

hc wp $CATDATA
Waypoints:
  SabinoCynSwim1
  PontatocJct
  MudSpring
  PhonelineTE
  CathedralRockTS
  BoxCampTE
  Connector2Top
  ButterflyTH
  BoxCampTH
  PalRangJct
  BearCynTH
  FingerRockTH
  NovioSpring
  Connector2Bot
  SabinoCyn@EspereroTr
  PrisonSaddle
  PalisadesTH
  TheWindow
  SevenFalls
  CathedralSaddle
  BridalVeilFalls
  e4800
  LemmonPoolJct
  PimaCynTH
  CrystalSprTop
  Connector1Top
  shortcutToBear
  CrystalSprBot
  LemmonTrail@WildernessOfRocks
  e8600
  SabinoCynTS
  Cathedral_route
  MtLemmonTH
  PontatocCynTE
  LemmonLookoutBot
  pcJct
  RomeroTH
  SabinoTH
  RomeroPools
  EastForkTE
  Tr6Jct
  CardiacGap
  WestForkTE
  CathedralJct
  PontatocRidgeTE
  SabinoBathroomTop
  BlackettsTS
  VentanaRidge
  SycamoreReservoir
  SabinoRoad1
  PhonelineTH
  MaidenPools
  MarshallGulchTH
  PalisadesBot
  RomeroPass
  GordonHirabayashiTH
  SamaniegoJct
  j5
  CathedralPeak
  MolinoTH
  GeronimoMeadow
  PimaSpring
  Bear4720
  RattlesnakeJct
  MarshallSaddle
  PrisonCampTH
  LemmonPools
  LemmonLookoutTop
  RomeroLowerJct
  WildernessOfRocksJct
  VentanaTH
  SutherlandBot
  FingerRockSpring
  SabinoRoadTop
  FR1
  SabinoCyn@RattlesnakeCyn
  MtKimbleJct
  BlackettsTE
  MontrosePools
  BoxSpringTS
  ApacheSpring
  HutchsPool
  TrailLinkJct
  PalisadesRangerTH

2.4 How far is it from Sabino visitor center to The Window?

hc shortest -w SabinoTH -w TheWindow  $CATDATA
The shortest distance from "SabinoTH" to "TheWindow" is 8.8 miles via:
  SabinoTH, SabinoRoad1, RattlesnakeJct, CardiacGap, GeronimoMeadow, BridalVeilFalls, CathedralJct, TheWindow

2.5 What is the detail distance from Butterfly to Palisades Ranger Station?

hc shortest -w ButterflyTH  -w PalisadesRangerTH --details $CATDATA
The shortest distance from "ButterflyTH" to "PalisadesRangerTH" is 5.7 miles via:
    0.0   0.0   0.0 ButterflyTH                Start
    1.4   1.4   1.4 CrystalSprTop              
    1.8   3.2   3.2 NovioSpring                
    2.0   5.2   5.2 PalRangJct                 
    0.5   5.7   5.7 PalisadesRangerTH          Done

2.6 Figure out multi-day hike with given end-points

We want start at Marshall Gulch and end at Sabino Visitor center. I car shuttle will be used. So, its a thru-hike, not out-and-back or loop. We will take 4 days (3 nights).

First we list the trail-heads so we know the precise names of our start and end points as given in the data file.

hc th data/catalina.dat 

Then we calculate the basic route:

hc shortest --details -w MarshallGulchTH -w SabinoTH $CATDATA
The shortest distance from "MarshallGulchTH" to "SabinoTH" is 18.7 miles via:
    0.0   0.0   0.0 MarshallGulchTH            Start
    1.2   1.2   1.2 MarshallSaddle             
    1.7   2.9   2.9 LemmonLookoutBot           
    0.8   3.7   3.7 LemmonPoolJct              
    1.5   5.2   5.2 LemmonTrail@WildernessOfRocks  
    1.9   7.1   7.1 RomeroPass                 
    1.8   8.9   8.9 WestForkTE                 
    1.9  10.8  10.8 Cathedral_route            
    1.1  11.9  11.9 CathedralJct               
    0.9  12.8  12.8 BridalVeilFalls            
    1.3  14.1  14.1 GeronimoMeadow             
    1.2  15.3  15.3 CardiacGap                 
    2.4  17.7  17.7 RattlesnakeJct             
    0.5  18.2  18.2 SabinoRoad1                
    0.5  18.7  18.7 SabinoTH                   Done

This gives are the route, tells us the total trip will be 18.7 miles. Since we want to take 4 days, we should AVERAGE 4.7 per day. But we expect to start a little later on the first day since we have to get up the mountain and we don't like getting up real early.

Looking at our detail route, we pick the waypoints of the places we want to camp near. We choose LemmonPoolJct, WestFortTE, BridalVeilFalls.

hc shortest --details -w MarshallGulchTH  -w SabinoTH -c LemmonPoolJct 1   -c WestForkTE 2 -c BridalVeilFalls 3 $CATDATA
The shortest distance from "MarshallGulchTH" to "SabinoTH" is 18.7 miles via:
    0.0   0.0   0.0 MarshallGulchTH            Start
    1.2   1.2   1.2 MarshallSaddle             
    1.7   2.9   2.9 LemmonLookoutBot           
    0.8   3.7   3.7 LemmonPoolJct              Camp Night 1
    0.0   0.0   3.7 ---------                  ----------
    1.5   1.5   5.2 LemmonTrail@WildernessOfRocks  
    1.9   3.4   7.1 RomeroPass                 
    1.8   5.2   8.9 WestForkTE                 Camp Night 2
    0.0   0.0   8.9 ---------                  ----------
    1.9   1.9  10.8 Cathedral_route            
    1.1   3.0  11.9 CathedralJct               
    0.9   3.9  12.8 BridalVeilFalls            Camp Night 3
    0.0   0.0  12.8 ---------                  ----------
    1.3   1.3  14.1 GeronimoMeadow             
    1.2   2.5  15.3 CardiacGap                 
    2.4   4.9  17.7 RattlesnakeJct             
    0.5   5.4  18.2 SabinoRoad1                
    0.5   5.9  18.7 SabinoTH                   Done

This lists 3 columns of distances:

  1. segment
  2. running total for day
  3. running total for trip

We see that day 1 and day 3 are lower milage days. This feels right since we'll start later on day 1 and day 3 goes up and over Cathedral Saddle so will be harder. The last day is the the highest milage but we'll be on the road for a little and besides, we'll be sleeping in our own bed that night!

3 Example: Use HC + org-mode to generate planning document with hike options

3.1 Grand Canyon, East of Hermit

3.2 "The Works" (4 nights)

Covers everything Steve has burning need to do between Kaibab and Hermit. Hits the Colorado - TWICE!

Includes optional side-hikes to:

  1. Plateau_Point at Sunset! (day pack)
  2. Granite_Rapids (camp)
  3. Hermit_Rapids (with time to relax, day pack)

No Plateau sunset. Could do Plateau at end of Day 1 but it would add to overall miles and make day one 3 miles longer.

The shortest distance from "South_Kaibab_TH" to "Hermit_TH" is 39.0 miles via:
    0.0   0.0   0.0 South_Kaibab_TH            Start
    1.5   1.5   1.5 Cedar_Ridge                
    1.5   3.0   3.0 Skeleton_Point             
    1.4   4.4   4.4 Tipoff                     
    4.4   8.8   8.8 Indian_Garden_CG           Camp Night Camp1
    0.0   0.0   8.8 ---------                  ----------
    0.7   0.7   9.5 Plateau_Point_JCT          
    0.8   1.5  10.3 Plateau_Point              
    0.8   2.3  11.1 Plateau_Point_JCT          
    1.8   4.1  12.9 Horn_Creek                 Camp Night Camp2
    0.0   0.0  12.9 ---------                  ----------
    4.8   4.8  17.7 Salt_Creek                 
    2.1   6.9  19.8 Cedar_Spring               
    1.3   8.2  21.1 Monument_Creek             
    1.6   9.8  22.7 Granite_Rapids             Camp Night Camp3
    0.0   0.0  22.7 ---------                  ----------
    1.6   1.6  24.3 Monument_Creek             
    3.5   5.1  27.8 Hermit_Creek               Camp Night Camp4
    0.0   0.0  27.8 ---------                  ----------
    1.5   1.5  29.3 Hermit_Rapids              
    1.5   3.0  30.8 Hermit_Creek               Camp Night Camp4
    0.0   0.0  30.8 ---------                  ----------
    1.2   1.2  32.0 Tonto_JCT                  
    7.0   8.2  39.0 Hermit_TH                  Done

3.3 "A Quicky" (2 nights)

The shortest trip that finishes Steve's Thanksgiving hike EXCEPT it adds Plateau_Point at sunset (day pack).

  • No South Kaibab.
  • No River.
The shortest distance from "Bright_Angel_TH" to "Hermit_TH" is 27.8 miles via:
    0.0   0.0   0.0 Bright_Angel_TH            Start
    1.6   1.6   1.6 Mile_and_a_half_Resthouse  
    1.5   3.1   3.1 Three_Mile_Resthouse       
    1.7   4.8   4.8 Indian_Garden_CG           Camp Night Camp1
    0.0   0.0   4.8 ---------                  ----------
    0.7   0.7   5.5 Plateau_Point_JCT          
    0.8   1.5   6.3 Plateau_Point              
    0.8   2.3   7.1 Plateau_Point_JCT          
    0.7   3.0   7.8 Indian_Garden_CG           Camp Night Camp1
    0.0   0.0   7.8 ---------                  ----------
    0.7   0.7   8.5 Plateau_Point_JCT          
    1.8   2.5  10.3 Horn_Creek                 
    4.8   7.3  15.1 Salt_Creek                 
    2.1   9.4  17.2 Cedar_Spring               
    1.3  10.7  18.5 Monument_Creek             Camp Night Camp2
    0.0   0.0  18.5 ---------                  ----------
    2.3   2.3  20.8 Tonto_JCT                  
    7.0   9.3  27.8 Hermit_TH                  Done

3.4 "Git'r Done!" (2 nights)

Minimize camping, but hike a long day 2 (which is all Tonto).

  • No River
  • No Plateau sunset.

Could do Plateau at end of Day 1 but it would add to overall miles and make day one 3 miles longer.

The shortest distance from "South_Kaibab_TH" to "Hermit_TH" is 30.4 miles via:
    0.0   0.0   0.0 South_Kaibab_TH            Start
    1.5   1.5   1.5 Cedar_Ridge                
    1.5   3.0   3.0 Skeleton_Point             
    1.4   4.4   4.4 Tipoff                     
    4.4   8.8   8.8 Indian_Garden_CG           Camp Night Camp1
    0.0   0.0   8.8 ---------                  ----------
    0.7   0.7   9.5 Plateau_Point_JCT          
    0.8   1.5  10.3 Plateau_Point              
    0.8   2.3  11.1 Plateau_Point_JCT          
    1.8   4.1  12.9 Horn_Creek                 
    4.8   8.9  17.7 Salt_Creek                 
    2.1  11.0  19.8 Cedar_Spring               
    1.3  12.3  21.1 Monument_Creek             Camp Night Camp2
    0.0   0.0  21.1 ---------                  ----------
    2.3   2.3  23.4 Tonto_JCT                  
    7.0   9.3  30.4 Hermit_TH                  Done

3.5 "The Middle Way" (3 nights)

A compromise of the other options.

  • Plateau_Point at sunset (day pack).
  • Hits the river once (day pack).
The shortest distance from "South_Kaibab_TH" to "Hermit_TH" is 37.2 miles via:
    0.0   0.0   0.0 South_Kaibab_TH            Start
    1.5   1.5   1.5 Cedar_Ridge                
    1.5   3.0   3.0 Skeleton_Point             
    1.4   4.4   4.4 Tipoff                     
    4.4   8.8   8.8 Indian_Garden_CG           Camp Night Camp1
    0.0   0.0   8.8 ---------                  ----------
    0.7   0.7   9.5 Plateau_Point_JCT          
    0.8   1.5  10.3 Plateau_Point              
    0.8   2.3  11.1 Plateau_Point_JCT          
    0.7   3.0  11.8 Indian_Garden_CG           Camp Night Camp1
    0.0   0.0  11.8 ---------                  ----------
    0.7   0.7  12.5 Plateau_Point_JCT          
    1.8   2.5  14.3 Horn_Creek                 Camp Night Camp2
    0.0   0.0  14.3 ---------                  ----------
    4.8   4.8  19.1 Salt_Creek                 
    2.1   6.9  21.2 Cedar_Spring               
    1.3   8.2  22.5 Monument_Creek             
    2.3  10.5  24.8 Tonto_JCT                  
    1.2  11.7  26.0 Hermit_Creek               Camp Night Camp3
    0.0   0.0  26.0 ---------                  ----------
    1.5   1.5  27.5 Hermit_Rapids              
    1.5   3.0  29.0 Hermit_Creek               Camp Night Camp3
    0.0   0.0  29.0 ---------                  ----------
    1.2   1.2  30.2 Tonto_JCT                  
    7.0   8.2  37.2 Hermit_TH                  Done

4 TODO (NOT IMPLEMENTED YET)

4.1 Types

OB
out-and-back, from Trail-Head to some destination. Retrace path back to TH.
Loop
Start and end at the same TH. But don't retrace path.
Through
Start and end at different Trail-Heads. You probably need a shuttle to get back to where you started.

4.2 Things you can do

For each path, you can get a simple summary of the total, or you can get a segment by segment running total of the milage.

  • [ ] OB (Out and Back) - "Round Trip".
    • You provide TH and turn around point
    • Returns the shortest route out and back to your turn-around point (turn-around point must be a waypoint in the data file)
  • [ ] OB - max distance
    • You provide TH and the maximum distance you want to hike.
    • Reports possible turn around points with round-trip distance to each.
  • [ ] Through hike with shuttle
    • You provide start and end TH.
    • Report

Date: <2015-03-08 Sun>

Author: Steve

Created: 2015-03-08 Sun 19:30

Emacs 24.4.1 (Org mode 8.2.10)

Validate