heelstrike.c File Reference

Go to the source code of this file.

Functions

void hs_calc_filtered_data (void)
int hs_get (void)
float hs_get_float (void)
void hs_init (float exp_filter_coeff, int confidence, int threshold, int cmax, INT_VOID_F get_right, INT_VOID_F get_left)
void hs_look4hs (void)
void hs_look4hup (void)
void hs_set_state (float state)
void hs_update (void)

Variables

static fixed filtered_abs_dev = 0
static fixed filtered_sum = 0
static int hs_cmax = 0
static fixed hs_confidence = 0
static int hs_counter = 0
static const int HS_DATACOLLECT = 2
static fixed hs_exp_fiter_coeff
static fixed hs_foot_up_threshold = 0
static INT_VOID_F hs_get_left = intvoid
static INT_VOID_F hs_get_right = intvoid
static int hs_heelstrike = 0
static const int HS_IDLESTANCE = 4
static const int HS_IDLESWING = 1
static const int HS_LOOKING4HS = 3
static const int HS_LOOKING4HUP = 5
static int hs_state = HS_LOOKING4HS
static fixed hs_threshold = 0
static fixed prev_filtered_abs_dev = 0
static fixed prev_filtered_sum = 0
static fixed raw_abs_dev = 0
static fixed raw_sum = 0

Detailed Description

Author:
Nicolas Champagne-Williamson
Date:
June 2010

Definition in file heelstrike.c.


Function Documentation

void hs_look4hup ( void   ) 

!! need to get more reliability by making sure it works even if the sensors get stuck

Definition at line 101 of file heelstrike.c.

References int_to_fixed().

00101                       {
00102 
00103   if (hs_heelstrike == 1){   // single crossig is good enough to detect, dont want to repeat the calculations 
00104     raw_sum =  int_to_fixed(hs_get_right() + hs_get_left());
00105     if(raw_sum < hs_foot_up_threshold ) {hs_heelstrike = 0;}
00106   }
00107 
00109 }

Generated on Tue Jun 29 16:36:15 2010 by  doxygen 1.6.3