/[zanavi_public1]/navit/navit/android/src/com/luckycatlabs/sunrisesunset/Zenith.java
ZANavi

Contents of /navit/navit/android/src/com/luckycatlabs/sunrisesunset/Zenith.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Mon Feb 4 17:41:59 2013 UTC (11 years, 1 month ago) by zoff99
File size: 1502 byte(s)
new map version, lots of fixes and experimental new features
1 /*
2 * Copyright 2008-2009 Mike Reedell / LuckyCatLabs.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package com.luckycatlabs.sunrisesunset;
18
19 import java.math.BigDecimal;
20
21 /**
22 * Enumerated type that defines the available zeniths for computing the sunrise/sunset.
23 */
24 public enum Zenith
25 {
26 /** Astronomical sunrise/set is when the sun is 18 degrees below the horizon. */
27 ASTRONOMICAL(BigDecimal.valueOf(108)),
28
29 /** Nautical sunrise/set is when the sun is 12 degrees below the horizon. */
30 NAUTICAL(BigDecimal.valueOf(102)),
31
32 /** Civil sunrise/set (dawn/dusk) is when the sun is 6 degrees below the horizon. */
33 CIVIL(BigDecimal.valueOf(96)),
34
35 /** Official sunrise/set is when the sun is 50' below the horizon. */
36 OFFICIAL(BigDecimal.valueOf(90.8333)); // 90deg, 50'
37
38 private final BigDecimal degrees;
39
40 private Zenith(BigDecimal degrees)
41 {
42 this.degrees = degrees;
43 }
44
45 public BigDecimal degrees()
46 {
47 return degrees;
48 }
49 }

   
Visit the ZANavi Wiki