amcl_gps.h
1/*
2 * Player - One Hell of a Robot Server
3 * Copyright (C) 2000 Brian Gerkey et al.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 */
21//
22// Desc: GPS sensor model for AMCL
23// Author: Andrew Howard
24// Date: 17 Aug 2003
25// CVS: $Id$
26//
28
29#ifndef AMCL_GPS_H
30#define AMCL_GPS_H
31
32#include "amcl_sensor.h"
33#include "models/gps.h"
34
35// Gpsetric sensor model
36class AMCLGps : public AMCLSensor
37{
38 // Default constructor
39 public: AMCLGps();
40
41 // Load the model
42 public: virtual int Load(ConfigFile* cf, int section);
43
44 // Unload the model
45 public: virtual int Unload(void);
46
47 // Initialize the model
48 public: virtual int Setup(void);
49
50 // Finalize the model
51 public: virtual int Shutdown(void);
52
53 // Check for new sensor measurements
54 private: virtual bool GetData(void);
55
56 // Initialize the filter based on the sensor model. Returns true if the
57 // filter has been initialized.
58 public: virtual bool InitSensor(pf_t *pf, pf_vector_t mean, pf_matrix_t cov);
59
60 // Update the filter based on the sensor model. Returns true if the
61 // filter has been updated.
62 public: virtual bool UpdateSensor(pf_t *pf);
63
64 // Device info
65 private: int gps_index;
66 private: Driver *device;
67
68 // Gpsetry sensor/action model
69 private: gps_model_t *model;
70
71 // Current data timestamp
72 private: uint32_t tsec, tusec;
73
74 // Current GPS data
75 private: double utm_e, utm_n;
76 private: double err_horz;
77
78#ifdef INCLUDE_RTKGUI
79 // Setup the GUI
80 private: virtual void SetupGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig);
81
82 // Finalize the GUI
83 private: virtual void ShutdownGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig);
84
85 // Draw sensor data
86 private: virtual void UpdateGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig);
87
88 // GPS figure
89 private: rtk_fig_t *fig;
90#endif
91};
92
93
94
95
96#endif
Definition amcl_gps.h:37
Definition amcl_sensor.h:44
Class for loading configuration file information.
Definition configfile.h:197
Base class for all drivers.
Definition driver.h:109
Definition pf.h:111
Definition gps.h:41
Definition pf_vector.h:49
Definition pf_vector.h:42