MI - Fimex
FeltConstants.h
Go to the documentation of this file.
1 /*
2  wdb
3 
4  Copyright (C) 2007 met.no
5 
6  Contact information:
7  Norwegian Meteorological Institute
8  Box 43 Blindern
9  0313 OSLO
10  NORWAY
11  E-mail: wdb@met.no
12 
13  This program is free software; you can redistribute it and/or modify
14  it under the terms of the GNU General Public License as published by
15  the Free Software Foundation; either version 2 of the License, or
16  (at your option) any later version.
17 
18  This program is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with this program; if not, write to the Free Software
25  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26  MA 02110-1301, USA
27  */
28 
29 #ifndef FELTCONSTANTS_H_
30 #define FELTCONSTANTS_H_
31 
32 #include <algorithm>
33 #include <boost/static_assert.hpp>
34 
35 namespace felt
36 {
37 
39 typedef short int word;
40 
41 const size_t blockWords = 1024;
42 const size_t blockSize = blockWords * sizeof(word);
43 const size_t offsetToContentDefinition = 2;
44 
46 const double PI = 3.1415926535897932384626433832795;
48 const double EARTH_RADIUS = 6371000.;
49 
54 inline bool isUndefined(word w)
55 {
56  return -32767 == w;
57 }
58 
59 }
60 
61 BOOST_STATIC_ASSERT(sizeof(felt::word) == 2);
62 
63 
64 #endif /*FELTCONSTANTS_H_*/
Definition: FeltConstants.h:35
const double EARTH_RADIUS
Definition: FeltConstants.h:48
const double PI
Definition: FeltConstants.h:46
const size_t blockWords
Definition: FeltConstants.h:41
const size_t offsetToContentDefinition
Definition: FeltConstants.h:43
const size_t blockSize
Definition: FeltConstants.h:42
BOOST_STATIC_ASSERT(sizeof(felt::word)==2)
short int word
A felt block "word" - 2 bytes.
Definition: FeltConstants.h:39
bool isUndefined(word w)
Definition: FeltConstants.h:54