C MIP-SDK
mip_sdk_3dm.h
Go to the documentation of this file.
00001 
00002 //
00006 //
00008 //
00009 // External dependencies:
00010 //
00011 //
00012 //
00014 //
00017 //
00027 //
00029 
00030 #ifndef _MIP_SDK_3DM_H
00031 #define _MIP_SDK_3DM_H
00032 
00033 
00035 //
00036 //Include Files
00037 //
00039 
00040 #include "mip.h"
00041 #include "mip_sdk_interface.h"
00042 #include "mip_sdk_config.h"
00043 #include "mip_sdk_gps.h"
00044 #include "mip_sdk_ahrs.h"
00045 
00046 
00048 //
00049 // Defines
00050 //
00052 
00054 
00056 //
00057 // Descriptor Set designators - used in the Desc Set field of the MIP header
00058 //
00060 
00061 #define MIP_3DM_COMMAND_SET                                             0x0C
00062 
00063 
00065 // 3DM COMMAND DESCRIPTORS (command desc are < 0x80)
00067 
00068 #define MIP_3DM_CMD_POLL_AHRS_MESSAGE                     0x01
00069 #define MIP_3DM_CMD_POLL_GPS_MESSAGE                      0x02
00070 #define MIP_3DM_CMD_POLL_NAV_MESSAGE                      0x03
00071 #define MIP_3DM_CMD_GET_AHRS_BASE_RATE                    0x06
00072 #define MIP_3DM_CMD_GET_GPS_BASE_RATE                     0x07
00073 #define MIP_3DM_CMD_AHRS_MESSAGE_FORMAT                   0x08
00074 #define MIP_3DM_CMD_GPS_MESSAGE_FORMAT                    0x09
00075 #define MIP_3DM_CMD_NAV_MESSAGE_FORMAT                    0x0A
00076 #define MIP_3DM_CMD_GET_NAV_BASE_RATE                     0x0B
00077 #define MIP_3DM_CMD_CONTROL_DATA_STREAM                   0x11
00078 #define MIP_3DM_CMD_RAW_RTCM_2_3_MESSAGE          0x20
00079 #define MIP_3DM_CMD_SAVE_DEVICE_SETTINGS                  0x30
00080 #define MIP_3DM_CMD_SET_GPS_DYNAMICS_MODE                 0x34
00081 #define MIP_3DM_CMD_SET_AHRS_SIGNAL_COND                  0x35
00082 #define MIP_3DM_CMD_SET_AHRS_TIMESTAMP                    0x36
00083 #define MIP_3DM_CMD_ACCEL_BIAS                                0x37
00084 #define MIP_3DM_CMD_GYRO_BIAS                                 0x38
00085 #define MIP_3DM_CMD_CAPTURE_GYRO_BIAS                     0x39
00086 #define MIP_3DM_CMD_HARD_IRON_VECTOR                      0x3A
00087 #define MIP_3DM_CMD_SOFT_IRON_MATRIX                      0x3B
00088 #define MIP_3DM_CDM_CONING_AND_SCULLING_ENABLE    0x3E
00089 #define MIP_3DM_CDM_SENSOR2VEHICLE_TRANSFORMATION 0x3F
00090 #define MIP_3DM_CMD_UART_BAUDRATE                             0x40
00091 #define MIP_3DM_CMD_LOW_PASS_FILTER_SETTINGS      0x50
00092 #define MIP_3DM_CMD_COMPLEMENTARY_FILTER          0x51
00093 #define MIP_3DM_CMD_DATASTREAM_FORMAT                     0x60
00094 #define MIP_3DM_CMD_DEVICE_POWER_STATE                    0x61
00095 #define MIP_3DM_CMD_SAVE_RESTORE_GPS_SETTINGS     0x62
00096 #define MIP_3DM_CMD_DEVICE_SETTINGS                           0x63
00097 #define MIP_3DM_CMD_DEVICE_STATUS                             0x64
00098 
00099 
00100 
00102 // 3DM REPLY DESCRIPTORS (reply desc are >= 0x80)
00104 
00105 #define MIP_3DM_REPLY_AHRS_MESSAGE_FORMAT                   0x80
00106 #define MIP_3DM_REPLY_GPS_MESSAGE_FORMAT                    0x81
00107 #define MIP_3DM_REPLY_NAV_MESSAGE_FORMAT                    0x82
00108 #define MIP_3DM_REPLY_AHRS_BASE_RATE                        0x83
00109 #define MIP_3DM_REPLY_GPS_BASE_RATE                         0x84
00110 #define MIP_3DM_REPLY_DATASTREAM_ENABLE                     0x85
00111 #define MIP_3DM_REPLY_AHRS_SIGNAL_SETTINGS                  0x86
00112 #define MIP_3DM_REPLY_UART_BAUDRATE                             0x87
00113 #define MIP_3DM_REPLY_DATASTREAM_FORMAT                     0x88
00114 #define MIP_3DM_REPLY_POWER_STATE                               0x89
00115 #define MIP_3DM_REPLY_NAV_BASE_RATE                         0x8A
00116 #define MIP_3DM_REPLY_ADVANCED_DATA_FILTER                  0x8B
00117 #define MIP_3DM_REPLY_DEVICE_STATUS                         0x90
00118 #define MIP_3DM_REPLY_COMMUNICATIONS_MODE                   0x91
00119 #define MIP_3DM_REPLY_GPS_DYNAMICS_MODE                     0x92
00120 #define MIP_3DM_REPLY_AHRS_TIMESTAMP_VALUE                  0x93
00121 #define MIP_3DM_REPLY_COMPLEMENTARY_FILTER          0x97
00122 #define MIP_3DM_REPLY_ACCEL_BIAS_VECTOR                     0x9A
00123 #define MIP_3DM_REPLY_GYRO_BIAS_VECTOR                      0x9B
00124 #define MIP_3DM_REPLY_HARD_IRON_VECTOR                  0x9C
00125 #define MIP_3DM_REPLY_SOFT_IRON_MATRIX                  0x9D
00126 #define MIP_3DM_REPLY_CONING_AND_SCULLING_ENABLE    0x9E
00127 #define MIP_3DM_REPLY_SENSOR2VEHICLE_TRANSFORMATION 0x9F
00128 
00130 // 3DM PARAMETERS
00132 
00133 //Data Poll Option Byte
00134 #define MIP_3DM_POLLING_ENABLE_ACK_NACK                 0x00
00135 #define MIP_3DM_POLLING_SUPPRESS_ACK_NACK               0x01
00136 
00137 
00138 //Device Power State Device Mask Byte
00139 #define MIP_3DM_POWER_STATE_DEVICE_AHRS                 0x01
00140 #define MIP_3DM_POWER_STATE_DEVICE_GPS                  0x02
00141 
00142 
00143 //Device Power State Byte
00144 #define MIP_3DM_POWER_STATE_ON                          0x01
00145 #define MIP_3DM_POWER_STATE_LOW_POWER                   0x02
00146 #define MIP_3DM_POWER_STATE_SLEEP                       0x03
00147 #define MIP_3DM_POWER_STATE_OFF                         0x04
00148 
00149 
00150 //3DM Device Settings Flags
00151 #define MIP_3DM_AHRS_STREAM_ENABLED_FLAG                0x00000001
00152 #define MIP_3DM_AHRS_STREAM_RAW_FORMAT_FLAG             0x00000002
00153 #define MIP_3DM_GPS_STREAM_ENABLED_FLAG                 0x00000100
00154 #define MIP_3DM_GPS_STREAM_RAW_FORMAT_FLAG              0x00000200
00155 #define MIP_3DM_NAV_STREAM_ENABLED_FLAG                 0x00010000
00156 
00157 
00158 //Data stream IDs
00159 #define MIP_3DM_AHRS_DATASTREAM                         0x01
00160 #define MIP_3DM_GPS_DATASTREAM                          0x02
00161 #define MIP_3DM_INS_DATASTREAM                          0x03
00162 
00163 
00164 //Data stream communication format
00165 #define MIP_3DM_DATASTREAM_NATIVE_MIP_FORMAT            0x01
00166 #define MIP_3DM_DATASTREAM_WRAPPED_RAW_FORMAT           0x02
00167 
00168 
00169 //GPS Dynamics Modes
00170 #define MIP_3DM_GPS_DYNAMICS_MODE_PORTABLE              0x00
00171 #define MIP_3DM_GPS_DYNAMICS_MODE_FIXED                 0x01
00172 #define MIP_3DM_GPS_DYNAMICS_MODE_STATIONARY    0x02
00173 #define MIP_3DM_GPS_DYNAMICS_MODE_PEDESTRIAN    0x03
00174 #define MIP_3DM_GPS_DYNAMICS_MODE_AUTOMOTIVE    0x04
00175 #define MIP_3DM_GPS_DYNAMICS_MODE_SEA                   0x05
00176 #define MIP_3DM_GPS_DYNAMICS_MODE_AIRBORNE_1G   0x06
00177 #define MIP_3DM_GPS_DYNAMICS_MODE_AIRBORNE_2G   0x07
00178 #define MIP_3DM_GPS_DYNAMICS_MODE_AIRBORNE_4G   0x08
00179 
00180 //IMU Low-Pass Filter Parameters
00181 #define MIP_3DM_AHRS_LPF_DISABLED                       0x00
00182 #define MIP_3DM_AHRS_LPF_IIR_SINGLE_POLE        0x01
00183 #define MIP_3DM_AHRS_LPF_MAX_FILTER                     MIP_3DM_AHRS_LPF_IIR_SINGLE_POLE
00184 #define MIP_3DM_AHRS_LPF_CUTOFF_MANUAL          0x01
00185 #define MIP_3DM_AHRS_LPF_CUTOFF_AUTOMATIC       0x00
00186 
00187 //Coning and Sculling Compensation parameters
00188 #define MIP_3DM_CONING_AND_SCULLING_DISABLE             0x00
00189 #define MIP_3DM_CONING_AND_SCULLING_ENABLE              0x01
00190 
00192 //
00193 // Structures
00194 //
00196 
00197 
00198 
00199 
00200 
00202 //
00203 // Function Prototypes
00204 //
00206 
00207 
00208 u16 mip_3dm_cmd_poll_ahrs(mip_interface *device_interface, u8 option_selector, u8 num_descriptors, u8 *descriptor_list);
00209 u16 mip_3dm_cmd_poll_gps(mip_interface *device_interface,  u8 option_selector, u8 num_descriptors, u8 *descriptor_list);
00210 u16 mip_3dm_cmd_poll_filter(mip_interface *device_interface,  u8 option_selector, u8 num_descriptors, u8 *descriptor_list);
00211 
00212 u16 mip_3dm_cmd_get_ahrs_base_rate(mip_interface *device_interface, u16 *base_rate);
00213 u16 mip_3dm_cmd_get_gps_base_rate(mip_interface *device_interface,  u16 *base_rate);
00214 u16 mip_3dm_cmd_get_filter_base_rate(mip_interface *device_interface,  u16 *base_rate);
00215 
00216 u16 mip_3dm_cmd_ahrs_message_format(mip_interface *device_interface, u8 function_selector, u8 *num_entries, u8 *descriptors, u16 *decimation);
00217 u16 mip_3dm_cmd_gps_message_format( mip_interface *device_interface, u8 function_selector, u8 *num_entries, u8 *descriptors, u16 *decimation);
00218 u16 mip_3dm_cmd_filter_message_format( mip_interface *device_interface, u8 function_selector, u8 *num_entries, u8 *descriptors, u16 *decimation);
00219 
00220 u16 mip_3dm_cmd_continuous_data_stream(mip_interface *device_interface, u8 function_selector, u8 device_selector, u8 *enable);
00221 u16 mip_3dm_cmd_startup_settings(mip_interface *device_interface, u8 function_selector);
00222 
00223 u16 mip_3dm_cmd_gps_dynamics_mode(mip_interface *device_interface, u8 function_selector, u8 *dynamics_mode);
00224 u16 mip_3dm_cmd_gps_advanced_settings(mip_interface *device_interface, u8 function_selector);
00225 
00226 u16 mip_3dm_cmd_ahrs_signal_conditioning(mip_interface *device_interface, u8 function_selector, mip_ahrs_signal_settings *settings);
00227 u16 mip_3dm_cmd_ahrs_timestamp(mip_interface *device_interface, u8 function_selector, u8 *time_selector, u32 *time);
00228 
00229 u16 mip_3dm_cmd_uart_baudrate(mip_interface *device_interface, u8 function_selector, u32 *baudrate);
00230 u16 mip_3dm_cmd_datastream_format(mip_interface *device_interface, u8 function_selector, u8 device_selector, u8 *format);
00231 u16 mip_3dm_cmd_power_state(mip_interface *device_interface, u8 function_selector, u8 device_selector, u8 *power_state);
00232 
00233 u16 mip_3dm_cmd_device_status(mip_interface *device_interface, u16 model_number, u8 status_selector, u8 *response_buffer, u16 *response_size);
00234 u16 mip_3dm_cmd_low_pass_filter_settings(mip_interface *device_interface, u8 function_selector, mip_low_pass_filter_settings *filter_settings);
00235 
00236 u16 mip_3dm_cmd_accel_bias(mip_interface *device_interface, u8 function_selector, float *bias_vector);
00237 u16 mip_3dm_cmd_gyro_bias(mip_interface *device_interface, u8 function_selector, float *bias_vector);
00238 
00239 u16 mip_3dm_cmd_coning_sculling_compensation(mip_interface *device_interface, u8 function_selector, u8 *enable);
00240 u16 mip_3dm_cmd_capture_gyro_bias(mip_interface *device_interface, u16 duration_ms, float *bias_vector);
00241 
00242 u16 mip_3dm_cmd_hard_iron(mip_interface *device_interface, u8 function_selector, float *vector);
00243 u16 mip_3dm_cmd_soft_iron(mip_interface *device_interface, u8 function_selector, float *matrix);
00244 
00245 u16 mip_3dm_sensor2vehicle_tranformation(mip_interface *device_interface, u8 function_selector, float euler_angles[3]);
00246 
00247 u16 mip_3dm_cmd_complementary_filter_settings(mip_interface *device_interface, u8 function_selector, mip_complementary_filter_settings *settings);
00248 
00249 u16 mip_3dm_cmd_rtcm_23_message(mip_interface *device_interface, u8* raw_data, u16 num_bytes);
00250 
00251 
00252 #endif
 All Data Structures Files Functions Defines