Skip to content

Conversation

@n3tr
Copy link
Collaborator

@n3tr n3tr commented Jan 18, 2021

Configure locationTemplate option to remove unused (need to confirm) data in the location payload that get sent to server.

Before

{
  "coords": {
    "speed_accuracy": 0,
    "speed": 6.5899999999999999,
    "longitude": -122.02329798,
    "floor": 0,
    "heading_accuracy": 0,
    "latitude": 37.332160719999997,
    "accuracy": 10,
    "altitude_accuracy": -1,
    "altitude": 0,
    "heading": 347.52999999999997
  },
  "extras": {},
  "is_moving": true,
  "odometer": 1583.2,
  "uuid": "55FF6745-4786-4D72-A3CC-ED52067E0E4A",
  "activity": { "type": "unknown", "confidence": 100 },
  "battery": { "level": -1, "is_charging": false },
  "timestamp": "2021-01-17T08:32:27.572Z"
}

After

{
  "coords": {
    "latitude": 37.333285240000002,
    "longitude": -122.0415168,
    "accuracy": 10
  },
  "timestamp": "2021-01-18T13:22:52.333Z",
  "uuid": "3C817E1F-33E6-4920-B3F8-DF46BEC99023"
}

For 20 location records, the size reduce from ~11.5 KB to ~4.11 KB

@n3tr n3tr changed the title Remove unused location data payload WIP: Remove unused location data payload Jan 18, 2021
@n3tr n3tr changed the title WIP: Remove unused location data payload WIP: Remove unused location data from payload Jan 18, 2021
@n3tr n3tr changed the title WIP: Remove unused location data from payload WIP: Remove unused location data from request payload Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant