LiveFit
Track and plot projectiles for in-class demonstration
BallTrackingFilter.hpp
1 /*
2  * LiveFit
3  * Copyright (C) 2016 The University of Georgia
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 along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef BALLTRACKINGFILTER_HPP
21 #define BALLTRACKINGFILTER_HPP
22 
23 #include "TrackingBall.hpp"
24 #include "TrackingFilter.hpp"
25 
26 namespace BallKFState {
31  enum BallKFState {x, y, dx, dy, w, h};
32 }
33 namespace BallKFMeas {
38  enum BallKFMeas {x, y, w, h};
39 }
40 
46 {
49  double mGravConstant;
50 
51 public:
53 
57  void flushKalman();
61  void setXYCovariance(double sigma);
62 
66  void updateTrackFailure();
70  void updateTrackSuccess(TrackingBall ball);
71 
75  void updateTimeState(double t);
76 
80  void setGravConstant(double gravConstant);
81 
82 };
83 
84 #endif // BALLTRACKINGFILTER_HPP
Definition: BallTrackingFilter.hpp:33
A TrackingFilter with some specifics for tracking a ball in flight.
Definition: BallTrackingFilter.hpp:45
double mGravConstant
A priori known acceleration due to gravity g (positive direction) is towards center of earth...
Definition: BallTrackingFilter.hpp:49
A ball which has been tracked by the software.
Definition: TrackingBall.hpp:30
A wrapper around a KalmanFilter type object; additional logic can be provided through extension...
Definition: TrackingFilter.hpp:34
Definition: BallTrackingFilter.hpp:26