private void calculateStepWidAndLen(Walk w) {
       int verbose = 1;
       if(verbose>0){
           System.out.println("Calculating step width and length for walk: " + w);
       }
       Footfall oppPrev, oppNext, current;
       double sumStepLen = 0, sumStepWid = 0;
       for(int i = 1; i < w.walk.size() - 1; i++) {
           oppPrev = w.walk.get(i-1);
           current = w.walk.get(i);
           oppNext = w.walk.get(i+1);

           Point perpLine = calculatePerpLinePoint(oppPrev.heel,
                    oppNext.heel, current.heel);
           Point L = calculateLineIntersect(oppPrev.heel, oppNext.heel,
                    current.heel, perpLine);

           // Quickfix for L==null
           if(L==null)
               continue;
           
           int crossStep = 1;
           if(current.LeftOrRight == 1 && L.y < current.heel.y) {
                crossStep = -1;
           }
           else if(current.LeftOrRight == 0 && L.y > current.heel.y) {
                crossStep = -1;
           }

           // This direction is because of the way we position our runners
           int negLen = 1;
           if(oppPrev.heel.x < current.heel.x) {
               negLen = -1;
           }

           current.setStepWidth(crossStep * calculateLineLength(current.heel, L));
           current.setStepLength(negLen * calculateLineLength(oppPrev.heel, L));
           sumStepWid += current.getStepWidth();
           sumStepLen += current.getStepLength();
       }
       w.avgStepWid = sumStepWid / w.walk.size();
       w.avgStepLen = sumStepLen / w.walk.size();
       
       if(verbose>0){
           System.out.println("Finished calculating step width and step length.");
       }
   }