Internet Engineering Task Force (IETF)                        M. Thomson
Request for Comments: 7459                                       Mozilla
Updates: 3693, 4119, 5491                                J. Winterbottom
Category: Standards Track                                   Unaffiliated
ISSN: 2070-1721                                            February 2015
        
Internet Engineering Task Force (IETF)                        M. Thomson
Request for Comments: 7459                                       Mozilla
Updates: 3693, 4119, 5491                                J. Winterbottom
Category: Standards Track                                   Unaffiliated
ISSN: 2070-1721                                            February 2015
        

Representation of Uncertainty and Confidence in the Presence Information Data Format Location Object (PIDF-LO)

存在信息数据格式位置对象(PIDF-LO)中不确定性和置信度的表示

Abstract

摘要

This document defines key concepts of uncertainty and confidence as they pertain to location information. Methods for the manipulation of location estimates that include uncertainty information are outlined.

本文件定义了与位置信息相关的不确定性和置信度的关键概念。概述了包含不确定性信息的位置估计操作方法。

This document normatively updates the definition of location information representations defined in RFCs 4119 and 5491. It also deprecates related terminology defined in RFC 3693.

本文件规范性地更新了RFCs 4119和5491中定义的位置信息表示的定义。它还反对RFC 3693中定义的相关术语。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7459.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7459.

Copyright Notice

版权公告

Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2015 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1. Introduction ....................................................4
      1.1. Conventions and Terminology ................................4
   2. A General Definition of Uncertainty .............................5
      2.1. Uncertainty as a Probability Distribution ..................6
      2.2. Deprecation of the Terms "Precision" and "Resolution" ......8
      2.3. Accuracy as a Qualitative Concept ..........................9
   3. Uncertainty in Location .........................................9
      3.1. Targets as Points in Space .................................9
      3.2. Representation of Uncertainty and Confidence in PIDF-LO ...10
      3.3. Uncertainty and Confidence for Civic Addresses ............10
      3.4. DHCP Location Configuration Information and Uncertainty ...11
   4. Representation of Confidence in PIDF-LO ........................12
      4.1. The "confidence" Element ..................................13
      4.2. Generating Locations with Confidence ......................13
      4.3. Consuming and Presenting Confidence .......................13
   5. Manipulation of Uncertainty ....................................14
      5.1. Reduction of a Location Estimate to a Point ...............15
           5.1.1. Centroid Calculation ...............................16
                  5.1.1.1. Arc-Band Centroid .........................16
                  5.1.1.2. Polygon Centroid ..........................16
      5.2. Conversion to Circle or Sphere ............................19
      5.3. Conversion from Three-Dimensional to Two-Dimensional ......20
      5.4. Increasing and Decreasing Uncertainty and Confidence ......20
           5.4.1. Rectangular Distributions ..........................21
           5.4.2. Normal Distributions ...............................21
      5.5. Determining Whether a Location Is within a Given Region ...22
           5.5.1. Determining the Area of Overlap for Two Circles ....24
           5.5.2. Determining the Area of Overlap for Two Polygons ...25
   6. Examples .......................................................25
      6.1. Reduction to a Point or Circle ............................25
      6.2. Increasing and Decreasing Confidence ......................29
      6.3. Matching Location Estimates to Regions of Interest ........29
      6.4. PIDF-LO with Confidence Example ...........................30
   7. Confidence Schema ..............................................31
   8. IANA Considerations ............................................32
      8.1. URN Sub-Namespace Registration for ........................32
      8.2. XML Schema Registration ...................................33
   9. Security Considerations ........................................33
   10. References ....................................................34
      10.1. Normative References .....................................34
      10.2. Informative References ...................................35
        
   1. Introduction ....................................................4
      1.1. Conventions and Terminology ................................4
   2. A General Definition of Uncertainty .............................5
      2.1. Uncertainty as a Probability Distribution ..................6
      2.2. Deprecation of the Terms "Precision" and "Resolution" ......8
      2.3. Accuracy as a Qualitative Concept ..........................9
   3. Uncertainty in Location .........................................9
      3.1. Targets as Points in Space .................................9
      3.2. Representation of Uncertainty and Confidence in PIDF-LO ...10
      3.3. Uncertainty and Confidence for Civic Addresses ............10
      3.4. DHCP Location Configuration Information and Uncertainty ...11
   4. Representation of Confidence in PIDF-LO ........................12
      4.1. The "confidence" Element ..................................13
      4.2. Generating Locations with Confidence ......................13
      4.3. Consuming and Presenting Confidence .......................13
   5. Manipulation of Uncertainty ....................................14
      5.1. Reduction of a Location Estimate to a Point ...............15
           5.1.1. Centroid Calculation ...............................16
                  5.1.1.1. Arc-Band Centroid .........................16
                  5.1.1.2. Polygon Centroid ..........................16
      5.2. Conversion to Circle or Sphere ............................19
      5.3. Conversion from Three-Dimensional to Two-Dimensional ......20
      5.4. Increasing and Decreasing Uncertainty and Confidence ......20
           5.4.1. Rectangular Distributions ..........................21
           5.4.2. Normal Distributions ...............................21
      5.5. Determining Whether a Location Is within a Given Region ...22
           5.5.1. Determining the Area of Overlap for Two Circles ....24
           5.5.2. Determining the Area of Overlap for Two Polygons ...25
   6. Examples .......................................................25
      6.1. Reduction to a Point or Circle ............................25
      6.2. Increasing and Decreasing Confidence ......................29
      6.3. Matching Location Estimates to Regions of Interest ........29
      6.4. PIDF-LO with Confidence Example ...........................30
   7. Confidence Schema ..............................................31
   8. IANA Considerations ............................................32
      8.1. URN Sub-Namespace Registration for ........................32
      8.2. XML Schema Registration ...................................33
   9. Security Considerations ........................................33
   10. References ....................................................34
      10.1. Normative References .....................................34
      10.2. Informative References ...................................35
        
   Appendix A. Conversion between Cartesian and Geodetic
               Coordinates in WGS84 ..................................36
   Appendix B. Calculating the Upward Normal of a Polygon ............37
      B.1. Checking That a Polygon Upward Normal Points Up ...........38
   Acknowledgements ..................................................39
   Authors' Addresses ................................................39
        
   Appendix A. Conversion between Cartesian and Geodetic
               Coordinates in WGS84 ..................................36
   Appendix B. Calculating the Upward Normal of a Polygon ............37
      B.1. Checking That a Polygon Upward Normal Points Up ...........38
   Acknowledgements ..................................................39
   Authors' Addresses ................................................39
        
1. Introduction
1. 介绍

Location information represents an estimation of the position of a Target [RFC6280]. Under ideal circumstances, a location estimate precisely reflects the actual location of the Target. For automated systems that determine location, there are many factors that introduce errors into the measurements that are used to determine location estimates.

位置信息表示对目标位置的估计[RFC6280]。在理想情况下,位置估计准确地反映了目标的实际位置。对于确定位置的自动化系统,有许多因素会在用于确定位置估计的测量中引入误差。

The process by which measurements are combined to generate a location estimate is outside of the scope of work within the IETF. However, the results of such a process are carried in IETF data formats and protocols. This document outlines how uncertainty, and its associated datum, confidence, are expressed and interpreted.

组合测量以生成位置估计的过程不在IETF的工作范围内。然而,该过程的结果以IETF数据格式和协议进行。本文件概述了如何表达和解释不确定性及其相关数据、置信度。

This document provides a common nomenclature for discussing uncertainty and confidence as they relate to location information.

本文件为讨论与位置信息相关的不确定性和置信度提供了通用术语。

This document also provides guidance on how to manage location information that includes uncertainty. Methods for expanding or reducing uncertainty to obtain a required level of confidence are described. Methods for determining the probability that a Target is within a specified region based on its location estimate are described. These methods are simplified by making certain assumptions about the location estimate and are designed to be applicable to location estimates in a relatively small geographic area.

本文件还提供了如何管理包含不确定性的位置信息的指南。描述了扩大或减少不确定性以获得所需置信水平的方法。描述了基于目标位置估计确定目标位于指定区域内的概率的方法。通过对位置估计进行某些假设,简化了这些方法,并将其设计为适用于相对较小地理区域内的位置估计。

A confidence extension for the Presence Information Data Format - Location Object (PIDF-LO) [RFC4119] is described.

描述了存在信息数据格式-位置对象(PIDF-LO)[RFC4119]的置信扩展。

This document describes methods that can be used in combination with automatically determined location information. These are statistically based methods.

本文档描述了可与自动确定的位置信息结合使用的方法。这些都是基于统计的方法。

1.1. Conventions and Terminology
1.1. 公约和术语

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[RFC2119]中所述进行解释。

This document assumes a basic understanding of the principles of mathematics, particularly statistics and geometry.

本文件假定对数学原理有基本了解,尤其是统计学和几何学。

Some terminology is borrowed from [RFC3693] and [RFC6280], in particular "Target".

一些术语借用自[RFC3693]和[RFC6280],尤其是“目标”。

Mathematical formulae are presented using the following notation: add "+", subtract "-", multiply "*", divide "/", power "^", and absolute value "|x|". Precedence follows established conventions: power operations precede multiply and divide, multiply and divide precede add and subtract, and parentheses are used to indicate operations that are applied together. Mathematical functions are represented by common abbreviations: square root "sqrt(x)", sine "sin(x)", cosine "cos(x)", inverse cosine "acos(x)", tangent "tan(x)", inverse tangent "atan(x)", two-argument inverse tangent "atan2(y,x)", error function "erf(x)", and inverse error function "erfinv(x)".

数学公式使用以下符号表示:加“+”、减“-”、乘“*”、除“/”、幂“^”和绝对值“|x |”。优先级遵循既定惯例:乘除之前的幂运算,加法和减法之前的乘法和除法,以及括号用于指示一起应用的运算。数学函数用常用缩写表示:平方根“sqrt(x)”、正弦“sin(x)”、余弦“cos(x)”、反余弦“acos(x)”、正切“tan(x)”、反正切“atan(x)”、双参数反正切“atan2(y,x)”、误差函数“erf(x)”和反误差函数“erfinv(x)”。

2. A General Definition of Uncertainty
2. 不确定性的一般定义

Uncertainty results from the limitations of measurement. In measuring any observable quantity, errors from a range of sources affect the result. Uncertainty is a quantification of what is known about the observed quantity, either through the limitations of measurement or through inherent variability of the quantity.

不确定度源于测量的局限性。在测量任何可观测量时,来自一系列来源的误差会影响结果。不确定度是通过测量限制或通过量的固有可变性,对已知的观测量进行量化。

Uncertainty is most completely described by a probability distribution. A probability distribution assigns a probability to possible values for the quantity.

不确定性最完全地用概率分布来描述。概率分布将概率分配给数量的可能值。

A probability distribution describing a measured quantity can be arbitrarily complex, so it is desirable to find a simplified model. One approach commonly taken is to reduce the probability distribution to a confidence interval. Many alternative models are used in other areas, but study of those is not the focus of this document.

描述测量量的概率分布可以是任意复杂的,因此需要找到一个简化模型。通常采用的一种方法是将概率分布降低到置信区间。其他领域使用了许多替代模型,但对这些模型的研究不是本文件的重点。

In addition to the central estimate of the observed quantity, a confidence interval is succinctly described by two values: an error range and a confidence. The error range describes an interval and the confidence describes an estimated upper bound on the probability that a "true" value is found within the extents defined by the error.

除了观测量的中心估计外,置信区间由两个值简洁地描述:误差范围和置信度。误差范围描述了一个区间,置信度描述了在误差定义的范围内发现“真”值的概率的估计上限。

In the following example, a measurement result for a length is shown as a nominal value with additional information on error range (0.0043 meters) and confidence (95%).

在下面的示例中,长度的测量结果显示为标称值,并包含关于误差范围(0.0043米)和置信度(95%)的附加信息。

      e.g., x = 1.00742 +/- 0.0043 meters at 95% confidence
        
      e.g., x = 1.00742 +/- 0.0043 meters at 95% confidence
        

This measurement result indicates that the value of "x" is between 1.00312 and 1.01172 meters with 95% probability. No other assertion is made: in particular, this does not assert that x is 1.00742.

该测量结果表明,“x”值在1.00312和1.01172米之间,概率为95%。没有做出其他断言:特别是,这没有断言x是1.00742。

Uncertainty and confidence for location estimates can be derived in a number of ways. This document does not attempt to enumerate the many methods for determining uncertainty. [ISO.GUM] and [NIST.TN1297] provide a set of general guidelines for determining and manipulating measurement uncertainty. This document applies that general guidance for consumers of location information.

位置估计的不确定性和置信度可以通过多种方式得出。本文件不试图列举确定不确定性的多种方法。[ISO.GUM]和[NIST.TN1297]为确定和操作测量不确定度提供了一套通用指南。本文件适用于位置信息消费者的一般指南。

As a statistical measure, values determined for uncertainty are found based on information in the aggregate, across numerous individual estimates. An individual estimate might be determined to be "correct" -- for example, by using a survey to validate the result -- without invalidating the statistical assertion.

作为一种统计度量,不确定性的确定值是基于多个单独估计值的汇总信息确定的。个人估计可能被确定为“正确”——例如,通过使用调查来验证结果——而不会使统计断言无效。

This understanding of estimates in the statistical sense explains why asserting a confidence of 100%, which might seem intuitively correct, is rarely advisable.

这种对统计意义上的估计的理解解释了为什么主张100%的置信度(直觉上似乎是正确的)很少是可取的。

2.1. Uncertainty as a Probability Distribution
2.1. 作为概率分布的不确定性

The Probability Density Function (PDF) that is described by uncertainty indicates the probability that the "true" value lies at any one point. The shape of the probability distribution can vary depending on the method that is used to determine the result. The two probability density functions most generally applicable to location information are considered in this document:

由不确定性描述的概率密度函数(PDF)表示“真”值位于任意一点的概率。概率分布的形状可能因用于确定结果的方法而异。本文件考虑了最普遍适用于位置信息的两个概率密度函数:

o The normal PDF (also referred to as a Gaussian PDF) is used where a large number of small random factors contribute to errors. The value used for the error range in a normal PDF is related to the standard deviation of the distribution.

