mtt_auxiliar.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
32 #ifndef _MTT_AUXILIAR_H_
33 #define _MTT_AUXILIAR_H_
34 
35 #define mtic my_tictoc(1)
36 #define mtoc my_tictoc(0)
37 #define TIC 1
38 #define TOC 0
39 
40 #include "mtt_common.h"
41 
42 double get_fps(double dt,t_fps*acc);
43 
50 void init_flags(t_flag*flags);
51 
58 void init_config(t_config*config);
59 
66 int my_tictoc(int status);
67 
75 int timediff(struct timeval t1,struct timeval t2);
76 
86 double point2line_distance(double alpha,double ro,double x,double y);
87 
97 double point2point_algebric_distance(double xi,double yi,double xf,double yf);
98 
108 double point2point_distance(double xi,double yi,double xf,double yf);
109 
110 void CreateMeasurementFromDisplacement(double dx,double dy,double dtheta,double z[2],double dt,double l,double bwa);
111 void ConvertEstimatedToMeasurment(double vl,double dir,float*dx,float*dy,float*dtheta,double dt,double l,double bwa);
112 
113 #endif
int timediff(struct timeval t1, struct timeval t2)
Calculates timediff.
int my_tictoc(int status)
TIC TOC implementation functions.
double point2line_distance(double alpha, double ro, double x, double y)
Calculates the line to point distance.
void init_flags(t_flag *flags)
Init flags.
void CreateMeasurementFromDisplacement(double dx, double dy, double dtheta, double z[2], double dt, double l, double bwa)
double point2point_algebric_distance(double xi, double yi, double xf, double yf)
Calculates the algebric distante between two points.
void ConvertEstimatedToMeasurment(double vl, double dir, float *dx, float *dy, float *dtheta, double dt, double l, double bwa)
Iterations per second structure.
Definition: mtt_common.h:417
double get_fps(double dt, t_fps *acc)
double point2point_distance(double xi, double yi, double xf, double yf)
Calculates the distante between two points.
This structure contains global configurations parameters.
Definition: mtt_common.h:137
void init_config(t_config *config)
Init configuration.
Header with common structures and includes.
This structure contains global flags parameters.
Definition: mtt_common.h:369


mtt
Author(s): Jorge Almeida
autogenerated on Mon Mar 2 2015 01:32:18