Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set trip boundaries #1

Open
pgmccann opened this issue Apr 26, 2019 · 0 comments
Open

Set trip boundaries #1

pgmccann opened this issue Apr 26, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@pgmccann
Copy link
Member

Location tracking is currently functional, with individual points be recorded in a database table. These are not grouped into fishing trips.

When a user starts tracking their location, this will usually indicate the start of a new trip; when they stop, that indicates the end. However, it is possible that a user might temporarily stop and then resume tracking their location during a trip. Conversely, they may make multiple separate trips in quick succession. They may also forget to turn off tracking after a trip. The users fish at night, so trips may run over midnight, from one day into the next. We can assume that each fishing trip takes within a period running from 12pm one day to 12pm the next.

Proposed algorithm:

  1. User starts tracking location
  2. Are there any existing trips recorded?
    a. If not, record the start of a new trip
    b. If so, did the most recent trip end before the most recent 12pm?
    i. If so, record the start of a new trip
    ii. If not, ask the user if this is a new trip or a continuation of the previous one
@pgmccann pgmccann added the enhancement New feature or request label Apr 26, 2019
@pgmccann pgmccann self-assigned this Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant