INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
hydromhipa10arcnet/unitconverter.h00001 /************************************************************************* 00002 00003 date : August 2008 00004 copyright : (C) 2005 J.D. Yamokoski 00005 email : yamokosk+gnu at gmail dot com 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public License as 00009 published by the Free Software Foundation; either version 2.1 of the License, 00010 or (at your option) any later version. The text of the GNU Lesser General 00011 Public License is included with this library in the file LICENSE.TXT. 00012 00013 This library is distributed in the hope that it will be useful, but WITHOUT 00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00015 or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE.TXT for 00016 more details. 00017 00018 *************************************************************************/ 00019 00020 #ifndef HYDRO_MHIPA10_UNITCONVERTER_H 00021 #define HYDRO_MHIPA10_UNITCONVERTER_H 00022 00023 #include <stdint.h> 00024 00025 namespace mhipa10arc 00026 { 00027 00028 // 00029 // @brief convert between S.I. units and MHI counts 00030 // 00031 // @author J.D. Yamokoski 00032 // 00033 00034 // Counts -> S.I. units 00036 double angleFromCounts( int32_t counts ); 00038 float speedFromCounts( int16_t counts ); 00040 float torqueFromCounts( unsigned int servoNum, int16_t counts ); 00041 00042 // S.I. units -> counts 00044 int16_t torqueToCounts(unsigned int servoNum, float value); 00046 int16_t speedToCounts(float value); 00047 00048 00049 } 00050 00051 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)