o 正常PDF(也称为高斯PDF)用于大量小随机因素导致错误的情况。正常PDF中用于误差范围的值与分布的标准偏差有关。

o A rectangular PDF is used where the errors are known to be consistent across a limited range. A rectangular PDF can occur where a single error source, such as a rounding error, is significantly larger than other errors. A rectangular PDF is often described by the half-width of the distribution; that is, half the width of the distribution.

o 如果已知错误在有限范围内是一致的,则使用矩形PDF。当单个误差源(如舍入误差)明显大于其他误差时,可能会出现矩形PDF。矩形PDF通常用分布的一半宽度来描述;也就是说,分布宽度的一半。

Each of these probability density functions can be characterized by its center point, or mean, and its width. For a normal distribution, uncertainty and confidence together are related to the standard deviation of the function (see Section 5.4). For a rectangular distribution, the half-width of the distribution is used.

这些概率密度函数中的每一个都可以用其中心点或平均值及其宽度来表示。对于正态分布,不确定度和置信度共同与函数的标准偏差有关(见第5.4节)。对于矩形分布,使用分布的一半宽度。

Figure 1 shows a normal and rectangular probability density function with the mean (m) and standard deviation (s) labeled. The half-width (h) of the rectangular distribution is also indicated.

图1显示了标有平均值(m)和标准偏差(s)的正态和矩形概率密度函数。还显示了矩形分布的半宽度(h)。

                                *****             *** Normal PDF
                              **  :  **           --- Rectangular PDF
                            **    :    **
                           **     :     **
                .---------*---------------*---------.
                |        **       :       **        |
                |       **        :        **       |
                |      * <-- s -->:          *      |
                |     * :         :         : *     |
                |    **           :           **    |
                |   *   :         :         :   *   |
                |  *              :              *  |
                |**     :         :         :     **|
               **                 :                 **
            *** |       :         :         :       | ***
        *****   |                 :<------ h ------>|   *****
    .****-------+.......:.........:.........:.......+-------*****.
                                  m
        
                                *****             *** Normal PDF
                              **  :  **           --- Rectangular PDF
                            **    :    **
                           **     :     **
                .---------*---------------*---------.
                |        **       :       **        |
                |       **        :        **       |
                |      * <-- s -->:          *      |
                |     * :         :         : *     |
                |    **           :           **    |
                |   *   :         :         :   *   |
                |  *              :              *  |
                |**     :         :         :     **|
               **                 :                 **
            *** |       :         :         :       | ***
        *****   |                 :<------ h ------>|   *****
    .****-------+.......:.........:.........:.......+-------*****.
                                  m
        

Figure 1: Normal and Rectangular Probability Density Functions

图1:正态和矩形概率密度函数

For a given PDF, the value of the PDF describes the probability that the "true" value is found at that point. Confidence for any given interval is the total probability of the "true" value being in that range, defined as the integral of the PDF over the interval.

对于给定的PDF,PDF的值描述了在该点找到“真”值的概率。任何给定区间的置信度是“真”值在该范围内的总概率,定义为该区间内PDF的积分。

The probability of the "true" value falling between two points is found by finding the area under the curve between the points (that is, the integral of the curve between the points). For any given PDF, the area under the curve for the entire range from negative infinity to positive infinity is 1 or (100%). Therefore, the confidence over any interval of uncertainty is always less than 100%.

通过查找点之间曲线下的面积(即点之间曲线的积分),可以找到两点之间的“真”值概率。对于任何给定的PDF,在从负无穷大到正无穷大的整个范围内,曲线下的面积为1或(100%)。因此,任何不确定性区间的置信度始终小于100%。

Figure 2 shows how confidence is determined for a normal distribution. The area of the shaded region gives the confidence (c) for the interval between "m-u" and "m+u".

图2显示了如何确定正态分布的置信度。阴影区域的面积给出了“m-u”和“m+u”之间间隔的置信度(c)。

                                *****
                              **:::::**
                            **:::::::::**
                           **:::::::::::**
                          *:::::::::::::::*
                         **:::::::::::::::**
                        **:::::::::::::::::**
                       *:::::::::::::::::::::*
                      *:::::::::::::::::::::::*
                     **:::::::::::::::::::::::**
                    *:::::::::::: c ::::::::::::*
                   *:::::::::::::::::::::::::::::*
                 **|:::::::::::::::::::::::::::::|**
               **  |:::::::::::::::::::::::::::::|  **
            ***    |:::::::::::::::::::::::::::::|    ***
        *****      |:::::::::::::::::::::::::::::|      *****
    .****..........!:::::::::::::::::::::::::::::!..........*****.
                   |              |              |
                 (m-u)            m            (m+u)
        
                                *****
                              **:::::**
                            **:::::::::**
                           **:::::::::::**
                          *:::::::::::::::*
                         **:::::::::::::::**
                        **:::::::::::::::::**
                       *:::::::::::::::::::::*
                      *:::::::::::::::::::::::*
                     **:::::::::::::::::::::::**
                    *:::::::::::: c ::::::::::::*
                   *:::::::::::::::::::::::::::::*
                 **|:::::::::::::::::::::::::::::|**
               **  |:::::::::::::::::::::::::::::|  **
            ***    |:::::::::::::::::::::::::::::|    ***
        *****      |:::::::::::::::::::::::::::::|      *****
    .****..........!:::::::::::::::::::::::::::::!..........*****.
                   |              |              |
                 (m-u)            m            (m+u)
        

Figure 2: Confidence as the Integral of a PDF

图2:作为PDF积分的置信度

In Section 5.4, methods are described for manipulating uncertainty if the shape of the PDF is known.

第5.4节描述了在PDF形状已知的情况下操纵不确定性的方法。

2.2. Deprecation of the Terms "Precision" and "Resolution"
2.2. “精度”和“分辨率”这两个术语的弃用

The terms "Precision" and "Resolution" are defined in RFC 3693 [RFC3693]. These definitions were intended to provide a common nomenclature for discussing uncertainty; however, these particular terms have many different uses in other fields, and their definitions are not sufficient to avoid confusion about their meaning. These terms are unsuitable for use in relation to quantitative concepts when discussing uncertainty and confidence in relation to location information.

术语“精度”和“分辨率”在RFC 3693[RFC3693]中定义。这些定义旨在为讨论不确定性提供通用术语;然而,这些特定术语在其他领域有许多不同的用途,它们的定义不足以避免对其含义的混淆。在讨论位置信息的不确定性和置信度时,这些术语不适合用于定量概念。

2.3. Accuracy as a Qualitative Concept
2.3. 作为定性概念的准确性

Uncertainty is a quantitative concept. The term "accuracy" is useful in describing, qualitatively, the general concepts of location information. Accuracy is generally useful when describing qualitative aspects of location estimates. Accuracy is not a suitable term for use in a quantitative context.

不确定性是一个定量概念。术语“准确性”在定性地描述位置信息的一般概念时很有用。在描述位置估计的定性方面时,精度通常是有用的。准确度不是一个适合在定量环境中使用的术语。

For instance, it could be appropriate to say that a location estimate with uncertainty "X" is more accurate than a location estimate with uncertainty "2X" at the same confidence. It is not appropriate to assign a number to "accuracy", nor is it appropriate to refer to any component of uncertainty or confidence as "accuracy". That is, saying the "accuracy" for the first location estimate is "X" would be an erroneous use of this term.

例如,可以适当地说,在相同的置信度下,不确定度为“X”的位置估计比不确定度为“2X”的位置估计更准确。将数字指定为“准确度”是不合适的,也不适合将不确定度或置信度的任何组成部分称为“准确度”。也就是说,将第一次位置估计的“准确度”称为“X”将是对该术语的错误使用。

3. Uncertainty in Location
3. 位置不确定性

A "location estimate" is the result of location determination. A location estimate is subject to uncertainty like any other observation. However, unlike a simple measure of a one dimensional property like length, a location estimate is specified in two or three dimensions.

“位置估计”是位置确定的结果。与任何其他观测一样,位置估计也存在不确定性。然而,与一维属性(如长度)的简单度量不同,位置估计是在二维或三维中指定的。

Uncertainty in two- or three-dimensional locations can be described using confidence intervals. The confidence interval for a location estimate in two- or three-dimensional space is expressed as a subset of that space. This document uses the term "region of uncertainty" to refer to the area or volume that describes the confidence interval.

二维或三维位置的不确定性可用置信区间来描述。二维或三维空间中位置估计的置信区间表示为该空间的子集。本文件使用术语“不确定区域”指描述置信区间的面积或体积。

Areas or volumes that describe regions of uncertainty can be formed by the combination of two or three one-dimensional ranges, or more complex shapes could be described (for example, the shapes in [RFC5491]).

描述不确定区域的区域或体积可以通过两个或三个一维范围的组合形成,或者可以描述更复杂的形状(例如,[RFC5491]中的形状)。

3.1. Targets as Points in Space
3.1. 作为空间点的目标

This document makes a simplifying assumption that the Target of the PIDF-LO occupies just a single point in space. While this is clearly false in virtually all scenarios with any practical application, it is often a reasonable simplifying assumption to make.

本文件提出了一个简化假设,即PIDF-LO的目标仅占据空间中的一个点。虽然这在任何实际应用的几乎所有场景中都是明显错误的,但这通常是一个合理的简化假设。

To a large extent, whether this simplification is valid depends on the size of the Target relative to the size of the uncertainty region. When locating a personal device using contemporary location determination techniques, the space the device occupies relative to

在很大程度上,这种简化是否有效取决于目标相对于不确定区域的大小。当使用当代位置确定技术定位个人设备时,设备占用的相对空间

the uncertainty is proportionally quite small. Even where that device is used as a proxy for a person, the proportions change little.

不确定性在比例上相当小。即使该设备被用作一个人的代理,比例变化也很小。

This assumption is less useful as uncertainty becomes small relative to the size of the Target of the PIDF-LO (or conversely, as uncertainty becomes small relative to the Target). For instance, describing the location of a football stadium or small country would include a region of uncertainty that is only slightly larger than the Target itself. In these cases, much of the guidance in this document is not applicable. Indeed, as the accuracy of location determination technology improves, it could be that the advice this document contains becomes less relevant by the same measure.

当不确定性相对于PIDF-LO目标尺寸变小时(或相反,当不确定性相对于目标尺寸变小时),该假设不太有用。例如,描述足球场或小国的位置将包括一个仅略大于目标本身的不确定区域。在这些情况下,本文件中的大部分指南不适用。事实上,随着定位技术准确性的提高,本文件所包含的建议也可能变得不那么相关。

3.2. Representation of Uncertainty and Confidence in PIDF-LO
3.2. PIDF-LO中不确定性和置信度的表示

A set of shapes suitable for the expression of uncertainty in location estimates in the PIDF-LO are described in [GeoShape]. These shapes are the recommended form for the representation of uncertainty in PIDF-LO [RFC4119] documents.

[GeoShape]中描述了一组适用于PIDF-LO中位置估计不确定性表达的形状。这些形状是PIDF-LO[RFC4119]文件中不确定性表示的推荐形式。

The PIDF-LO can contain uncertainty, but it does not include an indication of confidence. [RFC5491] defines a fixed value of 95%. Similarly, the PIDF-LO format does not provide an indication of the shape of the PDF. Section 4 defines elements to convey this information in PIDF-LO.

PIDF-LO可以包含不确定性,但不包括置信度指示。[RFC5491]定义了95%的固定值。类似地,PIDF-LO格式不提供PDF形状的指示。第4节定义了在PIDF-LO中传达该信息的元素。

Absence of uncertainty information in a PIDF-LO document does not indicate that there is no uncertainty in the location estimate. Uncertainty might not have been calculated for the estimate, or it may be withheld for privacy purposes.

PIDF-LO文件中没有不确定性信息并不表示位置估计中没有不确定性。不确定性可能未计算出估算值,也可能出于隐私目的而保留。

If the Point shape is used, confidence and uncertainty are unknown; a receiver can either assume a confidence of 0% or infinite uncertainty. The same principle applies on the altitude axis for two-dimensional shapes like the Circle.

如果使用点形状,则置信度和不确定性未知;接收机可以假设置信度为0%或无限不确定性。同样的原理也适用于二维形状(如圆)的高度轴。

3.3. Uncertainty and Confidence for Civic Addresses
3.3. 公民演说的不确定性与自信

Automatically determined civic addresses [RFC5139] inherently include uncertainty, based on the area of the most precise element that is specified. In this case, uncertainty is effectively described by the presence or absence of elements. To the recipient of location information, elements that are not present are uncertain.

根据指定的最精确元素的面积,自动确定的公民地址[RFC5139]固有地包含不确定性。在这种情况下,不确定性通过元素的存在或不存在有效地描述。对于位置信息的接收者来说,不存在的元素是不确定的。

To apply the concept of uncertainty to civic addresses, it is helpful to unify the conceptual models of civic address with geodetic location information. This is particularly useful when considering

将不确定性的概念应用于城市地址,有助于将城市地址的概念模型与大地位置信息统一起来。这在考虑时特别有用

civic addresses that are determined using reverse geocoding (that is, the process of translating geodetic information into civic addresses).

使用反向地理编码确定的公民地址(即,将大地测量信息转换为公民地址的过程)。

In the unified view, a civic address defines a series of (sometimes non-orthogonal) spatial partitions. The first is the implicit partition that identifies the surface of the earth and the space near the surface. The second is the country. Each label that is included in a civic address provides information about a different set of spatial partitions. Some partitions require slight adjustments from a standard interpretation: for instance, a road includes all properties that adjoin the street. Each label might need to be interpreted with other values to provide context.

在统一视图中,市政地址定义了一系列(有时是非正交的)空间分区。第一种是隐式划分,用于确定地球表面和表面附近的空间。第二个是国家。公民地址中包含的每个标签都提供关于不同空间分区集的信息。某些分区需要根据标准解释进行轻微调整:例如,道路包含与街道相邻的所有属性。可能需要使用其他值解释每个标签,以提供上下文。

As a value at each level is interpreted, one or more spatial partitions at that level are selected, and all other partitions of that type are excluded. For non-orthogonal partitions, only the portion of the partition that fits within the existing space is selected. This is what distinguishes King Street in Sydney from King Street in Melbourne. Each defined element selects a partition of space. The resulting location is the intersection of all selected spaces.

