View Javadoc

1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *  
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *  
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License. 
18   *  
19   */
20  
21  package org.apache.directory.server.dns.io.encoder;
22  
23  
24  /**
25   * 2. RDATA Format
26   * 
27   *        MSB                                           LSB
28   *        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
29   *       0|        VERSION        |         SIZE          |
30   *        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
31   *       2|       HORIZ PRE       |       VERT PRE        |
32   *        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
33   *       4|                   LATITUDE                    |
34   *        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
35   *       6|                   LATITUDE                    |
36   *        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
37   *       8|                   LONGITUDE                   |
38   *        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
39   *      10|                   LONGITUDE                   |
40   *        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
41   *      12|                   ALTITUDE                    |
42   *        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
43   *      14|                   ALTITUDE                    |
44   *        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
45   *    (octet)
46   * 
47   * where:
48   * 
49   * VERSION      Version number of the representation.  This must be zero.
50   *              Implementations are required to check this field and make
51   *              no assumptions about the format of unrecognized versions.
52   * 
53   * SIZE         The diameter of a sphere enclosing the described entity, in
54   *              centimeters, expressed as a pair of four-bit unsigned
55   *              integers, each ranging from zero to nine, with the most
56   *              significant four bits representing the base and the second
57   *              number representing the power of ten by which to multiply
58   *              the base.  This allows sizes from 0e0 (<1cm) to 9e9
59   *              (90,000km) to be expressed.  This representation was chosen
60   *              such that the hexadecimal representation can be read by
61   *              eye; 0x15 = 1e5.  Four-bit values greater than 9 are
62   *              undefined, as are values with a base of zero and a non-zero
63   *              exponent.
64   * 
65   *              Since 20000000m (represented by the value 0x29) is greater
66   *              than the equatorial diameter of the WGS 84 ellipsoid
67   *              (12756274m), it is therefore suitable for use as a
68   *              "worldwide" size.
69   * 
70   * HORIZ PRE    The horizontal precision of the data, in centimeters,
71   *              expressed using the same representation as SIZE.  This is
72   *              the diameter of the horizontal "circle of error", rather
73   *              than a "plus or minus" value.  (This was chosen to match
74   *              the interpretation of SIZE; to get a "plus or minus" value,
75   *              divide by 2.)
76   * 
77   * VERT PRE     The vertical precision of the data, in centimeters,
78   *              expressed using the sane representation as for SIZE.  This
79   *              is the total potential vertical error, rather than a "plus
80   *              or minus" value.  (This was chosen to match the
81   *              interpretation of SIZE; to get a "plus or minus" value,
82   *              divide by 2.)  Note that if altitude above or below sea
83   *              level is used as an approximation for altitude relative to
84   *              the [WGS 84] ellipsoid, the precision value should be
85   *              adjusted.
86   * 
87   * LATITUDE     The latitude of the center of the sphere described by the
88   *              SIZE field, expressed as a 32-bit integer, most significant
89   *              octet first (network standard byte order), in thousandths
90   *              of a second of arc.  2^31 represents the equator; numbers
91   *              above that are north latitude.
92   * 
93   * LONGITUDE    The longitude of the center of the sphere described by the
94   *              SIZE field, expressed as a 32-bit integer, most significant
95   *              octet first (network standard byte order), in thousandths
96   *              of a second of arc, rounded away from the prime meridian.
97   *              2^31 represents the prime meridian; numbers above that are
98   *              east longitude.
99   * 
100  * ALTITUDE     The altitude of the center of the sphere described by the
101  *              SIZE field, expressed as a 32-bit integer, most significant
102  *              octet first (network standard byte order), in centimeters,
103  *              from a base of 100,000m below the [WGS 84] reference
104  *              spheroid used by GPS (semimajor axis a=6378137.0,
105  *              reciprocal flattening rf=298.257223563).  Altitude above
106  *              (or below) sea level may be used as an approximation of
107  *              altitude relative to the the [WGS 84] spheroid, though due
108  *              to the Earth's surface not being a perfect spheroid, there
109  *              will be differences.  (For example, the geoid (which sea
110  *              level approximates) for the continental US ranges from 10
111  *              meters to 50 meters below the [WGS 84] spheroid.
112  *              Adjustments to ALTITUDE and/or VERT PRE will be necessary
113  *              in most cases.  The Defense Mapping Agency publishes geoid
114  *              height values relative to the [WGS 84] ellipsoid.
115  * 
116  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
117  * @version $Rev: 501160 $, $Date: 2007-01-29 20:41:33 +0100 (Mo, 29 Jan 2007) $
118  */
119 public class LocationRecordEncoder
120 {
121 }