Correction: Update acquisition algorithm to define data types and han… · w3c/geolocation@22ed7a4 (original) (raw)

`@@ -834,12 +834,28 @@

`

834

834

` value of the |options|.{{PositionOptions/maximumAge}}

`

835

835

` member.

`

836

836

`

`

837

``

`-

  • If |cachedPosition|'s

    `

    838

    ``

    `-

    {{GeolocationPosition/timestamp}}'s value is greater than

    `

    839

    ``

    `-

    |cacheTime|, and

    `

    840

    ``

    `-

    |cachedPosition|.{{GeolocationPosition/[[isHighAccuracy]]}}

    `

    841

    ``

    `-

    equals |options|.{{PositionOptions/enableHighAccuracy}},

    `

    842

    ``

    `-

    set |position| to |cachedPosition|.

    `

    ``

    837

    `+

  • `

    ``

    838

    `+

    If |cachedPosition|'s

    `

    ``

    844

    `+

    {{GeolocationPosition/timestamp}}'s value is greater

    `

    ``

    845

    `+

    than |cacheTime|, and

    `

    ``

    846

    `+

    |cachedPosition|.{{GeolocationPosition/[[isHighAccuracy]]}}

    `

    ``

    847

    `+

    equals

    `

    ``

    848

    `+

    |options|.{{PositionOptions/enableHighAccuracy}},

    `

    ``

    849

    `+

    set |position| to |cachedPosition|. <ins cite=

    `

    ``

    850

    `+

    "#c8">:

    `

    ``

    851

    `+

      `

      ``

      852

      `+

    1. [=Queue a task=] on the [=geolocation task

      `

      ``

      853

      `+

      source=] with a step that [=invokes=]

      `

      ``

      854

      `+

      |successCallback| with |cachedPosition|.

      `

      ``

      855

      `+

    2. `

      ``

      856

      `+

    3. Terminate this algorithm.

      `

      ``

      857

      `+

    4. `

      ``

      858

      `+

    `

    843

    859

    `

  • `

    844

    860

    `

    `

    845

    861

    `

    `

    `@@ -861,16 +877,98 @@

    `

    861

    877

    `

    `

    862

    878

    `

    `

    863

    879

    `

    `

    864

    ``

    `-

  • If acquiring the position data from the system succeeds:

    `

    ``

    880

    `+

  • If acquiring the position data from the

    `

    ``

    881

    `+

    system succeeds:

    `

    ``

    882

    `+

    `

    ``

    892

    `+

      `

      ``

      893

      `+

    1. Let |positionData| be a [=map=] with the following

      `

      ``

      894

      `+

      name/value pairs based on the acquired position data:

      `

      ``

      895

      `+

      `

      ``

      896

      `+

      `

      ``

      897

      `+

      "longitude"

      `

      ``

      898

      `+

      `

      ``

      899

      `+

      `

      ``

      900

      `+

      A {{double}} that represents the longitude

      `

      ``

      901

      `+

      coordinates on the Earth's surface in degrees,

      `

      ``

      902

      `+

      using the [[WGS84]] coordinate system. Longitude

      `

      ``

      903

      `+

      measures how far east or west a point is from the

      `

      ``

      904

      `+

      Prime Meridian.

      `

      ``

      905

      `+

      `

      ``

      906

      `+

      `

      ``

      907

      `+

      "altitude"

      `

      ``

      908

      `+

      `

      ``

      909

      `+

      `

      ``

      910

      `+

      A {{double?}} that represents the altitude in

      `

      ``

      911

      `` +

      meters above the [[WGS84]] ellipsoid, or null if

      ``

      ``

      912

      `+

      not available. Altitude measures the height above

      `

      ``

      913

      `+

      sea level.

      `

      ``

      914

      `+

      `

      ``

      915

      `+

      `

      ``

      916

      `+

      "accuracy"

      `

      ``

      917

      `+

      `

      ``

      918

      `+

      `

      ``

      919

      `+

      A non-negative {{double}} that represents the

      `

      ``

      920

      `+

      accuracy value indicating the 95% confidence level

      `

      ``

      921

      `+

      in meters. Accuracy measures how close the measured

      `

      ``

      922

      `+

      coordinates are to the true position.

      `

      ``

      923

      `+

      `

      ``

      924

      `+

      `

      ``

      925

      `+

      "altitudeAccuracy"

      `

      ``

      926

      `+

      `

      ``

      927

      `+

      `

      ``

      928

      `+

      A non-negative {{double?}} that represents the

      `

      ``

      929

      `` +

      altitude accuracy, or null if not available,

      ``

      ``

      930

      `+

      indicating the 95% confidence level in meters.

      `

      ``

      931

      `+

      Altitude accuracy measures how close the measured

      `

      ``

      932

      `+

      altitude is to the true altitude.

      `

      ``

      933

      `+

      `

      ``

      934

      `+

      `

      ``

      935

      `+

      "speed"

      `

      ``

      936

      `+

      `

      ``

      937

      `+

      `

      ``

      938

      `+

      A non-negative {{double?}} that represents the

      `

      ``

      939

      `` +

      speed in meters per second, or null if not

      ``

      ``

      940

      `+

      available. Speed measures how fast the device is

      `

      ``

      941

      `+

      moving.

      `

      ``

      942

      `+

      `

      ``

      943

      `+

      `

      ``

      944

      `+

      "heading"

      `

      ``

      945

      `+

      `

      ``

      946

      `+

      `

      ``

      947

      `+

      A {{double?}} that represents the heading in

      `

      ``

      948

      `` +

      degrees, or null if not available, or NaN if

      ``

      ``

      949

      `+

      the device is stationary. Heading measures the

      `

      ``

      950

      `+

      direction in which the device is moving relative to

      `

      ``

      951

      `+

      true north.

      `

      ``

      952

      `+

      `

      ``

      953

      `+

      `

      ``

      954

      `+

    2. `

      ``

      955

      `` +

    3. Set |position| to [=a new `GeolocationPosition`=]

      ``

      ``

      956

      `+

      passing |positionData|, |acquisitionTime| and

      `

      ``

      957

      `+

      |options|.{{PositionOptions/enableHighAccuracy}}.

      `

      ``

      958

      `+

    4. `

      ``

      959

      `+

    5. Set [=this=]'s {{Geolocation/[[cachedPosition]]}} to

      `

      ``

      960

      `+

      |position|.

      `

      ``

      961

      `+

    6. `

      ``

      962

      `+

    `

    865

    963

    `

      `

      866

      ``

      `` -

    1. Set |position| be [=a new `GeolocationPosition`=]

      ``

      ``

      964

      `` +

    2. Set |position| to [=a new `GeolocationPosition`=]

      ``

      867

      965

      ` passing |acquisitionTime| and

      `

      868

      966

      ` |options|.{{PositionOptions/enableHighAccuracy}}.

      `

      869

      967

      `

    3. `

      870

      968

      `

    4. Set [=this=]'s {{Geolocation/[[cachedPosition]]}} to
    5. `

      871

      969

      ` |position|.

      `

      872

      970

      `

  • `

    873

    ``

    `-

    `

    ``

    971

    `+

    `

    874

    972

    `

    `

    875

    973

    `

  • Stop the |timeout|.
  • `

    876

    974

    `

    `

    `@@ -1201,82 +1299,80 @@

    `

    1201

    1299

    ` representation of the {{GeolocationCoordinates}} object.

    `

    1202

    1300

    `

    `

    1203

    1301

    `

    `

    1204

    ``

    `-

    `

    ``

    1302

    `+

    `

    1205

    1303

    `

    `

    1206

    1304

    `` Constructing a GeolocationPosition

    ``

    1207

    1305

    `

    `

    ``

    1306

    `+

    `

    ``

    1312

    `+

    `

    ``

    1313

    `` +

    A new GeolocationPosition is constructed with [=map=]

    ``

    ``

    1314

    `+

    |positionData|, {{EpochTimeStamp}} |timestamp:EpochTimeStamp| and

    `

    ``

    1315

    `+

    boolean |isHighAccuracy| by performing the following steps:

    `

    ``

    1316

    `+

    `

    ``

    1317

    `+

      `

      ``

      1318

      `+

    1. Let |coords:GeolocationCoordinates| be a newly created

      `

      ``

      1319

      `+

      {{GeolocationCoordinates}} instance.

      `

      ``

      1320

      `+

    2. `

      ``

      1321

      `+

    3. [=map/For each=] |key| → |value| in |positionData|:

      `

      ``

      1322

      `+

        `

        ``

        1323

        `+

      1. Set |coords|'s attribute named |key| to |value|.

        `

        ``

        1324

        `+

      2. `

        ``

        1325

        `+

      `

      ``

      1326

      `+

    4. `

      ``

      1327

      `+

    5. Return a newly created {{GeolocationPosition}} instance with its

      `

      ``

      1328

      `+

      {{GeolocationPosition/coords}} attribute initialized to |coords| and

      `

      ``

      1329

      `+

      {{GeolocationPosition/timestamp}} attribute initialized to

      `

      ``

      1330

      `+

      |timestamp|, and its {{GeolocationPosition/[[isHighAccuracy]]}}

      `

      ``

      1331

      `+

      internal slot set to |isHighAccuracy|.

      `

      ``

      1332

      `+

    6. `

      ``

      1333

      `+

    `

    1208

    1334

    `

    `

    1209

    ``

    `` -

    A new GeolocationPosition is constructed with

    ``

    ``

    1335

    `` +

    A new GeolocationPosition is constructed with

    ``

    1210

    1336

    ` {{EpochTimeStamp}} |timestamp:EpochTimeStamp| and boolean

    `

    1211

    1337

    ` |isHighAccuracy| by performing the following steps:

    `

    1212

    1338

    `

    `

    1213

    ``

    `-

    `

    1219

    ``

    `-

    `

    1225

    1339

    `

      `

      1226

      1340

      `

    1. Let |coords:GeolocationCoordinates| be a newly created
    2. `

      1227

      1341

      ` {{GeolocationCoordinates}} instance:

      `

      1228

      1342

      `

        `

        1229

        1343

        `

      1. Initialize |coord|'s {{GeolocationCoordinates/latitude}}
      2. `

        1230

        ``

        `-

        attribute to a geographic coordinate in decimal

        `

        1231

        ``

        `-

        degrees.

    attribute to a latitude, specified

    `

    1232

    ``

    `-

    as a real number of degrees, in the [[WGS84]] coordinate

    `

    1233

    ``

    `-

    system.

    `

    ``

    1344

    `+

    attribute to a geographic coordinate in decimal degrees.

    `

    1234

    1345

    `

    `

    1235

    1346

    `

  • Initialize |coord|'s {{GeolocationCoordinates/longitude}}
  • `

    1236

    ``

    `-

    attribute to a geographic coordinate in decimal

    `

    1237

    ``

    `-

    degrees. attribute to a longitude,

    `

    1238

    ``

    `-

    specified as a real number of degrees, in the [[WGS84]]

    `

    1239

    ``

    `-

    coordinate system.

    `

    1240

    ``

    `-

    `

    1241

    ``

    `-

  • Initialize |coord|'s {{GeolocationCoordinates/altitude}}

    `

    1242

    ``

    `-

    attribute in meters above the [[WGS84]]

    `

    1243

    ``

    `` -

    ellipsoid, or null if the implementation cannot provide

    ``

    1244

    ``

    `-

    altitude information. attribute to a

    `

    1245

    ``

    `` -

    height, in meters, above the [[WGS84]] ellipsoid, or null if

    ``

    1246

    ``

    `-

    the implementation cannot provide altitude information.

    `

    1247

    ``

    `-

  • `

    1248

    ``

    `-

  • Initialize |coord|'s {{GeolocationCoordinates/speed}}

    `

    1249

    ``

    `-

    attribute to a non-negative real number, or as

    `

    1250

    ``

    `` -

    null if the implementation cannot provide speed

    ``

    1251

    ``

    `-

    information. attribute to a speed, as a

    `

    1252

    ``

    `` -

    non-negative real number of meters per second, or as null if

    ``

    1253

    ``

    `-

    the implementation cannot provide speed information.

    `

    1254

    ``

    `-

  • `

    1255

    ``

    `-

  • Initialize |coord|'s {{GeolocationCoordinates/heading}}

    `

    1256

    ``

    `` -

    attribute in degrees, or null if the

    ``

    1257

    ``

    `-

    implementation cannot provide heading information. If the hosting

    `

    1258

    ``

    `-

    device is stationary (i.e., the value of the

    `

    1259

    ``

    `-

    {{GeolocationCoordinates/speed}} attribute is 0), then initialize

    `

    1260

    ``

    `` -

    the {{GeolocationCoordinates/heading}} to NaN.

    ``

    1261

    ``

    `` -

    attribute to a heading, in degrees, or null

    ``

    1262

    ``

    `-

    if the implementation cannot provide heading information. If

    `

    1263

    ``

    `-

    the hosting device is stationary (i.e., the value of the

    `

    1264

    ``

    `-

    {{GeolocationCoordinates/speed}} attribute is 0), then

    `

    1265

    ``

    `-

    initialize the {{GeolocationCoordinates/heading}} to

    `

    1266

    ``

    `` -

    NaN.

    ``

    ``

    1347

    `+

    attribute to a geographic coordinate in decimal degrees.

    `

    1267

    1348

    `

  • `

    1268

    1349

    `

  • Initialize |coord|'s {{GeolocationCoordinates/accuracy}}
  • `

    1269

    1350

    ` attribute to a non-negative real number. The value SHOULD

    `

    1270

    1351

    ` correspond to a 95% confidence level with respect to the

    `

    1271

    1352

    ` longitude and latitude values.

    `

    1272

    1353

    `

    `

    ``

    1354

    `+

  • Initialize |coord|'s {{GeolocationCoordinates/altitude}}

    `

    ``

    1355

    `` +

    attribute in meters above the [[WGS84]] ellipsoid, or null if

    ``

    ``

    1356

    `+

    the implementation cannot provide altitude information.

    `

    ``

    1357

    `+

  • `

    1273

    1358

    `

  • Initialize |coord|'s
  • `

    1274

    1359

    ` {{GeolocationCoordinates/altitudeAccuracy}} attribute as

    `

    1275

    1360

    `` non-negative real number, or to null if the implementation

    ``

    1276

    1361

    ` cannot provide altitude information. If the altitude accuracy

    `

    1277

    1362

    ` information is provided, it SHOULD correspond to a 95% confidence

    `

    1278

    1363

    ` level.

    `

    1279

    1364

    `

    `

    ``

    1365

    `+

  • Initialize |coord|'s {{GeolocationCoordinates/speed}}

    `

    ``

    1366

    `` +

    attribute to a non-negative real number, or as null if the

    ``

    ``

    1367

    `+

    implementation cannot provide speed information.

    `

    ``

    1368

    `+

  • `

    ``

    1369

    `+

  • Initialize |coord|'s {{GeolocationCoordinates/heading}}

    `

    ``

    1370

    `` +

    attribute in degrees, or null if the implementation cannot

    ``

    ``

    1371

    `+

    provide heading information. If the hosting device is stationary

    `

    ``

    1372

    `+

    (i.e., the value of the {{GeolocationCoordinates/speed}}

    `

    ``

    1373

    `+

    attribute is 0), then initialize the

    `

    ``

    1374

    `` +

    {{GeolocationCoordinates/heading}} to NaN.

    ``

    ``

    1375

    `+

  • `

    1280

    1376

    `

    `

    1281

    1377

    `

    `

    1282

    1378

    `

  • Return a newly created {{GeolocationPosition}} instance with its
  • `

    `@@ -1285,7 +1381,7 @@

    `

    1285

    1381

    ` |timestamp|, and its {{GeolocationPosition/[[isHighAccuracy]]}}

    `

    1286

    1382

    ` internal slot set to |isHighAccuracy|.

    `

    1287

    1383

    `

    `

    1288

    ``

    `-

    `

    ``

    1384

    `+

    `

    1289

    1385

    `

    `

    1290

    1386

    `

    `

    1291

    1387

    `<section id="position_error_interface" data-dfn-for=

    `