在解释每个级别的值时,将选择该级别的一个或多个空间分区,并排除该类型的所有其他分区。对于非正交分区,仅选择适合现有空间的分区部分。这就是悉尼国王街与墨尔本国王街的区别。每个定义的元素选择一个空间分区。生成的位置是所有选定空间的交点。

The resulting spatial partition can be considered as a region of uncertainty.

由此产生的空间划分可被视为一个不确定区域。

Note: This view is a potential perspective on the process of geocoding -- the translation of a civic address to a geodetic location.

注:这一观点是地理编码过程的一个潜在视角——将公民地址转换为地理位置。

Uncertainty in civic addresses can be increased by removing elements. This does not increase confidence unless additional information is used. Similarly, arbitrarily increasing uncertainty in a geodetic location does not increase confidence.

删除元素可以增加公民地址的不确定性。除非使用其他信息,否则这不会增加信心。同样,任意增加大地测量位置的不确定性也不会增加可信度。

3.4. DHCP Location Configuration Information and Uncertainty
3.4. DHCP位置配置信息和不确定性

Location information is often measured in two or three dimensions; expressions of uncertainty in one dimension only are rare. The "resolution" parameters in [RFC6225] provide an indication of how many bits of a number are valid, which could be interpreted as an expression of uncertainty in one dimension.

位置信息通常以二维或三维测量;仅在一维中表达不确定性的情况很少。[RFC6225]中的“分辨率”参数表示一个数字中有多少位是有效的,可以解释为一维不确定性的表达式。

[RFC6225] defines a means for representing uncertainty, but a value for confidence is not specified. A default value of 95% confidence should be assumed for the combination of the uncertainty on each axis. This is consistent with the transformation of those forms into

[RFC6225]定义了表示不确定性的方法,但未指定置信度值。对于各轴上的不确定度组合,应假设95%置信度的默认值。这与将这些形式转化为

the uncertainty representations from [RFC5491]. That is, the confidence of the resultant rectangular Polygon or Prism is assumed to be 95%.

[RFC5491]中的不确定度表示。也就是说,合成的矩形多边形或棱柱体的置信度假定为95%。

4. Representation of Confidence in PIDF-LO
4. PIDF-LO中的置信度表示

On the whole, a fixed definition for confidence is preferable, primarily because it ensures consistency between implementations. Location generators that are aware of this constraint can generate location information at the required confidence. Location recipients are able to make sensible assumptions about the quality of the information that they receive.

总的来说,一个固定的置信度定义更可取,主要是因为它确保了实现之间的一致性。知道此约束的位置生成器可以以所需的置信度生成位置信息。位置接收者能够对他们接收到的信息的质量做出合理的假设。

In some circumstances -- particularly with preexisting systems -- location generators might be unable to provide location information with consistent confidence. Existing systems sometimes specify confidence at 38%, 67%, or 90%. Existing forms of expressing location information, such as that defined in [TS-3GPP-23_032], contain elements that express the confidence in the result.

在某些情况下——特别是在已有系统的情况下——位置生成器可能无法提供具有一致可信度的位置信息。现有系统有时规定置信度为38%、67%或90%。表示位置信息的现有形式,如[TS-3GPP-23032]中定义的形式,包含表示结果可信度的元素。

The addition of a confidence element provides information that was previously unavailable to recipients of location information. Without this information, a location server or generator that has access to location information with a confidence lower than 95% has two options:

添加置信元素可提供位置信息接收者以前无法获得的信息。如果没有此信息,可以访问置信度低于95%的位置信息的位置服务器或生成器有两个选项:

o The location server can scale regions of uncertainty in an attempt to achieve 95% confidence. This scaling process significantly degrades the quality of the information, because the location server might not have the necessary information to scale appropriately; the location server is forced to make assumptions that are likely to result in either an overly conservative estimate with high uncertainty or an overestimate of confidence.

o 定位服务器可以扩展不确定区域,以达到95%的置信度。这种扩展过程会显著降低信息的质量,因为位置服务器可能没有必要的信息进行适当的扩展;定位服务器被迫做出可能导致高度不确定性的过度保守估计或信心高估的假设。

o The location server can ignore the confidence entirely, which results in giving the recipient a false impression of its quality.

o 定位服务器可以完全忽略信任度,这会导致收件人对其质量产生错误印象。

Both of these choices degrade the quality of the information provided.

这两种选择都会降低所提供信息的质量。

The addition of a confidence element avoids this problem entirely if a location recipient supports and understands the element. A recipient that does not understand -- and, hence, ignores -- the confidence element is in no worse a position than if the location server ignored confidence.

如果位置接收者支持并理解该元素,则添加置信元素可完全避免此问题。与位置服务器忽略信心相比,不理解信心元素(因此忽略了信心元素)的接收者的处境并不差。

4.1. The "confidence" Element
4.1. “信心”因素

The "confidence" element MAY be added to the "location-info" element of the PIDF-LO [RFC4119] document. This element expresses the confidence in the associated location information as a percentage. A special "unknown" value is reserved to indicate that confidence is supported, but not known to the Location Generator.

“信心”元素可以添加到PIDF-LO[RFC4119]文档的“位置信息”元素中。此元素表示关联位置信息的置信度(百分比)。保留一个特殊的“未知”值,表示支持置信度,但位置生成器不知道。

The "confidence" element optionally includes an attribute that indicates the shape of the PDF of the associated region of uncertainty. Three values are possible: unknown, normal, and rectangular.

“置信度”元素可选地包括指示相关不确定区域的PDF形状的属性。可能有三个值:未知、正常和矩形。

Indicating a particular PDF only indicates that the distribution approximately fits the given shape based on the methods used to generate the location information. The PDF is normal if there are a large number of small, independent sources of error. It is rectangular if all points within the area have roughly equal probability of being the actual location of the Target. Otherwise, the PDF MUST either be set to unknown or omitted.

指示特定PDF仅表示基于用于生成位置信息的方法,分布大致符合给定形状。如果存在大量小的、独立的错误源,则PDF是正常的。如果区域内的所有点成为目标实际位置的概率大致相等,则为矩形。否则,PDF必须设置为未知或忽略。

If a PIDF-LO does not include the confidence element, the confidence of the location estimate is 95%, as defined in [RFC5491].

如果PIDF-LO不包括置信元素,则位置估计的置信度为95%,如[RFC5491]中所定义。

A Point shape does not have uncertainty (or it has infinite uncertainty), so confidence is meaningless for a Point; therefore, this element MUST be omitted if only a Point is provided.

一个点形状没有不确定性(或者它有无限的不确定性),所以信心对于一个点来说是没有意义的;因此,如果只提供了一个点,则必须省略此元素。

4.2. Generating Locations with Confidence
4.2. 自信地生成位置

Location generators SHOULD attempt to ensure that confidence is equal in each dimension when generating location information. This restriction, while not always practical, allows for more accurate scaling, if scaling is necessary.

在生成位置信息时,位置生成器应尝试确保每个维度的置信度相等。这种限制虽然并不总是实用,但如果需要缩放,则允许更精确的缩放。

A confidence element MUST be included with all location information that includes uncertainty (that is, all forms other than a Point). A special "unknown" is used if confidence is not known.

置信元素必须包含所有包含不确定性的位置信息(即,点以外的所有形式)。如果信心未知,则使用特殊的“未知”。

4.3. Consuming and Presenting Confidence
4.3. 消费和展示自信

The inclusion of confidence that is anything other than 95% presents a potentially difficult usability problem for applications that use location information. Effectively communicating the probability that a location is incorrect to a user can be difficult.

对于使用位置信息的应用程序来说,包含95%以外的置信度是一个潜在的困难可用性问题。很难有效地向用户传达位置不正确的概率。

It is inadvisable to simply display locations of any confidence, or to display confidence in a separate or non-obvious fashion. If locations with different confidence levels are displayed such that the distinction is subtle or easy to overlook -- such as using fine graduations of color or transparency for graphical uncertainty regions or displaying uncertainty graphically, but providing confidence as supplementary text -- a user could fail to notice a difference in the quality of the location information that might be significant.

不宜简单地显示任何自信的位置,或以单独或不明显的方式显示自信。如果显示具有不同置信水平的位置,使得区别很微妙或容易忽略,例如对图形不确定性区域使用颜色或透明度的精细刻度,或以图形方式显示不确定性,但是,作为补充文本提供信心——用户可能不会注意到位置信息质量上的差异,这可能非常重要。

Depending on the circumstances, different ways of handling confidence might be appropriate. Section 5 describes techniques that could be appropriate for consumers that use automated processing.

视情况而定,处理信心的不同方式可能是合适的。第5节描述了适用于使用自动化处理的消费者的技术。

Providing that the full implications of any choice for the application are understood, some amount of automated processing could be appropriate. In a simple example, applications could choose to discard or suppress the display of location information if confidence does not meet a predetermined threshold.

如果理解了应用程序的任何选择的全部含义,那么一定量的自动化处理可能是合适的。在一个简单的示例中,如果置信度不满足预定阈值,应用程序可以选择放弃或抑制位置信息的显示。

In settings where there is an opportunity for user training, some of these problems might be mitigated by defining different operational procedures for handling location information at different confidence levels.

在有机会进行用户培训的环境中,可以通过定义不同的操作程序以不同的置信度处理位置信息来缓解其中的一些问题。

5. Manipulation of Uncertainty
5. 操纵不确定性

This section deals with manipulation of location information that contains uncertainty.

本节讨论包含不确定性的位置信息的操作。

The following rules generally apply when manipulating location information:

操作位置信息时,通常应用以下规则:

o Where calculations are performed on coordinate information, these should be performed in Cartesian space and the results converted back to latitude, longitude, and altitude. A method for converting to and from Cartesian coordinates is included in Appendix A.

o 如果对坐标信息执行计算,则应在笛卡尔空间中执行这些计算,并将结果转换回纬度、经度和高度。附录A中包含了与笛卡尔坐标转换的方法。

While some approximation methods are useful in simplifying calculations, treating latitude and longitude as Cartesian axes is never advisable. The two axes are not orthogonal. Errors can arise from the curvature of the earth and from the convergence of longitude lines.

虽然某些近似方法有助于简化计算,但将纬度和经度视为笛卡尔坐标轴并不可取。这两个轴不是正交的。误差可能来自地球的曲率和经线的会聚。

o Normal rounding rules do not apply when rounding uncertainty. When rounding, the region of uncertainty always increases (that is, errors are rounded up) and confidence is always rounded down (see [NIST.TN1297]). This means that any manipulation of uncertainty is a non-reversible operation; each manipulation can result in the loss of some information.

o 当舍入不确定性时,正常舍入规则不适用。四舍五入时,不确定区域总是增加(即误差向上四舍五入),置信度总是向下四舍五入(见[NIST.TN1297])。这意味着对不确定性的任何操纵都是不可逆的操作;每次操作都可能导致某些信息的丢失。

5.1. Reduction of a Location Estimate to a Point
5.1. 将位置估计减少到一个点

Manipulating location estimates that include uncertainty information requires additional complexity in systems. In some cases, systems only operate on definitive values, that is, a single point.

操纵包含不确定性信息的位置估计需要增加系统的复杂性。在某些情况下,系统仅在确定值(即单点)上运行。

This section describes algorithms for reducing location estimates to a simple form without uncertainty information. Having a consistent means for reducing location estimates allows for interaction between applications that are able to use uncertainty information and those that cannot.

本节描述了将位置估计简化为无不确定性信息的简单形式的算法。使用一致的方法来减少位置估计,可以在能够使用不确定性信息的应用程序和不能使用不确定性信息的应用程序之间进行交互。

Note: Reduction of a location estimate to a point constitutes a reduction in information. Removing uncertainty information can degrade results in some applications. Also, there is a natural tendency to misinterpret a Point location as representing a location without uncertainty. This could lead to more serious errors. Therefore, these algorithms should only be applied where necessary.

注:将位置估计减少到某一点即构成信息的减少。在某些应用中,删除不确定性信息会降低结果。此外,存在一种自然的倾向,即将点位置误解为表示没有不确定性的位置。这可能会导致更严重的错误。因此,这些算法只应在必要时应用。

Several different approaches can be taken when reducing a location estimate to a point. Different methods each make a set of assumptions about the properties of the PDF and the selected point; no one method is more "correct" than any other. For any given region of uncertainty, selecting an arbitrary point within the area could be considered valid; however, given the aforementioned problems with Point locations, a more rigorous approach is appropriate.

当将位置估计减少到某一点时,可以采取几种不同的方法。不同的方法分别对PDF和选定点的属性进行一组假设;没有一种方法比其他方法更“正确”。对于任何给定的不确定区域,在该区域内选择任意点都可以被认为是有效的;然而,鉴于上述点位置问题,更严格的方法是合适的。

Given a result with a known distribution, selecting the point within the area that has the highest probability is a more rigorous method. Alternatively, a point could be selected that minimizes the overall error; that is, it minimizes the expected value of the difference between the selected point and the "true" value.

给定已知分布的结果,在区域内选择概率最高的点是更严格的方法。或者,可以选择一个使总体误差最小化的点;也就是说,它使所选点和“真”值之间的差值的预期值最小化。

If a rectangular distribution is assumed, the centroid of the area or volume minimizes the overall error. Minimizing the error for a normal distribution is mathematically complex. Therefore, this document opts to select the centroid of the region of uncertainty when selecting a point.

如果假设为矩形分布,则面积或体积的质心将使总体误差最小化。最小化正态分布的误差在数学上是复杂的。因此,本文件选择在选择点时选择不确定区域的质心。

5.1.1. Centroid Calculation
5.1.1. 质心计算

For regular shapes, such as Circle, Sphere, Ellipse, and Ellipsoid, this approach equates to the center point of the region. For regions of uncertainty that are expressed as regular Polygons and Prisms, the center point is also the most appropriate selection.

对于规则形状,例如圆形、球体、椭圆和椭球体,此方法等同于区域的中心点。对于表示为正多边形和棱镜的不确定区域,中心点也是最合适的选择。

For the Arc-Band shape and non-regular Polygons and Prisms, selecting the centroid of the area or volume minimizes the overall error. This assumes that the PDF is rectangular.

对于弧形条带形状和非规则多边形及棱柱,选择区域或体积的质心可将总体误差降至最低。这假设PDF是矩形的。

Note: The centroid of a concave Polygon or Arc-Band shape is not necessarily within the region of uncertainty.

