lowerleg_struct.h
Go to the documentation of this file.
00001 
00009 #ifndef _LOWERLEGSTRCT_H
00010 #define _LOWERLEGSTRCT_H
00011 
00012 
00013 #include<string>
00014 #include<vector>
00015 
00016 #include "cmtdef.h"
00017 #include "xsens_time.h"
00018 #include "xsens_list.h"
00019 #include "cmtscan.h"
00020 #include "cmt3.h"
00021 
00022 using namespace std;
00023 
00025 #define NB_LINKS_MAX 10
00026 
00027 #define NB_PASS_WIRES_MAX 7
00028 
00029 #define NB_ACT_WIRES_MAX 7
00030 
00031 #define NB_ACCL_MAX 5
00032 
00033 #define NB_FORCE_SENS_MAX 10
00034 
00035 #define NB_OPTI_MARKER_MAX 20
00036 
00037 #define NB_FREE_SENSORS_MAX 25
00038 
00040 #define NB_OPT_DATA_MAX 25
00041 
00043 #define NB_EXTERN_INFO_MAX 25
00044 
00051 struct origin
00052 { 
00054   string lnk;
00056   double xa,ya,za;
00057 };
00058 
00065 struct LINK
00066 { 
00069   string label;
00070 
00078   int location[2];
00079 
00092   double P1[3],P2[3],P3[3], P4[3];
00093   
00094   float left_axis[3];
00095   float right_axis[3];
00096   
00103   int angle_data;
00104   
00107   string angle_1_LINK, angle_2_LINK;
00108   
00113   float angle_1[2];
00114 
00119   float angle_2[2];
00120 };
00121 
00122 
00123 
00124 
00125 
00130 struct collar
00131 { 
00133   int nb_LINKs;
00134   
00141   string LINK_labels[NB_LINKS_MAX];
00142 
00150   string shape_left[NB_LINKS_MAX];
00151     
00159   string shape_right[NB_LINKS_MAX];
00160     
00161 };
00162 
00163 
00187 struct sensor
00188 {
00190   int label_id;
00191 
00193   string sensor_type;
00194 
00196   string point_label;
00197   
00199   string LINK_label;
00200   
00202   float xa,ya,za;
00203   
00207   float rot_matrix[3][3];
00208 
00212   float stiffness[10];
00213 
00215   float normal_axis[3];
00216 
00218   float free_param[10];
00219 
00221   int nb_pulley;
00222 
00231   vector< vector<double> > mdata;
00232 
00240   vector< vector<int> > point_flag;
00241 
00242 };
00243 
00244 
00245 
00255 struct collar_info
00256 {
00258   int collar_ids[2];
00259 
00261   string LINK_labels[2];
00262 
00264   float P1[3];
00265 
00267   float P2[3];
00268 
00269   int sensor_id;
00270 
00278   int known_dist; 
00282   float dist[2];
00283 
00287   int dist_intvl;
00288 
00293   int free_param_state;
00294 
00297   int free_param_count;
00298 
00299   float free_param[30];
00300 };
00301 
00311 struct external_info
00312 {
00313 
00318   int sensor_type;
00321   int sensor_id;
00322   
00327   int f_plate_type;
00328   
00332   float ref_point[3];
00333 
00337   float body_point[3];
00338 
00342   float sensor_parameters[25];
00343 
00346   int sensor_param_count;
00347 };
00348 
00349 
00350 
00361 struct tibia 
00362 {
00363 
00364   collar col[2];
00365 
00366   origin C; 
00367 
00373   int angle_data;
00374 
00375   //  float passive_wire[NB_PASS_WIRES_MAX];
00376  
00380   LINK col_LINKs[2][NB_LINKS_MAX];
00381   //  LINK col2_LINKs[NB_LINKS_MAX];
00382   
00384   int pass_wire_count;
00386   int act_wire_count;
00388   int accl_count;
00390   int opti_count;
00392   int force_count;
00394   int free_count;
00396   int opt_col_count;
00398   int extern_data_count;
00400   int stat_foot_press;
00401 
00402   sensor accelerometers[NB_ACCL_MAX];
00403   sensor passive_wires[NB_PASS_WIRES_MAX];
00404   sensor active_wires[NB_ACT_WIRES_MAX];
00405   sensor force_sensors[NB_FORCE_SENS_MAX];
00406   sensor optical[NB_OPTI_MARKER_MAX];
00407   sensor free_sensors[NB_FREE_SENSORS_MAX];
00408 
00409   collar_info opt_col_data[NB_OPT_DATA_MAX];
00410   external_info extrn_data[NB_EXTERN_INFO_MAX];
00411 };
00412 
00413 typedef tibia femur;
00414 
00415 
00416 struct leg{
00417   tibia tib;
00418   femur fem;
00419   vector<vector<double> > datapoints;
00420   vector<vector<double> > frame_refs;
00421   int userQuit;
00422   FILE *filep_act;
00423   unsigned int act_tib[7]; //there are 7 active sensors, this represents those connected to tibia
00424   unsigned int act_fem[7];
00425 };
00426 
00427 
00428 #endif
 All Data Structures Files Functions Variables Typedefs Defines