Added constants for doing unit conversions.

This commit is contained in:
Jef Driesen 2008-10-31 14:02:55 +00:00
parent 08e84cb8fc
commit e01cbd917c
2 changed files with 35 additions and 0 deletions

View File

@ -7,6 +7,7 @@ libdivecomputer_HEADERS = \
utils.h \
device.h \
parser.h \
units.h \
suunto.h \
suunto_eon.h \
suunto_vyper.h \

34
src/units.h Normal file
View File

@ -0,0 +1,34 @@
/*
* libdivecomputer
*
* Copyright (C) 2008 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef UNITS_H
#define UNITS_H
#define FEET 0.3048
#define GRAVITY 9.80665
#define ATM 101325.0
#define BAR 100000.0
#define FSW (ATM / 33.0)
#define MSW (BAR / 10.0)
#endif /* UNITS_H */