derhuerst/wifi-on-ice-position-stream

estimate speed if not reported in tunnels

Open

#2 opened on Feb 25, 2020

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (1 fork)github user discovery
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (4 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

wifi-on-ice-portal-client's journey() now exposes a field distanceToPreviousStop in meters, which changes every few seconds. This could optionally be used to estimate the ICE speed if the speed field is null.

We should make sure that:

  • We only use the estimated speed when status() reports null.
  • The estimation doesn't poll journey() too frequently, because it causes quite a bit more traffic than just status().
  • If journeys() takes very long to respond, the estimation shouldn't use it.

Contributor guide