UNCLASSIFIED
GeographicTranslator
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Friends
Macros
master
geotrans3.7
CCS
src
dtcc
Enumerations
Precision.h
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#ifndef Precision_H
4
#define Precision_H
5
6
7
namespace
MSP
8
{
9
namespace
CCS
10
{
11
class
Precision
12
{
13
public
:
14
15
enum
Enum
16
{
17
degree
,
18
tenMinute
,
19
minute
,
20
tenSecond
,
21
second
,
22
tenthOfSecond
,
23
hundrethOfSecond
,
24
thousandthOfSecond
,
25
tenThousandthOfSecond
26
};
27
28
static
Enum
toPrecision
(
int
prec )
29
{
30
Enum
val =
tenthOfSecond
;
31
32
if
( prec ==
degree
)
33
val =
degree
;
34
else
if
( prec ==
tenMinute
)
35
val =
tenMinute
;
36
else
if
( prec ==
minute
)
37
val =
minute
;
38
else
if
( prec ==
tenSecond
)
39
val =
tenSecond
;
40
else
if
( prec ==
second
)
41
val =
second
;
42
else
if
( prec ==
tenthOfSecond
)
43
val =
tenthOfSecond
;
44
else
if
( prec ==
hundrethOfSecond
)
45
val =
hundrethOfSecond
;
46
else
if
( prec ==
thousandthOfSecond
)
47
val =
thousandthOfSecond
;
48
else
if
( prec ==
tenThousandthOfSecond
)
49
val =
tenThousandthOfSecond
;
50
51
return
val;
52
}
53
54
static
double
toMeters
(
const
Enum
&prec )
55
{
56
double
val = 0.0;
57
if
( prec ==
degree
)
58
val = 100000.0;
59
else
if
( prec ==
tenMinute
)
60
val = 10000.0;
61
else
if
( prec ==
minute
)
62
val = 1000.0;
63
else
if
( prec ==
tenSecond
)
64
val = 100.0;
65
else
if
( prec ==
second
)
66
val = 10.0;
67
else
if
( prec ==
tenthOfSecond
)
68
val = 1.0;
69
else
if
( prec ==
hundrethOfSecond
)
70
val = 0.1;
71
else
if
( prec ==
thousandthOfSecond
)
72
val = 0.01;
73
else
if
( prec ==
tenThousandthOfSecond
)
74
val = 0.001;
75
76
return
val;
77
}
78
};
79
}
80
}
81
82
#endif
83
84
85
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:02 for GeographicTranslator by doxygen 1.8.2