注:凹多边形或弧带形状的质心不一定在不确定区域内。

5.1.1.1. Arc-Band Centroid
5.1.1.1. 弧带形心

The centroid of the Arc-Band shape is found along a line that bisects the arc. The centroid can be found at the following distance from the starting point of the arc-band (assuming an arc-band with an inner radius of "r", outer radius "R", start angle "a", and opening angle "o"):

沿将圆弧平分的直线找到圆弧带状形状的质心。质心位于弧带起点以下距离处(假设弧带内径为“r”、外径为“r”、起始角为“a”且开口角为“o”):

      d = 4 * sin(o/2) * (R*R + R*r + r*r) / (3*o*(R + r))
        
      d = 4 * sin(o/2) * (R*R + R*r + r*r) / (3*o*(R + r))
        

This point can be found along the line that bisects the arc; that is, the line at an angle of "a + (o/2)".

该点可沿弧的平分线找到;也就是说,线的角度为“a+(o/2)”。

5.1.1.2. Polygon Centroid
5.1.1.2. 多边形质心

Calculating a centroid for the Polygon and Prism shapes is more complex. Polygons that are specified using geodetic coordinates are not necessarily coplanar. For Polygons that are specified without an altitude, choose a value for altitude before attempting this process; an altitude of 0 is acceptable.

计算多边形和棱柱形状的质心更为复杂。使用大地坐标指定的多边形不一定是共面的。对于未指定高度的多边形,请在尝试此过程之前为高度选择一个值;高度为0是可以接受的。

The method described in this section is simplified by assuming that the surface of the earth is locally flat. This method degrades as polygons become larger; see [GeoShape] for recommendations on polygon size.

假设地球表面局部平坦,简化了本节所述方法。这种方法随着多边形变大而退化;有关多边形大小的建议,请参见[GeoShape]。

The polygon is translated to a new coordinate system that has an x-y plane roughly parallel to the polygon. This enables the elimination of z-axis values and calculating a centroid can be done using only x and y coordinates. This requires that the upward normal for the polygon be known.

多边形将转换为一个新的坐标系,该坐标系的x-y平面大致平行于多边形。这样可以消除z轴值,并且仅使用x和y坐标即可计算质心。这需要知道多边形的向上法线。

   To translate the polygon coordinates, apply the process described in
   Appendix B to find the normal vector "N = [Nx,Ny,Nz]".  This value
   should be made a unit vector to ensure that the transformation matrix
   is a special orthogonal matrix.  From this vector, select two vectors
   that are perpendicular to this vector and combine these into a
   transformation matrix.
        
   To translate the polygon coordinates, apply the process described in
   Appendix B to find the normal vector "N = [Nx,Ny,Nz]".  This value
   should be made a unit vector to ensure that the transformation matrix
   is a special orthogonal matrix.  From this vector, select two vectors
   that are perpendicular to this vector and combine these into a
   transformation matrix.
        

If "Nx" and "Ny" are non-zero, the matrices in Figure 3 can be used, given "p = sqrt(Nx^2 + Ny^2)". More transformations are provided later in this section for cases where "Nx" or "Ny" are zero.

如果“Nx”和“Ny”不为零,则可以使用图3中的矩阵,给定“p=sqrt(Nx^2+Ny^2)”。本节后面将针对“Nx”或“Ny”为零的情况提供更多转换。

          [   -Ny/p     Nx/p     0  ]         [ -Ny/p  -Nx*Nz/p  Nx ]
      T = [ -Nx*Nz/p  -Ny*Nz/p   p  ]    T' = [  Nx/p  -Ny*Nz/p  Ny ]
          [    Nx        Ny      Nz ]         [   0      p       Nz ]
                 (Transform)                    (Reverse Transform)
        
          [   -Ny/p     Nx/p     0  ]         [ -Ny/p  -Nx*Nz/p  Nx ]
      T = [ -Nx*Nz/p  -Ny*Nz/p   p  ]    T' = [  Nx/p  -Ny*Nz/p  Ny ]
          [    Nx        Ny      Nz ]         [   0      p       Nz ]
                 (Transform)                    (Reverse Transform)
        

Figure 3: Recommended Transformation Matrices

图3:推荐的转换矩阵

To apply a transform to each point in the polygon, form a matrix from the Cartesian Earth-Centered, Earth-Fixed (ECEF) coordinates and use matrix multiplication to determine the translated coordinates.

要对多边形中的每个点应用变换,请从笛卡尔地球中心固定地球(ECEF)坐标形成矩阵,并使用矩阵乘法确定转换后的坐标。

      [   -Ny/p     Nx/p     0  ]   [ x[1]  x[2]  x[3]  ...  x[n] ]
      [ -Nx*Nz/p  -Ny*Nz/p   p  ] * [ y[1]  y[2]  y[3]  ...  y[n] ]
      [    Nx        Ny      Nz ]   [ z[1]  z[2]  z[3]  ...  z[n] ]
        
      [   -Ny/p     Nx/p     0  ]   [ x[1]  x[2]  x[3]  ...  x[n] ]
      [ -Nx*Nz/p  -Ny*Nz/p   p  ] * [ y[1]  y[2]  y[3]  ...  y[n] ]
      [    Nx        Ny      Nz ]   [ z[1]  z[2]  z[3]  ...  z[n] ]
        
          [ x'[1]  x'[2]  x'[3]  ... x'[n] ]
        = [ y'[1]  y'[2]  y'[3]  ... y'[n] ]
          [ z'[1]  z'[2]  z'[3]  ... z'[n] ]
        
          [ x'[1]  x'[2]  x'[3]  ... x'[n] ]
        = [ y'[1]  y'[2]  y'[3]  ... y'[n] ]
          [ z'[1]  z'[2]  z'[3]  ... z'[n] ]
        

Figure 4: Transformation

图4:转换

Alternatively, direct multiplication can be used to achieve the same result:

或者,可以使用直接乘法来实现相同的结果:

      x'[i] = -Ny * x[i] / p + Nx * y[i] / p
        
      x'[i] = -Ny * x[i] / p + Nx * y[i] / p
        
      y'[i] = -Nx * Nz * x[i] / p - Ny * Nz * y[i] / p + p * z[i]
        
      y'[i] = -Nx * Nz * x[i] / p - Ny * Nz * y[i] / p + p * z[i]
        
      z'[i] = Nx * x[i] + Ny * y[i] + Nz * z[i]
        
      z'[i] = Nx * x[i] + Ny * y[i] + Nz * z[i]
        

The first and second rows of this matrix ("x'" and "y'") contain the values that are used to calculate the centroid of the polygon. To find the centroid of this polygon, first find the area using:

