imu.h
00001 /* 00002 * Player - One Hell of a Robot Server 00003 * Copyright (C) 2000 Brian Gerkey & Kasper Stoy 00004 * gerkey@usc.edu kaspers@robotics.usc.edu 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 /************************************************************************** 00022 * Desc: Sensor model for IMU. 00023 * Author: Andrew Howard 00024 * Date: 8 Aug 2003 00025 * CVS: $Id: imu.h 1685 2003-08-17 18:51:44Z inspectorg $ 00026 *************************************************************************/ 00027 00028 #ifndef IMU_H 00029 #define IMU_H 00030 00031 #include "../pf/pf.h" 00032 #include "../pf/pf_pdf.h" 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 00039 // Model information 00040 typedef struct 00041 { 00042 // UTM heading 00043 double utm_head; 00044 00045 // Expected bearing error 00046 double err_head; 00047 00048 } imu_model_t; 00049 00050 00051 // Create an sensor model 00052 imu_model_t *imu_alloc(); 00053 00054 // Free an sensor model 00055 void imu_free(imu_model_t *sensor); 00056 00057 // Set the observed heading (utm) 00058 void imu_set_utm(imu_model_t *self, double utm_head); 00059 00060 // The sensor model function 00061 double imu_sensor_model(imu_model_t *self, pf_vector_t pose); 00062 00063 #ifdef __cplusplus 00064 } 00065 #endif 00066 00067 #endif 00068