From bfb5325e68e862e888d422f5d717d2da49e566e4 Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Sun, 12 May 2024 22:55:34 +1000 Subject: [PATCH] chore: add correction/addition descriptions --- index.html | 231 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 182 insertions(+), 49 deletions(-) diff --git a/index.html b/index.html index 5738513..00fb2a2 100644 --- a/index.html +++ b/index.html @@ -46,19 +46,6 @@ errata: "https://w3c.github.io/geolocation-api/errata.html", }; - @@ -599,8 +586,26 @@

method steps are:

    -
  1. If the [=this=]'s [=relevant global object=]'s [=associated - `Document`=] is not [=Document/fully active=]: +
  2. +
    + Candidate Correction: Explanation of + the change: Updated reference to the global object to use + [=this=] for consistency in error handling within geolocation + retrieval. +
    +
      +
    1. + If the [=current settings object=]'s [=relevant global + object=]'s [=associated `Document`=] is not + [=Document/fully active=]: If the [=this=]'s + [=relevant global object=]'s [=associated `Document`=] is + not [=Document/fully active=]: +
    2. +
    +
    +
    +
    1. [=Call back with error=] |errorCallback| and {{GeolocationPositionError/POSITION_UNAVAILABLE}}. @@ -625,8 +630,25 @@

      method steps are:

        -
      1. If the [=this=]'s [=relevant global object=]'s [=associated - `Document`=] is not [=Document/fully active=]: +
      2. +
        + Candidate Correction: Explanation of + the change: Simplified reference to the global object in the + method steps for checking document's activity status. +
        +
          +
        1. + If the [=current settings object=]'s [=relevant global + object=]'s [=associated `Document`=] is not + [=Document/fully active=]: If the [=this=]'s + [=relevant global object=]'s [=associated `Document`=] is + not [=Document/fully active=]: +
        2. +
        +
        +
        +
        1. [=Call back with error=] passing |errorCallback| and {{GeolocationPositionError/POSITION_UNAVAILABLE}}. @@ -1011,7 +1033,7 @@

          interface GeolocationPosition { readonly attribute GeolocationCoordinates coords; readonly attribute EpochTimeStamp timestamp; - [Default] object toJSON(); + [Default] object toJSON(); };
          @@ -1031,14 +1053,21 @@

          geographic position of the device was acquired.

          -
          +

          `toJSON()` method

          -

          - The toJSON() method returns a JSON representation of the - {{GeolocationPosition}} object. -

          +
          + Candidate Addition: Explanation of the + addition: Introduce a `toJSON()` method to allow the + {{GeolocationPosition}} object to be easily converted into a JSON + representation, facilitating interoperability and ease of use in web + applications. +

          + The toJSON() method returns a JSON representation of the + {{GeolocationPosition}} object. +

          +

          @@ -1109,15 +1138,20 @@

          `latitude`, `longitude`, and `accuracy` attributes

          -

          - The latitude and longitude attributes denote - the position, specified as a real number of degrees, in the [[WGS84]] - coordinate system. -

          -

          - The accuracy attribute denotes the accuracy level of the - latitude and longitude coordinates in meters (e.g., `65` meters). -

          +
          + Candidate Correction: To improve clarity + and precision, the description of latitude and longitude attributes + has been updated to specify that these are real numbers in degrees + according to the [[WGS84]] geodetic system, instead of just stating + "decimal degrees." +

          + The latitude and longitude + attributes are geographic coordinates specified in decimal + degrees. The latitude and + longitude attributes denote the position, specified as a + real number of degrees, in the [[WGS84]] coordinate system. +

          +

          @@ -1152,14 +1186,21 @@

          meters per second.

          -
          +

          `toJSON()` method

          -

          - The toJSON() method returns a JSON representation of the - {{GeolocationCoordinates}} object. -

          +
          + Candidate Addition: Explanation of the + addition: Extend the `toJSON()` method functionality to the + {{GeolocationCoordinates}} object, allowing it to be serialized into + a JSON format which enhances data handling and integration + capabilities in web applications. +

          + The toJSON() method returns a JSON representation of the + {{GeolocationCoordinates}} object. +

          +

          @@ -1174,45 +1215,137 @@

        2. Let |coords:GeolocationCoordinates| be a newly created {{GeolocationCoordinates}} instance:
            -
          1. Initialize |coord|'s +
          2. +
            + Candidate Correction: Enhanced + the constructor steps for {{GeolocationCoordinates}} to + clarify the units and reference systems for latitude, + longitude, and altitude, ensuring consistency with the + updated attribute definitions. +

            + Initialize |coord|'s {{GeolocationCoordinates/latitude}} + attribute to a geographic coordinate in decimal + degrees. attribute to a latitude, specified as a + real number of degrees, in the [[WGS84]] coordinate + system. +

            +

            + Initialize |coord|'s {{GeolocationCoordinates/longitude}} + attribute to a geographic coordinate in decimal + degrees. attribute to a longitude, specified as + a real number of degrees, in the [[WGS84]] coordinate + system. +

            +

            + Initialize |coord|'s {{GeolocationCoordinates/altitude}} + attribute in meters above the [[WGS84]] ellipsoid, or + `null` if the implementation cannot provide altitude + information. attribute to a height, in meters, + above the [[WGS84]] ellipsoid, or `null` if the + implementation cannot provide altitude information. +

            +
            +
          3. +
          4. +
            + Candidate Correction: Updates to + the descriptions of the speed and heading attributes to + specify measurement units and conditions for null values, + aligning with the overall enhancements to attribute accuracy + and clarity. +

            + Initialize |coord|'s {{GeolocationCoordinates/speed}} + attribute to a non-negative real number, or as `null` + if the implementation cannot provide speed + information. attribute to a speed, as a + non-negative real number of meters per second, or as `null` + if the implementation cannot provide speed + information. +

            +

            + Initialize |coord|'s {{GeolocationCoordinates/heading}} + attribute in degrees, or `null` if the implementation + cannot provide heading information. If the hosting device + is stationary (i.e., the value of the + {{GeolocationCoordinates/speed}} attribute is 0), then + initialize the {{GeolocationCoordinates/heading}} to + `NaN`. attribute to a heading, in degrees, or + `null` if the implementation cannot provide heading + information. If the hosting device is stationary (i.e., the + value of the {{GeolocationCoordinates/speed}} attribute is + 0), then initialize the {{GeolocationCoordinates/heading}} + to `NaN`. +

            +
            +
          5. +
          6. +
            + Candidate Correction: Updates to + the descriptions of the speed and heading attributes to + specify measurement units and conditions for null values, + aligning with the overall enhancements to attribute accuracy + and clarity. +

            + Initialize |coord|'s {{GeolocationCoordinates/speed}} + attribute to a non-negative real number, or as `null` + if the implementation cannot provide speed + information. attribute to a speed, as a + non-negative real number of meters per second, or as `null` + if the implementation cannot provide speed + information. +

            +

            + Initialize |coord|'s {{GeolocationCoordinates/heading}} + attribute in degrees, or `null` if the implementation + cannot provide heading information. If the hosting device + is stationary (i.e., the value of the + {{GeolocationCoordinates/speed}} attribute is 0), then + initialize the {{GeolocationCoordinates/heading}} to + `NaN`. attribute to a heading, in degrees, or + `null` if the implementation cannot provide heading + information. If the hosting device is stationary (i.e., the + value of the {{GeolocationCoordinates/speed}} attribute is + 0), then initialize the {{GeolocationCoordinates/heading}} + to `NaN`. +

            +
            +
          7. +
          8. Initialize |coord|'s {{GeolocationCoordinates/accuracy}} attribute to a non-negative real number. The value SHOULD correspond to a 95% confidence level with respect to the longitude and latitude values. -
          9. -
          10. Initialize |coord|'s +
          11. Initialize |coord|'s {{GeolocationCoordinates/altitudeAccuracy}} attribute as non-negative real number, or to `null` if the implementation cannot provide altitude information. If the altitude accuracy information is provided, it SHOULD correspond to a 95% confidence level. -
          12. -
          13. Initialize |coord|'s +
          14. +
        3. Return a newly created {{GeolocationPosition}} instance with its