该矩阵的第一行和第二行(“x’”和“y’”)包含用于计算多边形质心的值。要查找此多边形的质心,请首先使用以下命令查找该区域:

      A = sum from i=1..n of (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / 2
        
      A = sum from i=1..n of (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / 2
        

For these formulae, treat each set of coordinates as circular, that is "x'[0] == x'[n]" and "x'[n+1] == x'[1]". Based on the area, the centroid along each axis can be determined by:

对于这些公式,将每组坐标视为圆形,即“x'[0]==x'[n]”和“x'[n+1]==x'[1]”。根据面积,沿各轴的质心可通过以下方式确定:

      Cx' = sum (x'[i]+x'[i+1]) * (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / (6*A)
        
      Cx' = sum (x'[i]+x'[i+1]) * (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / (6*A)
        
      Cy' = sum (y'[i]+y'[i+1]) * (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / (6*A)
        
      Cy' = sum (y'[i]+y'[i+1]) * (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / (6*A)
        

Note: The formula for the area of a polygon will return a negative value if the polygon is specified in a clockwise direction. This can be used to determine the orientation of the polygon.

注意:如果按顺时针方向指定多边形,则多边形面积公式将返回负值。这可用于确定多边形的方向。

The third row contains a distance from a plane parallel to the polygon. If the polygon is coplanar, then the values for "z'" are identical; however, the constraints recommended in [RFC5491] mean that this is rarely the case. To determine "Cz'", average these values:

第三行包含与平行于多边形的平面之间的距离。如果多边形共面,则“z”的值相同;然而,[RFC5491]中建议的约束条件意味着这种情况很少发生。要确定“Cz”,将这些值取平均值:

Cz' = sum z'[i] / n

Cz'=总和z'[i]/n

Once the centroid is known in the transformed coordinates, these can be transformed back to the original coordinate system. The reverse transformation is shown in Figure 5.

一旦变换坐标中的质心已知,就可以将其变换回原始坐标系。反向转换如图5所示。

      [ -Ny/p  -Nx*Nz/p  Nx ]     [       Cx'        ]   [ Cx ]
      [  Nx/p  -Ny*Nz/p  Ny ]  *  [       Cy'        ] = [ Cy ]
      [   0        p     Nz ]     [ sum of z'[i] / n ]   [ Cz ]
        
      [ -Ny/p  -Nx*Nz/p  Nx ]     [       Cx'        ]   [ Cx ]
      [  Nx/p  -Ny*Nz/p  Ny ]  *  [       Cy'        ] = [ Cy ]
      [   0        p     Nz ]     [ sum of z'[i] / n ]   [ Cz ]
        

Figure 5: Reverse Transformation

图5:反向转换

The reverse transformation can be applied directly as follows:

反向转换可直接应用,如下所示:

      Cx = -Ny * Cx' / p - Nx * Nz * Cy' / p + Nx * Cz'
        
      Cx = -Ny * Cx' / p - Nx * Nz * Cy' / p + Nx * Cz'
        
      Cy = Nx * Cx' / p - Ny * Nz * Cy' / p + Ny * Cz'
        
      Cy = Nx * Cx' / p - Ny * Nz * Cy' / p + Ny * Cz'
        
      Cz = p * Cy' + Nz * Cz'
        
      Cz = p * Cy' + Nz * Cz'
        

The ECEF value "[Cx,Cy,Cz]" can then be converted back to geodetic coordinates. Given a polygon that is defined with no altitude or equal altitudes for each point, the altitude of the result can be either ignored or reset after converting back to a geodetic value.

ECEF值“[Cx,Cy,Cz]”可以转换回大地坐标。对于定义为每个点没有高度或高度相等的多边形,可以忽略结果的高度,也可以在转换回大地测量值后重置结果的高度。

The centroid of the Prism shape is found by finding the centroid of the base polygon and raising the point by half the height of the prism. This can be added to altitude of the final result; alternatively, this can be added to "Cz'", which ensures that negative height is correctly applied to polygons that are defined in a clockwise direction.

通过找到基本多边形的质心并将该点升高棱镜高度的一半,可以找到棱镜形状的质心。这可以添加到最终结果的高度中;或者,可以将其添加到“Cz”中,以确保将负高度正确应用于顺时针方向定义的多边形。

The recommended transforms only apply if "Nx" and "Ny" are non-zero. If the normal vector is "[0,0,1]" (that is, along the z-axis), then no transform is necessary. Similarly, if the normal vector is "[0,1,0]" or "[1,0,0]", avoid the transformation and use the x and z coordinates or y and z coordinates (respectively) in the centroid calculation phase. If either "Nx" or "Ny" are zero, the alternative transform matrices in Figure 6 can be used. The reverse transform is the transpose of this matrix.

仅当“Nx”和“Ny”非零时,建议的变换才适用。如果法向量为“[0,0,1]”(即沿z轴),则无需变换。类似地,如果法向量为“[0,1,0]”或“[1,0,0]”,请避免变换,并在质心计算阶段使用x和z坐标或y和z坐标(分别)。如果“Nx”或“Ny”为零,则可以使用图6中的替代变换矩阵。逆变换就是这个矩阵的转置。

    if Nx == 0:                              | if Ny == 0:
        [ 0  -Nz  Ny ]       [  0   1  0  ]  |            [ -Nz  0  Nx ]
    T = [ 1   0   0  ]  T' = [ -Nz  0  Ny ]  |   T = T' = [  0   1  0  ]
        [ 0   Ny  Nz ]       [  Ny  0  Nz ]  |            [  Nx  0  Nz ]
        
    if Nx == 0:                              | if Ny == 0:
        [ 0  -Nz  Ny ]       [  0   1  0  ]  |            [ -Nz  0  Nx ]
    T = [ 1   0   0  ]  T' = [ -Nz  0  Ny ]  |   T = T' = [  0   1  0  ]
        [ 0   Ny  Nz ]       [  Ny  0  Nz ]  |            [  Nx  0  Nz ]
        

Figure 6: Alternative Transformation Matrices

图6:替代转换矩阵

5.2. Conversion to Circle or Sphere
5.2. 转换为圆或球体

The circle or sphere are simple shapes that suit a range of applications. A circle or sphere contains fewer units of data to manipulate, which simplifies operations on location estimates.

圆形或球体是适合各种应用的简单形状。一个圆或球体包含的数据单位更少,从而简化了对位置估计的操作。

The simplest method for converting a location estimate to a Circle or Sphere shape is to determine the centroid and then find the longest distance to any point in the region of uncertainty to that point. This distance can be determined based on the shape type:

将位置估计值转换为圆形或球形的最简单方法是确定质心,然后找到不确定区域中任何点到该点的最长距离。此距离可根据形状类型确定:

Circle/Sphere: No conversion necessary.

圆/球体:无需转换。

Ellipse/Ellipsoid: The greater of either semi-major axis or altitude uncertainty.

椭圆/椭球体:半长轴或高度不确定性中的较大者。

Polygon/Prism: The distance to the farthest vertex of the Polygon (for a Prism, it is only necessary to check points on the base).

多边形/棱柱体:到多边形最远顶点的距离(对于棱柱体,只需要检查底部的点)。

Arc-Band: The farthest length from the centroid to the points where the inner and outer arc end. This distance can be calculated by finding the larger of the two following formulae:

弧带:从质心到内外弧结束点的最长长度。该距离可通过以下两个公式中的较大者计算:

         X = sqrt( d*d + R*R - 2*d*R*cos(o/2) )
        
         X = sqrt( d*d + R*R - 2*d*R*cos(o/2) )
        
         x = sqrt( d*d + r*r - 2*d*r*cos(o/2) )
        
         x = sqrt( d*d + r*r - 2*d*r*cos(o/2) )
        

Once the Circle or Sphere shape is found, the associated confidence can be increased if the result is known to follow a normal distribution. However, this is a complicated process and provides limited benefit. In many cases, it also violates the constraint that confidence in each dimension be the same. Confidence should be unchanged when performing this conversion.

一旦找到圆或球体形状,如果已知结果遵循正态分布,则相关置信度可以增加。然而,这是一个复杂的过程,效益有限。在许多情况下,它还违反了每个维度的置信度相同的约束。执行此转换时,置信度应保持不变。

Two-dimensional shapes are converted to a Circle; three-dimensional shapes are converted to a Sphere.

将二维形状转换为圆形;三维形状将转换为球体。

5.3. Conversion from Three-Dimensional to Two-Dimensional
5.3. 从三维到二维的转换

A three-dimensional shape can be easily converted to a two-dimensional shape by removing the altitude component. A Sphere becomes a Circle; a Prism becomes a Polygon; an Ellipsoid becomes an Ellipse. Each conversion is simple, requiring only the removal of those elements relating to altitude.

通过移除高度分量,可以很容易地将三维形状转换为二维形状。一个球体变成一个圆;棱镜变成多边形;椭球体变成椭圆。每次转换都很简单,只需要删除与高度有关的元素。

The altitude is unspecified for a two-dimensional shape and therefore has unlimited uncertainty along the vertical axis. The confidence for the two-dimensional shape is thus higher than the three-dimensional shape. Assuming equal confidence on each axis, the confidence of the Circle can be increased using the following approximate formula:

二维形状的高度未指定,因此沿垂直轴具有无限的不确定性。因此,二维形状的置信度高于三维形状。假设每个轴上的置信度相等,可使用以下近似公式增加圆的置信度:

      C[2d] >= C[3d] ^ (2/3)
        
      C[2d] >= C[3d] ^ (2/3)
        

"C[2d]" is the confidence of the two-dimensional shape and "C[3d]" is the confidence of the three-dimensional shape. For example, a Sphere with a confidence of 95% can be simplified to a Circle of equal radius with confidence of 96.6%.

“C[2d]”是二维形状的置信度,“C[3d]”是三维形状的置信度。例如,置信度为95%的球体可以简化为置信度为96.6%的等半径圆。

5.4. Increasing and Decreasing Uncertainty and Confidence
5.4. 增加和减少不确定性和信心

The combination of uncertainty and confidence provide a great deal of information about the nature of the data that is being measured. If uncertainty, confidence, and PDF are known, certain information can be extrapolated. In particular, the uncertainty can be scaled to meet a desired confidence or the confidence for a particular region of uncertainty can be found.

不确定性和置信度的结合提供了大量有关被测量数据性质的信息。如果已知不确定性、置信度和PDF,则可以推断某些信息。特别地,可以缩放不确定性以满足期望的置信度,或者可以找到特定不确定性区域的置信度。

In general, confidence decreases as the region of uncertainty decreases in size, and confidence increases as the region of uncertainty increases in size. However, this depends on the PDF; expanding the region of uncertainty for a rectangular distribution has no effect on confidence without additional information. If the region of uncertainty is increased during the process of obfuscation (see [RFC6772]), then the confidence cannot be increased.

一般来说,置信度随着不确定区域大小的减小而减小,随着不确定区域大小的增大而增大。但是,这取决于PDF;在没有额外信息的情况下,扩大矩形分布的不确定区域对置信度没有影响。如果在模糊处理过程中不确定性区域增加(参见[RFC6772]),则置信度无法增加。

A region of uncertainty that is reduced in size always has a lower confidence.

尺寸减小的不确定区域的置信度总是较低。

A region of uncertainty that has an unknown PDF shape cannot be reduced in size reliably. The region of uncertainty can be expanded, but only if confidence is not increased.

具有未知PDF形状的不确定区域无法可靠地减小大小。不确定性区域可以扩大,但前提是不增加信心。

This section makes the simplifying assumption that location information is symmetrically and evenly distributed in each dimension. This is not necessarily true in practice. If better information is available, alternative methods might produce better results.

本节简化了位置信息在每个维度上对称且均匀分布的假设。这在实践中未必正确。如果有更好的信息,替代方法可能会产生更好的结果。

5.4.1. Rectangular Distributions
5.4.1. 矩形分布

Uncertainty that follows a rectangular distribution can only be decreased in size. Increasing uncertainty has no value, since it has no effect on confidence. Since the PDF is constant over the region of uncertainty, the resulting confidence is determined by the following formula:

遵循矩形分布的不确定性只能在尺寸上减小。增加不确定性没有任何价值,因为它对信心没有影响。由于PDF在不确定区域内保持不变,因此产生的置信度由以下公式确定:

      Cr = Co * Ur / Uo
        
      Cr = Co * Ur / Uo
        

Where "Uo" and "Ur" are the sizes of the original and reduced regions of uncertainty (either the area or the volume of the region); "Co" and "Cr" are the confidence values associated with each region.

其中,“Uo”和“Ur”是原始和减少的不确定区域的大小(区域的面积或体积);“Co”和“Cr”是与每个区域相关的置信值。

Information is lost by decreasing the region of uncertainty for a rectangular distribution. Once reduced in size, the uncertainty region cannot subsequently be increased in size.

由于矩形分布的不确定性区域减小,信息丢失。一旦尺寸减小,不确定区域的尺寸就不能随之增大。

5.4.2. Normal Distributions
5.4.2. 正态分布

Uncertainty and confidence can be both increased and decreased for a normal distribution. This calculation depends on the number of dimensions of the uncertainty region.

正态分布的不确定性和置信度可以增加也可以减少。此计算取决于不确定区域的维数。

For a normal distribution, uncertainty and confidence are related to the standard deviation of the function. The following function defines the relationship between standard deviation, uncertainty, and confidence along a single axis:

对于正态分布,不确定度和置信度与函数的标准偏差有关。以下函数定义了沿单个轴的标准偏差、不确定度和置信度之间的关系:

      S[x] = U[x] / ( sqrt(2) * erfinv(C[x]) )
        
      S[x] = U[x] / ( sqrt(2) * erfinv(C[x]) )
        

Where "S[x]" is the standard deviation, "U[x]" is the uncertainty, and "C[x]" is the confidence along a single axis. "erfinv" is the inverse error function.

其中“S[x]”是标准偏差,“U[x]”是不确定度,“C[x]”是沿单轴的置信度。“erfinv”是逆误差函数。

Scaling a normal distribution in two dimensions requires several assumptions. Firstly, it is assumed that the distribution along each axis is independent. Secondly, the confidence for each axis is assumed to be the same. Therefore, the confidence along each axis can be assumed to be:

在二维中缩放正态分布需要几个假设。首先,假设沿每个轴的分布是独立的。其次,假设每个轴的置信度相同。因此,沿每个轴的置信度可以假定为:

      C[x] = Co ^ (1/n)
        
      C[x] = Co ^ (1/n)
        

Where "C[x]" is the confidence along a single axis and "Co" is the overall confidence and "n" is the number of dimensions in the uncertainty.

式中,“C[x]”是沿单轴的置信度,“Co”是总体置信度,“n”是不确定度中的维数。

Therefore, to find the uncertainty for each axis at a desired confidence, "Cd", apply the following formula:

因此,为了在期望置信度“Cd”下找到每个轴的不确定度,应用以下公式:

      Ud[x] <= U[x] * (erfinv(Cd ^ (1/n)) / erfinv(Co ^ (1/n)))
        
      Ud[x] <= U[x] * (erfinv(Cd ^ (1/n)) / erfinv(Co ^ (1/n)))
        

For regular shapes, this formula can be applied as a scaling factor in each dimension to reach a required confidence.

对于规则形状,此公式可作为每个维度的比例因子应用,以达到所需的置信度。

5.5. Determining Whether a Location Is within a Given Region
5.5. 确定位置是否在给定区域内

A number of applications require that a judgment be made about whether a Target is within a given region of interest. Given a location estimate with uncertainty, this judgment can be difficult. A location estimate represents a probability distribution, and the true location of the Target cannot be definitively known. Therefore, the judgment relies on determining the probability that the Target is within the region.

许多应用要求对目标是否在给定的感兴趣区域内做出判断。考虑到位置估计的不确定性,这种判断可能会很困难。位置估计表示概率分布,目标的真实位置无法确定。因此,判断依赖于确定目标位于该区域内的概率。

The probability that the Target is within a particular region is found by integrating the PDF over the region. For a normal distribution, there are no analytical methods that can be used to determine the integral of the two- or three-dimensional PDF over an arbitrary region. The complexity of numerical methods is also too great to be useful in many applications; for example, finding the integral of the PDF in two or three dimensions across the overlap

目标位于特定区域内的概率通过对该区域上的PDF进行积分得到。对于正态分布,没有分析方法可用于确定任意区域上二维或三维PDF的积分。数值方法的复杂性也太大,无法在许多应用中使用;例如,在重叠区域的二维或三维中查找PDF的积分

between the uncertainty region and the target region. If the PDF is unknown, no determination can be made without a simplifying assumption.

在不确定区域和目标区域之间。如果PDF未知,如果不进行简化假设,则无法进行确定。

When judging whether a location is within a given region, this document assumes that uncertainties are rectangular. This introduces errors, but simplifies the calculations significantly. Prior to applying this assumption, confidence should be scaled to 95%.

当判断位置是否在给定区域内时,本文件假设不确定性为矩形。这会引入错误,但会显著简化计算。在应用该假设之前,置信度应定为95%。

Note: The selection of confidence has a significant impact on the final result. Only use a different confidence if an uncertainty value for 95% confidence cannot be found.

注:置信度的选择对最终结果有重大影响。如果无法找到95%置信度的不确定度值,则仅使用不同的置信度。

Given the assumption of a rectangular distribution, the probability that a Target is found within a given region is found by first finding the area (or volume) of overlap between the uncertainty region and the region of interest. This is multiplied by the confidence of the location estimate to determine the probability. Figure 7 shows an example of finding the area of overlap between the region of uncertainty and the region of interest.

假设为矩形分布,通过首先找到不确定区域和感兴趣区域之间的重叠区域(或体积)来确定在给定区域内发现目标的概率。将其乘以位置估计的置信度,以确定概率。图7显示了在不确定区域和感兴趣区域之间找到重叠区域的示例。

                    _.-""""-._
                  .'          `.    _ Region of
                 /              \  /  Uncertainty
              ..+-"""--..        |
           .-'  | :::::: `-.     |
         ,'     | :: Ao ::: `.   |
        /        \ :::::::::: \ /
       /          `._ :::::: _.X
      |              `-....-'   |
      |                         |
      |                         |
       \                       /
        `.                   .'  \_ Region of
          `._             _.'       Interest
             `--..___..--'
        
                    _.-""""-._
                  .'          `.    _ Region of
                 /              \  /  Uncertainty
              ..+-"""--..        |
           .-'  | :::::: `-.     |
         ,'     | :: Ao ::: `.   |
        /        \ :::::::::: \ /
       /          `._ :::::: _.X
      |              `-....-'   |
      |                         |
      |                         |
       \                       /
        `.                   .'  \_ Region of
          `._             _.'       Interest
             `--..___..--'
        

Figure 7: Area of Overlap between Two Circular Regions

图7:两个圆形区域之间的重叠区域

Once the area of overlap, "Ao", is known, the probability that the Target is within the region of interest, "Pi", is:

一旦已知重叠区域“Ao”,目标位于感兴趣区域“Pi”内的概率为:

      Pi = Co * Ao / Au
        
      Pi = Co * Ao / Au
        

Given that the area of the region of uncertainty is "Au" and the confidence is "Co".

鉴于不确定区域的面积为“Au”,置信度为“Co”。

This probability is often input to a decision process that has a limited set of outcomes; therefore, a threshold value needs to be selected. Depending on the application, different threshold probabilities might be selected. A probability of 50% or greater is recommended before deciding that an uncertain value is within a given region. If the decision process selects between two or more regions, as is required by [RFC5222], then the region with the highest probability can be selected.

这种可能性通常被输入到一个结果有限的决策过程中;因此,需要选择阈值。根据应用,可能会选择不同的阈值概率。在确定不确定值在给定区域内之前,建议概率为50%或更大。如果决策过程按照[RFC5222]的要求在两个或多个区域之间进行选择,则可以选择概率最高的区域。

5.5.1. Determining the Area of Overlap for Two Circles
5.5.1. 确定两个圆的重叠区域

Determining the area of overlap between two arbitrary shapes is a non-trivial process. Reducing areas to circles (see Section 5.2) enables the application of the following process.

确定两个任意形状之间的重叠区域是一个非常重要的过程。将区域缩小为圆形(见第5.2节)可以应用以下过程。

Given the radius of the first circle "r", the radius of the second circle "R", and the distance between their center points "d", the following set of formulae provide the area of overlap "Ao".

给定第一个圆“r”的半径、第二个圆“r”的半径以及它们的中心点“d”之间的距离,以下一组公式提供了重叠面积“Ao”。

o If the circles don't overlap, that is "d >= r+R", "Ao" is zero.

o 如果圆不重叠,即“d>=r+r”,“Ao”为零。

o If one of the two circles is entirely within the other, that is "d <= |r-R|", the area of overlap is the area of the smaller circle.

o 如果两个圆中的一个完全位于另一个圆内,即“d<=| r-r |”,则重叠区域为较小圆的区域。

o Otherwise, if the circles partially overlap, that is "d < r+R" and "d > |r-R|", find "Ao" using:

o 否则,如果圆部分重叠,即“d<r+r”和“d>| r-r |”,则使用以下方法查找“Ao”:

         a = (r^2 - R^2 + d^2)/(2*d)
        
         a = (r^2 - R^2 + d^2)/(2*d)
        
         Ao = r^2*acos(a/r) + R^2*acos((d - a)/R) - d*sqrt(r^2 - a^2)
        
         Ao = r^2*acos(a/r) + R^2*acos((d - a)/R) - d*sqrt(r^2 - a^2)
        

A value for "d" can be determined by converting the center points to Cartesian coordinates and calculating the distance between the two center points:

“d”的值可通过将中心点转换为笛卡尔坐标并计算两个中心点之间的距离来确定:

      d = sqrt((x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2)
        
      d = sqrt((x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2)
        
5.5.2. Determining the Area of Overlap for Two Polygons
5.5.2. 确定两个多边形的重叠区域

A calculation of overlap based on polygons can give better results than the circle-based method. However, efficient calculation of overlapping area is non-trivial. Algorithms such as Vatti's clipping algorithm [Vatti92] can be used.

基于多边形的重叠计算可以得到比基于圆的方法更好的结果。然而,重叠面积的有效计算并非易事。可以使用诸如Vatti的裁剪算法[Vatti92]之类的算法。

For large polygonal areas, it might be that geodesic interpolation is used. In these cases, altitude is also frequently omitted in describing the polygon. For such shapes, a planar projection can still give a good approximation of the area of overlap if the larger area polygon is projected onto the local tangent plane of the smaller. This is only possible if the only area of interest is that contained within the smaller polygon. Where the entire area of the larger polygon is of interest, geodesic interpolation is necessary.

对于大型多边形区域,可能会使用测地线插值。在这些情况下,在描述多边形时也经常忽略高度。对于此类形状,如果将较大面积的多边形投影到较小多边形的局部切面上,则平面投影仍然可以很好地近似重叠区域。只有当唯一感兴趣的区域是包含在较小多边形中的区域时,才可能进行此操作。如果对较大多边形的整个区域感兴趣,则需要测地插值。

6. Examples
6. 例子

This section presents some examples of how to apply the methods described in Section 5.

本节介绍了如何应用第5节所述方法的一些示例。

6.1. Reduction to a Point or Circle
6.1. 缩成点或圆

Alice receives a location estimate from her Location Information Server (LIS) that contains an ellipsoidal region of uncertainty. This information is provided at 19% confidence with a normal PDF. A PIDF-LO extract for this information is shown in Figure 8.

Alice从她的位置信息服务器(LIS)接收到一个位置估计值,其中包含一个不确定的椭球区域。此信息以19%的置信度和普通PDF格式提供。该信息的PIDF-LO提取如图8所示。

     <gp:geopriv>
       <gp:location-info>
         <gs:Ellipsoid srsName="urn:ogc:def:crs:EPSG::4979">
           <gml:pos>-34.407242 150.882518 34</gml:pos>
           <gs:semiMajorAxis uom="urn:ogc:def:uom:EPSG::9001">
             7.7156
           </gs:semiMajorAxis>
           <gs:semiMinorAxis uom="urn:ogc:def:uom:EPSG::9001">
             3.31
           </gs:semiMinorAxis>
           <gs:verticalAxis uom="urn:ogc:def:uom:EPSG::9001">
             28.7
           </gs:verticalAxis>
           <gs:orientation uom="urn:ogc:def:uom:EPSG::9102">
             43
           </gs:orientation>
         </gs:Ellipsoid>
         <con:confidence pdf="normal">95</con:confidence>
       </gp:location-info>
       <gp:usage-rules/>
     </gp:geopriv>
        
     <gp:geopriv>
       <gp:location-info>
         <gs:Ellipsoid srsName="urn:ogc:def:crs:EPSG::4979">
           <gml:pos>-34.407242 150.882518 34</gml:pos>
           <gs:semiMajorAxis uom="urn:ogc:def:uom:EPSG::9001">
             7.7156
           </gs:semiMajorAxis>
           <gs:semiMinorAxis uom="urn:ogc:def:uom:EPSG::9001">
             3.31
           </gs:semiMinorAxis>
           <gs:verticalAxis uom="urn:ogc:def:uom:EPSG::9001">
             28.7
           </gs:verticalAxis>
           <gs:orientation uom="urn:ogc:def:uom:EPSG::9102">
             43
           </gs:orientation>
         </gs:Ellipsoid>
         <con:confidence pdf="normal">95</con:confidence>
       </gp:location-info>
       <gp:usage-rules/>
     </gp:geopriv>
        

Figure 8: Alice's Ellipsoid Location

图8:Alice的椭球位置

This information can be reduced to a point simply by extracting the center point, that is [-34.407242, 150.882518, 34].

只需提取中心点即可将此信息缩减为一个点,即[-34.407242150.88251834]。

If some limited uncertainty were required, the estimate could be converted into a circle or sphere. To convert to a sphere, the radius is the largest of the semi-major, semi-minor and vertical axes; in this case, 28.7 meters.

如果需要一些有限的不确定度,则可将估算值转换为圆形或球形。要转换为球体,半径为半长轴、半短轴和垂直轴中的最大值;在这种情况下,28.7米。

However, if only a circle is required, the altitude can be dropped as can the altitude uncertainty (the vertical axis of the ellipsoid), resulting in a circle at [-34.407242, 150.882518] of radius 7.7156 meters.

但是,如果只需要一个圆,则可以降低高度不确定性(椭球体的垂直轴),从而在[-34.407242,150.882518]处形成半径为7.7156米的圆。

Bob receives a location estimate with a Polygon shape (which roughly corresponds to the location of the Sydney Opera House). This information is shown in Figure 9.

Bob收到一个多边形形状的位置估计(大致对应于悉尼歌剧院的位置)。此信息如图9所示。

     <gml:Polygon srsName="urn:ogc:def:crs:EPSG::4326">
       <gml:exterior>
         <gml:LinearRing>
           <gml:posList>
             -33.856625 151.215906 -33.856299 151.215343
             -33.856326 151.214731 -33.857533 151.214495
             -33.857720 151.214613 -33.857369 151.215375
             -33.856625 151.215906
           </gml:posList>
         </gml:LinearRing>
       </gml:exterior>
     </gml:Polygon>
        
     <gml:Polygon srsName="urn:ogc:def:crs:EPSG::4326">
       <gml:exterior>
         <gml:LinearRing>
           <gml:posList>
             -33.856625 151.215906 -33.856299 151.215343
             -33.856326 151.214731 -33.857533 151.214495
             -33.857720 151.214613 -33.857369 151.215375
             -33.856625 151.215906
           </gml:posList>
         </gml:LinearRing>
       </gml:exterior>
     </gml:Polygon>
        

Figure 9: Bob's Polygon Location

图9:Bob的多边形位置

To convert this to a polygon, each point is firstly assigned an altitude of zero and converted to ECEF coordinates (see Appendix A). Then, a normal vector for this polygon is found (see Appendix B). The result of each of these stages is shown in Figure 10. Note that the numbers shown in this document are rounded only for formatting reasons; the actual calculations do not include rounding, which would generate significant errors in the final values.

要将其转换为多边形,首先为每个点指定一个零高度,并将其转换为ECEF坐标(见附录a)。然后,找到该多边形的法向量(见附录B)。每个阶段的结果如图10所示。请注意,本文件中显示的数字仅因格式原因而四舍五入;实际计算不包括四舍五入,这将在最终值中产生重大误差。

   Polygon in ECEF coordinate space
      (repeated point omitted and transposed to fit):
            [ -4.6470e+06  2.5530e+06  -3.5333e+06 ]
            [ -4.6470e+06  2.5531e+06  -3.5332e+06 ]
    pecef = [ -4.6470e+06  2.5531e+06  -3.5332e+06 ]
            [ -4.6469e+06  2.5531e+06  -3.5333e+06 ]
            [ -4.6469e+06  2.5531e+06  -3.5334e+06 ]
            [ -4.6469e+06  2.5531e+06  -3.5333e+06 ]
        
   Polygon in ECEF coordinate space
      (repeated point omitted and transposed to fit):
            [ -4.6470e+06  2.5530e+06  -3.5333e+06 ]
            [ -4.6470e+06  2.5531e+06  -3.5332e+06 ]
    pecef = [ -4.6470e+06  2.5531e+06  -3.5332e+06 ]
            [ -4.6469e+06  2.5531e+06  -3.5333e+06 ]
            [ -4.6469e+06  2.5531e+06  -3.5334e+06 ]
            [ -4.6469e+06  2.5531e+06  -3.5333e+06 ]
        
   Normal Vector: n = [ -0.72782  0.39987  -0.55712 ]
        
   Normal Vector: n = [ -0.72782  0.39987  -0.55712 ]
        
   Transformation Matrix:
        [ -0.48152  -0.87643   0.00000 ]
    t = [ -0.48828   0.26827   0.83043 ]
        [ -0.72782   0.39987  -0.55712 ]
        
   Transformation Matrix:
        [ -0.48152  -0.87643   0.00000 ]
    t = [ -0.48828   0.26827   0.83043 ]
        [ -0.72782   0.39987  -0.55712 ]
        
   Transformed Coordinates:
             [  8.3206e+01  1.9809e+04  6.3715e+06 ]
             [  3.1107e+01  1.9845e+04  6.3715e+06 ]
    pecef' = [ -2.5528e+01  1.9842e+04  6.3715e+06 ]
             [ -4.7367e+01  1.9708e+04  6.3715e+06 ]
             [ -3.6447e+01  1.9687e+04  6.3715e+06 ]
             [  3.4068e+01  1.9726e+04  6.3715e+06 ]
        
   Transformed Coordinates:
             [  8.3206e+01  1.9809e+04  6.3715e+06 ]
             [  3.1107e+01  1.9845e+04  6.3715e+06 ]
    pecef' = [ -2.5528e+01  1.9842e+04  6.3715e+06 ]
             [ -4.7367e+01  1.9708e+04  6.3715e+06 ]
             [ -3.6447e+01  1.9687e+04  6.3715e+06 ]
             [  3.4068e+01  1.9726e+04  6.3715e+06 ]
        
   Two dimensional polygon area: A = 12600 m^2
   Two-dimensional polygon centroid: C' = [ 8.8184e+00  1.9775e+04 ]
        
   Two dimensional polygon area: A = 12600 m^2
   Two-dimensional polygon centroid: C' = [ 8.8184e+00  1.9775e+04 ]
        

Average of pecef' z coordinates: 6.3715e+06

pecef'z坐标的平均值:6.3715e+06

   Reverse Transformation Matrix:
         [ -0.48152  -0.48828  -0.72782 ]
    t' = [ -0.87643   0.26827   0.39987 ]
         [  0.00000   0.83043  -0.55712 ]
        
   Reverse Transformation Matrix:
         [ -0.48152  -0.48828  -0.72782 ]
    t' = [ -0.87643   0.26827   0.39987 ]
         [  0.00000   0.83043  -0.55712 ]
        
   Polygon centroid (ECEF): C = [ -4.6470e+06  2.5531e+06  -3.5333e+06 ]
   Polygon centroid (Geo): Cg = [ -33.856926  151.215102  -4.9537e-04 ]
        
   Polygon centroid (ECEF): C = [ -4.6470e+06  2.5531e+06  -3.5333e+06 ]
   Polygon centroid (Geo): Cg = [ -33.856926  151.215102  -4.9537e-04 ]
        

Figure 10: Calculation of Polygon Centroid

图10:多边形质心的计算

The point conversion for the polygon uses the final result, "Cg", ignoring the altitude since the original shape did not include altitude.

多边形的点转换使用最终结果“Cg”,忽略高度,因为原始形状不包括高度。

To convert this to a circle, take the maximum distance in ECEF coordinates from the center point to each of the points. This results in a radius of 99.1 meters. Confidence is unchanged.

若要将其转换为圆,请以ECEF坐标表示从中心点到每个点的最大距离。这导致半径为99.1米。信心没有改变。

6.2. Increasing and Decreasing Confidence
6.2. 增加和减少信心

Assume that confidence is known to be 19% for Alice's location information. This is a typical value for a three-dimensional ellipsoid uncertainty of normal distribution where the standard deviation is used directly for uncertainty in each dimension. The confidence associated with Alice's location estimate is quite low for many applications. Since the estimate is known to follow a normal distribution, the method in Section 5.4.2 can be used. Each axis can be scaled by:

假设已知Alice位置信息的置信度为19%。这是正态分布三维椭球体不确定度的典型值,其中标准偏差直接用于每个维度的不确定度。在许多应用中,与Alice的位置估计相关的置信度非常低。由于已知估算值服从正态分布,因此可使用第5.4.2节中的方法。每个轴可以通过以下方式进行缩放:

      scale = erfinv(0.95^(1/3)) / erfinv(0.19^(1/3)) = 2.9937
        
      scale = erfinv(0.95^(1/3)) / erfinv(0.19^(1/3)) = 2.9937
        

Ensuring that rounding always increases uncertainty, the location estimate at 95% includes a semi-major axis of 23.1, a semi-minor axis of 10 and a vertical axis of 86.

确保四舍五入始终增加不确定性,95%的位置估计包括23.1的半长轴、10的半短轴和86的纵轴。

   Bob's location estimate (from the previous example) covers an area of
   approximately 12600 square meters.  If the estimate follows a
   rectangular distribution, the region of uncertainty can be reduced in
   size.  Here we find the confidence that Bob is within the smaller
   area of the Concert Hall.  For the Concert Hall, the polygon
   [-33.856473, 151.215257; -33.856322, 151.214973;
   -33.856424, 151.21471; -33.857248, 151.214753;
   -33.857413, 151.214941; -33.857311, 151.215128] is used.  To use this
   new region of uncertainty, find its area using the same translation
   method described in Section 5.1.1.2, which produces 4566.2 square
   meters.  Given that the Concert Hall is entirely within Bob's
   original location estimate, the confidence associated with the
   smaller area is therefore 95% * 4566.2 / 12600 = 34%.
        
   Bob's location estimate (from the previous example) covers an area of
   approximately 12600 square meters.  If the estimate follows a
   rectangular distribution, the region of uncertainty can be reduced in
   size.  Here we find the confidence that Bob is within the smaller
   area of the Concert Hall.  For the Concert Hall, the polygon
   [-33.856473, 151.215257; -33.856322, 151.214973;
   -33.856424, 151.21471; -33.857248, 151.214753;
   -33.857413, 151.214941; -33.857311, 151.215128] is used.  To use this
   new region of uncertainty, find its area using the same translation
   method described in Section 5.1.1.2, which produces 4566.2 square
   meters.  Given that the Concert Hall is entirely within Bob's
   original location estimate, the confidence associated with the
   smaller area is therefore 95% * 4566.2 / 12600 = 34%.
        
6.3. Matching Location Estimates to Regions of Interest
6.3. 将位置估计值与感兴趣区域匹配

Suppose that a circular area is defined centered at [-33.872754, 151.20683] with a radius of 1950 meters. To determine whether Bob is found within this area -- given that Bob is at [-34.407242, 150.882518] with an uncertainty radius 7.7156 meters -- we apply the method in Section 5.5. Using the converted Circle shape for Bob's location, the distance between these points is found to be 1915.26 meters. The area of overlap between Bob's location estimate and the region of interest is therefore 2209 square meters and the area of Bob's location estimate is 30853 square meters. This gives the estimated probability that Bob is less than 1950 meters from the selected point as 67.8%.

假设圆形区域以[-33.872754151.20683]为中心,半径为1950米。为了确定是否在该区域内发现Bob——假设Bob位于[-34.407242150.882518],不确定半径为7.7156米——我们采用第5.5节中的方法。使用转换后的圆形状作为Bob的位置,发现这些点之间的距离为1915.26米。因此,北京银行的位置估计与感兴趣区域之间的重叠面积为2209平方米,北京银行的位置估计面积为30853平方米。这使得Bob距离所选点小于1950米的估计概率为67.8%。

Note that if 1920 meters were chosen for the distance from the selected point, the area of overlap is only 16196 square meters and the confidence is 49.8%. Therefore, it is marginally more likely that Bob is outside the region of interest, despite the center point of his location estimate being within the region.

请注意,如果选择1920米作为距离选定点的距离,则重叠面积仅为16196平方米,置信度为49.8%。因此,尽管Bob的位置估计的中心点位于该区域内,但其位于感兴趣区域之外的可能性更大。

6.4. PIDF-LO with Confidence Example
6.4. 带置信度示例的PIDF-LO

The PIDF-LO document in Figure 11 includes a representation of uncertainty as a circular area. The confidence element (on the line marked with a comment) indicates that the confidence is 67% and that it follows a normal distribution.

图11中的PIDF-LO文件将不确定性表示为圆形区域。置信度元素(在标有注释的行上)表示置信度为67%,并遵循正态分布。

     <pidf:presence
         xmlns:pidf="urn:ietf:params:xml:ns:pidf"
         xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
         xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
         xmlns:gs="http://www.opengis.net/pidflo/1.0"
         xmlns:gml="http://www.opengis.net/gml"
         xmlns:con="urn:ietf:params:xml:ns:geopriv:conf"
         entity="pres:alice@example.com">
       <dm:device id="sg89ab">
         <gp:geopriv>
           <gp:location-info>
             <gs:Circle srsName="urn:ogc:def:crs:EPSG::4326">
               <gml:pos>42.5463 -73.2512</gml:pos>
               <gs:radius uom="urn:ogc:def:uom:EPSG::9001">
                 850.24
               </gs:radius>
             </gs:Circle>
   <!--c--> <con:confidence pdf="normal">67</con:confidence>
           </gp:location-info>
           <gp:usage-rules/>
         </gp:geopriv>
        <dm:deviceID>mac:010203040506</dm:deviceID>
      </dm:device>
    </pidf:presence>
        
     <pidf:presence
         xmlns:pidf="urn:ietf:params:xml:ns:pidf"
         xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
         xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
         xmlns:gs="http://www.opengis.net/pidflo/1.0"
         xmlns:gml="http://www.opengis.net/gml"
         xmlns:con="urn:ietf:params:xml:ns:geopriv:conf"
         entity="pres:alice@example.com">
       <dm:device id="sg89ab">
         <gp:geopriv>
           <gp:location-info>
             <gs:Circle srsName="urn:ogc:def:crs:EPSG::4326">
               <gml:pos>42.5463 -73.2512</gml:pos>
               <gs:radius uom="urn:ogc:def:uom:EPSG::9001">
                 850.24
               </gs:radius>
             </gs:Circle>
   <!--c--> <con:confidence pdf="normal">67</con:confidence>
           </gp:location-info>
           <gp:usage-rules/>
         </gp:geopriv>
        <dm:deviceID>mac:010203040506</dm:deviceID>
      </dm:device>
    </pidf:presence>
        

Figure 11: Example PIDF-LO with Confidence

图11:带置信度的PIDF-LO示例

7. Confidence Schema
7. 置信模式
   <?xml version="1.0"?>
   <xs:schema
       xmlns:conf="urn:ietf:params:xml:ns:geopriv:conf"
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       targetNamespace="urn:ietf:params:xml:ns:geopriv:conf"
       elementFormDefault="qualified"
       attributeFormDefault="unqualified">
        
   <?xml version="1.0"?>
   <xs:schema
       xmlns:conf="urn:ietf:params:xml:ns:geopriv:conf"
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       targetNamespace="urn:ietf:params:xml:ns:geopriv:conf"
       elementFormDefault="qualified"
       attributeFormDefault="unqualified">
        
     <xs:annotation>
       <xs:appinfo
           source="urn:ietf:params:xml:schema:geopriv:conf">
         PIDF-LO Confidence
       </xs:appinfo>
       <xs:documentation
           source="http://www.rfc-editor.org/rfc/rfc7459.txt">
         This schema defines an element that is used for indicating
         confidence in PIDF-LO documents.
       </xs:documentation>
     </xs:annotation>
        
     <xs:annotation>
       <xs:appinfo
           source="urn:ietf:params:xml:schema:geopriv:conf">
         PIDF-LO Confidence
       </xs:appinfo>
       <xs:documentation
           source="http://www.rfc-editor.org/rfc/rfc7459.txt">
         This schema defines an element that is used for indicating
         confidence in PIDF-LO documents.
       </xs:documentation>
     </xs:annotation>
        
     <xs:element name="confidence" type="conf:confidenceType"/>
        
     <xs:element name="confidence" type="conf:confidenceType"/>
        
     <xs:complexType name="confidenceType">
       <xs:simpleContent>
         <xs:extension base="conf:confidenceBase">
           <xs:attribute name="pdf" type="conf:pdfType"
                         default="unknown"/>
         </xs:extension>
       </xs:simpleContent>
     </xs:complexType>
        
     <xs:complexType name="confidenceType">
       <xs:simpleContent>
         <xs:extension base="conf:confidenceBase">
           <xs:attribute name="pdf" type="conf:pdfType"
                         default="unknown"/>
         </xs:extension>
       </xs:simpleContent>
     </xs:complexType>
        
     <xs:simpleType name="confidenceBase">
       <xs:union>
         <xs:simpleType>
           <xs:restriction base="xs:decimal">
             <xs:minExclusive value="0.0"/>
             <xs:maxExclusive value="100.0"/>
           </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
           <xs:restriction base="xs:token">
             <xs:enumeration value="unknown"/>
           </xs:restriction>
         </xs:simpleType>
       </xs:union>
     </xs:simpleType>
        
     <xs:simpleType name="confidenceBase">
       <xs:union>
         <xs:simpleType>
           <xs:restriction base="xs:decimal">
             <xs:minExclusive value="0.0"/>
             <xs:maxExclusive value="100.0"/>
           </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
           <xs:restriction base="xs:token">
             <xs:enumeration value="unknown"/>
           </xs:restriction>
         </xs:simpleType>
       </xs:union>
     </xs:simpleType>
        
     <xs:simpleType name="pdfType">
       <xs:restriction base="xs:token">
         <xs:enumeration value="unknown"/>
         <xs:enumeration value="normal"/>
         <xs:enumeration value="rectangular"/>
       </xs:restriction>
     </xs:simpleType>
        
     <xs:simpleType name="pdfType">
       <xs:restriction base="xs:token">
         <xs:enumeration value="unknown"/>
         <xs:enumeration value="normal"/>
         <xs:enumeration value="rectangular"/>
       </xs:restriction>
     </xs:simpleType>
        
   </xs:schema>
        
   </xs:schema>
        
8. IANA Considerations
8. IANA考虑
8.1.  URN Sub-Namespace Registration for
      urn:ietf:params:xml:ns:geopriv:conf
        
8.1.  URN Sub-Namespace Registration for
      urn:ietf:params:xml:ns:geopriv:conf
        

A new XML namespace, "urn:ietf:params:xml:ns:geopriv:conf", has been registered, as per the guidelines in [RFC3688].

根据[RFC3688]中的指南,已经注册了一个新的XML名称空间“urn:ietf:params:XML:ns:geopriv:conf”。

   URI:  urn:ietf:params:xml:ns:geopriv:conf
        
   URI:  urn:ietf:params:xml:ns:geopriv:conf
        

Registrant Contact: IETF GEOPRIV working group (geopriv@ietf.org), Martin Thomson (martin.thomson@gmail.com).

注册人联系人:IETF GEOPRIV工作组(geopriv@ietf.org),马丁·汤姆森(马丁。thomson@gmail.com).

XML:

XML:

       BEGIN
         <?xml version="1.0"?>
         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
         <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
           <head>
             <title>PIDF-LO Confidence Attribute</title>
           </head>
           <body>
             <h1>Namespace for PIDF-LO Confidence Attribute</h1>
             <h2>urn:ietf:params:xml:ns:geopriv:conf</h2>
             <p>See <a href="http://www.rfc-editor.org/rfc/rfc7459.txt">
                RFC 7459</a>.</p>
           </body>
         </html>
       END
        
       BEGIN
         <?xml version="1.0"?>
         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
         <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
           <head>
             <title>PIDF-LO Confidence Attribute</title>
           </head>
           <body>
             <h1>Namespace for PIDF-LO Confidence Attribute</h1>
             <h2>urn:ietf:params:xml:ns:geopriv:conf</h2>
             <p>See <a href="http://www.rfc-editor.org/rfc/rfc7459.txt">
                RFC 7459</a>.</p>
           </body>
         </html>
       END
        
8.2. XML Schema Registration
8.2. XML模式注册

An XML schema has been registered, as per the guidelines in [RFC3688].

根据[RFC3688]中的指南,已注册XML架构。

   URI:  urn:ietf:params:xml:schema:geopriv:conf
        
   URI:  urn:ietf:params:xml:schema:geopriv:conf
        

Registrant Contact: IETF GEOPRIV working group (geopriv@ietf.org), Martin Thomson (martin.thomson@gmail.com).

注册人联系人:IETF GEOPRIV工作组(geopriv@ietf.org),马丁·汤姆森(马丁。thomson@gmail.com).

Schema: The XML for this schema can be found as the entirety of Section 7 of this document.

模式:此模式的XML可以作为本文档第7节的全部内容找到。

9. Security Considerations
9. 安全考虑

This document describes methods for managing and manipulating uncertainty in location. No specific security concerns arise from most of the information provided. The considerations of [RFC4119] all apply.

本文件描述了管理和处理位置不确定性的方法。所提供的大多数信息都不会引起具体的安全问题。[RFC4119]的注意事项均适用。

A thorough treatment of the privacy implications of describing location information are discussed in [RFC6280]. Including uncertainty information increases the amount of information available; and altering uncertainty is not an effective privacy mechanism.

[RFC6280]中讨论了对描述位置信息的隐私影响的彻底处理。包括不确定性信息会增加可用信息量;改变不确定性并不是一种有效的隐私机制。

Providing uncertainty and confidence information can reveal information about the process by which location information is generated. For instance, it might reveal information that could be used to infer that a user is using a mobile device with a GPS, or that a user is acquiring location information from a particular network-based service. A Rule Maker might choose to remove uncertainty-related fields from a location object in order to protect this information. Note however that information might not be perfectly protected due to difficulties associated with location obfuscation, as described in Section 13.5 of [RFC6772]. In particular, increasing uncertainty does not necessarily result in a reduction of the information conveyed by the location object.

提供不确定性和置信度信息可以揭示位置信息生成过程的相关信息。例如,它可能揭示可用于推断用户正在使用带有GPS的移动设备,或者用户正在从特定的基于网络的服务获取位置信息的信息。规则制定者可能会选择从位置对象中删除与不确定性相关的字段,以保护此信息。然而,请注意,如[RFC6772]第13.5节所述,由于与位置模糊相关的困难,信息可能无法得到完美的保护。具体地,增加的不确定性不一定导致由位置对象传送的信息的减少。

Adding confidence to location information risks misinterpretation by consumers of location that do not understand the element. This could be exploited, particularly when reducing confidence, since the resulting uncertainty region might include locations that are less likely to contain the Target than the recipient expects. Since this sort of error is always a possibility, the impact of this is low.

增加对位置信息的信心有可能使不了解该元素的位置消费者误解。这是可以利用的,尤其是在降低信心时,因为由此产生的不确定性区域可能包括比接收者预期的更不可能包含目标的位置。由于这种错误总是有可能发生,因此其影响很小。

10. References
10. 工具书类
10.1. Normative References
10.1. 规范性引用文件

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月<http://www.rfc-editor.org/info/rfc2119>.

[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004, <http://www.rfc-editor.org/info/rfc3688>.

[RFC3688]Mealling,M.“IETF XML注册表”,BCP 81,RFC 3688,2004年1月<http://www.rfc-editor.org/info/rfc3688>.

[RFC3693] Cuellar, J., Morris, J., Mulligan, D., Peterson, J., and J. Polk, "Geopriv Requirements", RFC 3693, February 2004, <http://www.rfc-editor.org/info/rfc3693>.

[RFC3693]Cuellar,J.,Morris,J.,Mulligan,D.,Peterson,J.,和J.Polk,“地质驱动要求”,RFC 3693,2004年2月<http://www.rfc-editor.org/info/rfc3693>.

[RFC4119] Peterson, J., "A Presence-based GEOPRIV Location Object Format", RFC 4119, December 2005, <http://www.rfc-editor.org/info/rfc4119>.

[RFC4119]Peterson,J.,“基于状态的GEOPRIV定位对象格式”,RFC41192005年12月<http://www.rfc-editor.org/info/rfc4119>.

[RFC5139] Thomson, M. and J. Winterbottom, "Revised Civic Location Format for Presence Information Data Format Location Object (PIDF-LO)", RFC 5139, February 2008, <http://www.rfc-editor.org/info/rfc5139>.

[RFC5139]Thomson,M.和J.Winterbottom,“状态信息数据格式位置对象(PIDF-LO)的修订公民位置格式”,RFC 51392008年2月<http://www.rfc-editor.org/info/rfc5139>.

[RFC5491] Winterbottom, J., Thomson, M., and H. Tschofenig, "GEOPRIV Presence Information Data Format Location Object (PIDF-LO) Usage Clarification, Considerations, and Recommendations", RFC 5491, March 2009, <http://www.rfc-editor.org/info/rfc5491>.

[RFC5491]Winterbottom,J.,Thomson,M.,和H.Tschofenig,“GEOPRIV存在信息数据格式位置对象(PIDF-LO)使用说明、注意事项和建议”,RFC 54912009年3月<http://www.rfc-editor.org/info/rfc5491>.

[RFC6225] Polk, J., Linsner, M., Thomson, M., and B. Aboba, Ed., "Dynamic Host Configuration Protocol Options for Coordinate-Based Location Configuration Information", RFC 6225, July 2011, <http://www.rfc-editor.org/info/rfc6225>.

[RFC6225]Polk,J.,Linsner,M.,Thomson,M.,和B.Aboba,Ed.,“基于坐标的位置配置信息的动态主机配置协议选项”,RFC 62252011年7月<http://www.rfc-editor.org/info/rfc6225>.

[RFC6280] Barnes, R., Lepinski, M., Cooper, A., Morris, J., Tschofenig, H., and H. Schulzrinne, "An Architecture for Location and Location Privacy in Internet Applications", BCP 160, RFC 6280, July 2011, <http://www.rfc-editor.org/info/rfc6280>.

[RFC6280]Barnes,R.,Lepinski,M.,Cooper,A.,Morris,J.,Tschofenig,H.,和H.Schulzrinne,“互联网应用中的位置和位置隐私架构”,BCP 160,RFC 62802011年7月<http://www.rfc-editor.org/info/rfc6280>.

10.2. Informative References
10.2. 资料性引用

[Convert] Burtch, R., "A Comparison of Methods Used in Rectangular to Geodetic Coordinate Transformations", April 2006.

[Convert]Burcch,R.,“矩形坐标到大地坐标转换中使用的方法比较”,2006年4月。

[GeoShape] Thomson, M. and C. Reed, "GML 3.1.1 PIDF-LO Shape Application Schema for use by the Internet Engineering Task Force (IETF)", Candidate OpenGIS Implementation Specification 06-142r1, Version: 1.0, April 2007.

[GeoShape]Thomson,M.和C.Reed,“互联网工程任务组(IETF)使用的GML 3.1.1 PIDF-LO形状应用模式”,候选OpenGIS实施规范06-142r1,版本:1.0,2007年4月。

[ISO.GUM] ISO/IEC, "Guide to the expression of uncertainty in measurement (GUM)", Guide 98:1995, 1995.

[ISO.GUM]ISO/IEC,“测量不确定度表示指南(GUM)”,指南98:1995,1995。

[NIST.TN1297] Taylor, B. and C. Kuyatt, "Guidelines for Evaluating and Expressing the Uncertainty of NIST Measurement Results", Technical Note 1297, September 1994.

[NIST.TN1297]Taylor,B.和C.Kuyatt,“评估和表示NIST测量结果不确定度的指南”,技术注释1297,1994年9月。

[RFC5222] Hardie, T., Newton, A., Schulzrinne, H., and H. Tschofenig, "LoST: A Location-to-Service Translation Protocol", RFC 5222, August 2008, <http://www.rfc-editor.org/info/rfc5222>.

[RFC5222]Hardie,T.,Newton,A.,Schulzrinne,H.,和H.Tschofenig,“丢失:位置到服务转换协议”,RFC 5222,2008年8月<http://www.rfc-editor.org/info/rfc5222>.

[RFC6772] Schulzrinne, H., Ed., Tschofenig, H., Ed., Cuellar, J., Polk, J., Morris, J., and M. Thomson, "Geolocation Policy: A Document Format for Expressing Privacy Preferences for Location Information", RFC 6772, January 2013, <http://www.rfc-editor.org/info/rfc6772>.

[RFC6772]Schulzrinne,H.,Ed.,Tschofenig,H.,Ed.,Cuellar,J.,Polk,J.,Morris,J.,和M.Thomson,“地理位置政策:表达位置信息隐私偏好的文档格式”,RFC 6772,2013年1月<http://www.rfc-editor.org/info/rfc6772>.

[Sunday02] Sunday, D., "Fast polygon area and Newell normal computation", Journal of Graphics Tools JGT, 7(2):9-13, 2002.

[Sunday02]Sunday,D.,“快速多边形面积和Newell法线计算”,图形工具杂志JGT,7(2):9-132002。

[TS-3GPP-23_032] 3GPP, "Universal Geographical Area Description (GAD)", 3GPP TS 23.032 12.0.0, September 2014.

[TS-3GPP-23_032]3GPP,“通用地理区域描述(GAD)”,3GPP TS 23.032 12.0.012014年9月。

[Vatti92] Vatti, B., "A generic solution to polygon clipping", Communications of the ACM Volume 35, Issue 7, pages 56-63, July 1992, <http://portal.acm.org/citation.cfm?id=129906>.

[Vatti92]Vatti,B.,“多边形裁剪的通用解决方案”,ACM第35卷通讯,第7期,第56-63页,1992年7月<http://portal.acm.org/citation.cfm?id=129906>.

[WGS84] US National Imagery and Mapping Agency, "Department of Defense (DoD) World Geodetic System 1984 (WGS 84), Third Edition", NIMA TR8350.2, January 2000.

[WGS84]美国国家图像和测绘局,“国防部1984年世界大地测量系统(WGS 84),第三版”,NIMA TR8350.22000年1月。

Appendix A. Conversion between Cartesian and Geodetic Coordinates in WGS84

附录A.WGS84中笛卡尔坐标和大地坐标之间的转换

The process of conversion from geodetic (latitude, longitude, and altitude) to ECEF Cartesian coordinates is relatively simple.

从大地坐标(纬度、经度和高度)到ECEF笛卡尔坐标的转换过程相对简单。

In this appendix, the following constants and derived values are used from the definition of WGS84 [WGS84]:

在本附录中,根据WGS84[WGS84]的定义使用以下常数和衍生值:

      {radius of ellipsoid} R = 6378137 meters
        
      {radius of ellipsoid} R = 6378137 meters
        
      {inverse flattening} 1/f = 298.257223563
        
      {inverse flattening} 1/f = 298.257223563
        
      {first eccentricity squared} e^2 = f * (2 - f)
        
      {first eccentricity squared} e^2 = f * (2 - f)
        
      {second eccentricity squared} e'^2 = e^2 * (1 - e^2)
        
      {second eccentricity squared} e'^2 = e^2 * (1 - e^2)
        

To convert geodetic coordinates (latitude, longitude, altitude) to ECEF coordinates (X, Y, Z), use the following relationships:

要将大地坐标(纬度、经度、高度)转换为ECEF坐标(X、Y、Z),请使用以下关系:

      N = R / sqrt(1 - e^2 * sin(latitude)^2)
        
      N = R / sqrt(1 - e^2 * sin(latitude)^2)
        
      X = (N + altitude) * cos(latitude) * cos(longitude)
        
      X = (N + altitude) * cos(latitude) * cos(longitude)
        
      Y = (N + altitude) * cos(latitude) * sin(longitude)
        
      Y = (N + altitude) * cos(latitude) * sin(longitude)
        
      Z = (N*(1 - e^2) + altitude) * sin(latitude)
        
      Z = (N*(1 - e^2) + altitude) * sin(latitude)
        

The reverse conversion requires more complex computation, and most methods introduce some error in latitude and altitude. A range of techniques are described in [Convert]. A variant on the method originally proposed by Bowring, which results in an acceptably small error, is described by the following:

反向转换需要更复杂的计算,并且大多数方法会在纬度和高度上引入一些误差。[Convert]中描述了一系列技术。Bowring最初提出的方法的一个变体导致了可接受的小误差,描述如下:

      p = sqrt(X^2 + Y^2)
        
      p = sqrt(X^2 + Y^2)
        
      r = sqrt(X^2 + Y^2 + Z^2)
        
      r = sqrt(X^2 + Y^2 + Z^2)
        
      u = atan((1-f) * Z * (1 + e'^2 * (1-f) * R / r) / p)
        
      u = atan((1-f) * Z * (1 + e'^2 * (1-f) * R / r) / p)
        
      latitude = atan((Z + e'^2 * (1-f) * R * sin(u)^3)
      / (p - e^2 * R * cos(u)^3))
        
      latitude = atan((Z + e'^2 * (1-f) * R * sin(u)^3)
      / (p - e^2 * R * cos(u)^3))
        

longitude = atan2(Y, X)

经度=atan2(Y,X)

      altitude = sqrt((p - R * cos(u))^2 + (Z - (1-f) * R * sin(u))^2)
        
      altitude = sqrt((p - R * cos(u))^2 + (Z - (1-f) * R * sin(u))^2)
        

If the point is near the poles, that is, "p < 1", the value for altitude that this method produces is unstable. A simpler method for determining the altitude of a point near the poles is:

如果该点靠近极点,即“p<1”,则该方法产生的高度值不稳定。确定极点附近点高度的一种更简单的方法是:

      altitude = |Z| - R * (1 - f)
        
      altitude = |Z| - R * (1 - f)
        
Appendix B. Calculating the Upward Normal of a Polygon
附录B.多边形向上法线的计算

For a polygon that is guaranteed to be convex and coplanar, the upward normal can be found by finding the vector cross product of adjacent edges.

对于保证凸共面的多边形,可以通过寻找相邻边的向量叉积来找到向上法线。

For more general cases, the Newell method of approximation described in [Sunday02] may be applied. In particular, this method can be used if the points are only approximately coplanar, and for non-convex polygons.

对于更一般的情况,可采用[Sunday02]中所述的纽厄尔近似法。特别是,如果点仅近似共面,并且对于非凸多边形,可以使用此方法。

This process requires a Cartesian coordinate system. Therefore, convert the geodetic coordinates of the polygon to Cartesian, ECEF coordinates (Appendix A). If no altitude is specified, assume an altitude of zero.

此过程需要笛卡尔坐标系。因此,将多边形的大地坐标转换为笛卡尔、ECEF坐标(附录A)。如果未指定高度,则假定高度为零。

This method can be condensed to the following set of equations:

此方法可压缩为以下方程组:

      Nx = sum from i=1..n of (y[i] * (z[i+1] - z[i-1]))
        
      Nx = sum from i=1..n of (y[i] * (z[i+1] - z[i-1]))
        
      Ny = sum from i=1..n of (z[i] * (x[i+1] - x[i-1]))
        
      Ny = sum from i=1..n of (z[i] * (x[i+1] - x[i-1]))
        
      Nz = sum from i=1..n of (x[i] * (y[i+1] - y[i-1]))
        
      Nz = sum from i=1..n of (x[i] * (y[i+1] - y[i-1]))
        

For these formulae, the polygon is made of points "(x[1], y[1], z[1])" through "(x[n], y[n], x[n])". Each array is treated as circular, that is, "x[0] == x[n]" and "x[n+1] == x[1]".

对于这些公式,多边形由点(x[1],y[1],z[1])到(x[n],y[n],x[n])构成。每个数组都被视为圆形,即“x[0]==x[n]”和“x[n+1]==x[1]”。

To translate this into a unit-vector; divide each component by the length of the vector:

将其转化为单位向量;将每个分量除以向量的长度:

      Nx' = Nx / sqrt(Nx^2 + Ny^2 + Nz^2)
        
      Nx' = Nx / sqrt(Nx^2 + Ny^2 + Nz^2)
        
      Ny' = Ny / sqrt(Nx^2 + Ny^2 + Nz^2)
        
      Ny' = Ny / sqrt(Nx^2 + Ny^2 + Nz^2)
        
      Nz' = Nz / sqrt(Nx^2 + Ny^2 + Nz^2)
        
      Nz' = Nz / sqrt(Nx^2 + Ny^2 + Nz^2)
        
B.1. Checking That a Polygon Upward Normal Points Up
B.1. 检查多边形向上法线是否指向上

RFC 5491 [RFC5491] stipulates that the Polygon shape be presented in counterclockwise direction so that the upward normal is in an upward direction. Accidental reversal of points can invert this vector. This error can be hard to detect just by looking at the series of coordinates that form the polygon.

RFC 5491[RFC5491]规定多边形形状应以逆时针方向呈现,以便向上法线为向上方向。点的意外反转可以反转此向量。仅通过查看形成多边形的一系列坐标,很难检测到此错误。

Calculate the dot product of the upward normal of the polygon (Appendix B) and any vector that points away from the center of the earth from the location of polygon. If this product is positive, then the polygon upward normal also points away from the center of the earth.

计算多边形向上法线(附录B)与从多边形位置指向远离地球中心的任何向量的点积。如果该乘积为正,则多边形向上法线也指向远离地球中心的方向。

The inverse cosine of this value indicates the angle between the horizontal plane and the approximate plane of the polygon.

此值的反余弦表示多边形的水平面和近似平面之间的角度。

A unit vector for the upward direction at any point can be found based on the latitude (lat) and longitude (lng) of the point, as follows:

根据该点的纬度(lat)和经度(lng),可以找到任何点的向上方向的单位矢量,如下所示:

      Up = [ cos(lat) * cos(lng) ; cos(lat) * sin(lng) ; sin(lat) ]
        
      Up = [ cos(lat) * cos(lng) ; cos(lat) * sin(lng) ; sin(lat) ]
        

For polygons that span less than half the globe, any point in the polygon -- including the centroid -- can be selected to generate an approximate up vector for comparison with the upward normal.

对于跨度小于地球一半的多边形,可以选择多边形中的任何点(包括质心)生成近似上方向向量,以便与向上法线进行比较。

Acknowledgements

致谢

Peter Rhodes provided assistance with some of the mathematical groundwork on this document. Dan Cornford provided a detailed review and many terminology corrections.

彼得·罗德斯(Peter Rhodes)为本文件的一些数学基础工作提供了帮助。Dan Cornford提供了详细的评论和许多术语更正。

Authors' Addresses

作者地址

Martin Thomson Mozilla 331 E Evelyn Street Mountain View, CA 94041 United States

马丁·汤姆森·莫兹拉美国加利福尼亚州伊夫林街东331号山景城,邮编94041

   EMail: martin.thomson@gmail.com
        
   EMail: martin.thomson@gmail.com
        

James Winterbottom Unaffiliated Australia

詹姆斯·温特巴顿,澳大利亚无附属机构

   EMail: a.james.winterbottom@gmail.com
        
   EMail: a.james.winterbottom@gmail.com