Home | History | Annotate | Download | only in mpl
      1 /*
      2 	quat_accuracy_monitor.h
      3  $License:
      4     Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved.
      5     See included License.txt for License information.
      6  $
      7  */
      8 
      9 /*******************************************************************************
     10  *
     11  * $Id:$
     12  *
     13  ******************************************************************************/
     14 
     15 #ifndef QUAT_ACCURARCY_MONITOR_H__
     16 #define QUAT_ACCURARCY_MONITOR_H__
     17 
     18 #include "mltypes.h"
     19 
     20 #ifdef __cplusplus
     21 extern "C" {
     22 #endif
     23 enum accuracy_signal_type_e {
     24     TYPE_NAV_QUAT,
     25     TYPE_GAM_QUAT,
     26     TYPE_NAV_QUAT_ADVANCED,
     27     TYPE_GAM_QUAT_ADVANCED,
     28     TYPE_NAV_QUAT_BASIC,
     29     TYPE_GAM_QUAT_BASIC,
     30     TYPE_MAG,
     31     TYPE_GYRO,
     32     TYPE_ACCEL,
     33 };
     34 
     35 inv_error_t inv_init_quat_accuracy_monitor(void);
     36 
     37 void set_accuracy_threshold(enum accuracy_signal_type_e type, double threshold);
     38 double get_accuracy_threshold(enum accuracy_signal_type_e type);
     39 void set_accuracy_weight(enum accuracy_signal_type_e type, int weight);
     40 int get_accuracy_weight(enum accuracy_signal_type_e type);
     41 
     42 int8_t get_accuracy_accuracy(enum accuracy_signal_type_e type);
     43 
     44 void inv_reset_quat_accuracy(void);
     45 double get_6axis_correction_term(void);
     46 double get_9axis_correction_term(void);
     47 int get_9axis_accuracy_state();
     48 
     49 void set_6axis_error_average(double value);
     50 double get_6axis_error_bound(void);
     51 double get_compass_correction(void);
     52 double get_9axis_error_bound(void);
     53 
     54 float get_confidence_interval(void);
     55 void set_compass_uncertainty(float value);
     56 
     57 inv_error_t inv_enable_quat_accuracy_monitor(void);
     58 inv_error_t inv_disable_quat_accuracy_monitor(void);
     59 inv_error_t inv_start_quat_accuracy_monitor(void);
     60 inv_error_t inv_stop_quat_accuracy_monitor(void);
     61 
     62 double get_compassNgravity(void);
     63 double get_init_compassNgravity(void);
     64 
     65 float inv_heading_accuracy_check(float orient[3], float *heading, int8_t *accuracy);
     66 
     67 #ifdef __cplusplus
     68 }
     69 #endif
     70 
     71 #endif // QUAT_ACCURARCY_MONITOR_H__
     72