speedometer.h

来自「基于多假设的地图匹配算法。程序能够根据车辆在行驶过程中收集到的GPS/DR数据正」· C头文件 代码 · 共 58 行

H
58
字号
/******************************************************************************    File Name:    include/Speedometer.h    Description:  Speedometer data structure definition and its transformation******************************************************************************//******************************************************************************    Author:       alfred.liushu@gmail.com	    Upadate:      2008/09/16  File founded    Copyright 2008-2009 Robot Lab., Dept.of Automation, Tsinghua University******************************************************************************/#ifndef __SPEEDOMETER_H__#define __SPEEDOMETER_H__#include <math.h>#include "../include/Setting.h"/******************************                   Data structures                           ***************************************************//*Raw data structure*/typedef DATATYPE VELRAW;                                                /*Velocities in kilometers per hour*//*Formatted data structure*/typedef DATATYPE VEL;                                                   /*Velocities in meters per second*//******************************                   Synchronition parameters                  ***************************************************/const TIME VELPeriod = 10;                                              /*Speedometer period time, measured in milliseconds*//******************************                   Transformation constants                  ***************************************************/const DATATYPE VelocityGain = DATATYPE(1/3.6);                          /*Transform km/h to m/s*//******************************                   Transformation function definitions       ***************************************************/inline void VELRAW2VEL(const VELRAW& raw, VEL& vel);                    /*Transform raw data from speedometer*/inline void VEL2VELRAW(const VEL& vel, VELRAW& raw);                    /*Transform speedometer data to raw format*//******************************                   Transformation function implementations   ***************************************************/void VELRAW2VEL(const VELRAW& raw, VEL& vel){    vel = raw * VelocityGain;}void VEL2VELRAW(const VEL& vel, VELRAW& raw){    raw = vel / VelocityGain;}#endif /*__SPEEDOMETER_H__*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?