From e01cbd917c5d3ca1430a6c681c398cbb3d93feee Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Fri, 31 Oct 2008 14:02:55 +0000 Subject: [PATCH] Added constants for doing unit conversions. --- src/Makefile.am | 1 + src/units.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 src/units.h diff --git a/src/Makefile.am b/src/Makefile.am index ced0d8b..3d65b35 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,6 +7,7 @@ libdivecomputer_HEADERS = \ utils.h \ device.h \ parser.h \ + units.h \ suunto.h \ suunto_eon.h \ suunto_vyper.h \ diff --git a/src/units.h b/src/units.h new file mode 100644 index 0000000..9308f70 --- /dev/null +++ b/src/units.h @@ -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 */