Coder Social home page Coder Social logo

graas's People

Contributors

aliatt2 avatar dependabot[bot] avatar mlgilbert18 avatar owades avatar unreasonableman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

graas's Issues

Stress Test improvements

Need to define requirements, but they could include

  • configure how many entities will query for vehicle-positions.pb at what frequency
  • monitor best/avg/worst server response times for vehicle-positions.pb queries
  • monitor server load during test run (server auto-scales up to 8 instances under load IIRC)
  • specify duration of test run
  • schedule recurring tests
  • ensure they are not going to GRaaS Report
  • re-deploy server after test runs
  • Create json or yaml input

Auto-update route-names.json based on static GTFS

Prevent route-names.json from getting out-of-sync with static-gtfs files. This also streamlines agency onboarding.

  1. Add TripListGenerator flags (headsign vs route name, direction) to filter-params.json. Rename it to something more generic, such as "agency-params".
  2. Update TripListGenerator to check the gcloud bucket for agency-params.json, and use the flags listed in that file to run TripListGenerator. We'll need to update GCloudStorage.java to include a function for getting an object from the bucket.
  3. Update TripListGenerator to save results directly to route-names.json in the gcloud bucket. Rename to trip-names.json while we're at it.
  4. Create a daily job on GH actions that checks when route-names.json was last updated, and when the static feed was last updated. If the feed was updated after, re-generate trip-names.json. Include some form of alerting that tells us what was updated.

Consider building a tool to generate an agency's static GTFS feed using e.g. the web app

Comment from @unreasonableman:

Building a system to generate static GTFS feeds isn't really a trivial undertaking, but we may be able to iteratively ease our way into it.

One of the big issues for creating static GTFS is to specify lists of lat/long values for the shapes.txt file. A possible approach is to use the web app as is. Manually create a trips.txt file, and then let the driver/operator/etc. run the web app as usual. Route points will be recorded into our DB, and can subsequently be extracted to create shapes.txt.

There is of course also the issue of creating timetables for routes, which we will need to figure out how to do (OCR of existing paper schedules, export from excel sheets, etc.)

Let agency dispatchers assign trip IDs

A proposal to free drivers from the grind of having to start and stop trips manually.

  • On-device web app: add patrol mode so that app constantly sends location updates without trip ID, but with vehicle ID
  • Desktop web client for dispatcher
    • auth through QR code or copy-pasted agency key
    • inactive list of buses that aren't assigned trips
    • active list of buses that are assigned trips
    • switching buses between lists
      • to activate, select inactive vehicle and choose Assign Trip, which brings up trip dropdown
      • to deactivate, select vehicle and choose End Trip
  • Server
    • new endpoint /assign-vehicle expects JSON that has agency-id, vehicle-id and trip-id
      • create unique id: <agency-id>-<vehicle-id>
      • write id and trip id to Assignment DB table
      • trip-id can be unassigned
    • regular vehicle position update endpoint:
      • if update without trip-id comes in, create unique id: <agency-id>-<vehicle-id>. Get trip-id value from assignment table. If unassigned add to unassigned feed (see below), otherwise add trip-id field and proceed with normal update flow
  • Map
    • to show unassigned buses on map, create new feed /unassigned-vehicle-positions which has the same structure as /vehicle-positions, except trip IDs are all unassigned

Create interactive GRaaS Report tool

Currently a nightly job creates one "dashboard" image per agency, containing info on each trip they took that day using the GRaaS app. Example:
report-0 (16)

  • Create a webpage where current and historic reports can be accessed
  • Create an interactive component to the report, where individual trips can be zoomed-in, where tooltips show trip metadata (what currently is shown below the trip title), and where one can use the timeline at the top to filter/highlight the maps below.

Update GRaaS to allow drivers to select holiday routes

Service may be different than normal on New Years Day, Christmas etc. Include this detail in GRaaS (ie incorporate calendar_dates.txt in addition to calendar.txt.

This has been the root cause for some agency issues, leading to the Calendar value being null on routes_names.json

Web app QR code scanner not loading camera view

When I run the web app and try to load the QR scanner, my camera activates (green light turns on), but no camera view appears. It is still able to scan QR codes. If I start a new tab in safari and then go back to the web app, the camera view appears

I recently updated my Macbook Air to MacOS Monterey, and my best guess is this is an issue with the latest version of Safari.

It works fine in Chrome on the same machine, as well as on Safari on my old iPad

This html-qrcode issue captures the same issue (no resolution yet, though).

Screen Shot 2022-01-28 at 1 30 16 PM

route and vehicle dropdowns blank upon first start after QR scan

Copied from GRaaS Staging, notes from @unreasonableman:

Scanned QR code for TCRTA on ipad, then pressed Start button. Dropdowns were empty. Checked filter params and route bucket files, both looked reasonable. Ran web app on desktop safari wit js console open to debug. Routes showed up. Went back to ipad, quit out of safari there and restarted. Issue did not persist past restart.

This may be harder to debug, but it's a bad first impression if it happens.

Additional detail: the dropdowns were completely blank, i.e. didn't have "Select Route" or "Select Vehicle". This suggests either a crash or a stall, and not a filtering issue.

Add more-useful detail to graphic report

  • - In addition to trip name and time, show vehicle ID, device type and last 4 characters of UUID. This will let us track device (type) performance over time even if devices are switched around on vehicles
  • - Size the location update dot based on how many reports for that exact position have come in. To show "stuck" GPS.
  • - Measure frequency of new GPS updates

Create GUI for updating agency filter parameters

As a part of agency onboarding, we set up several json files for each agency, containing vehicle, route & filter parameters. Create a front-end that GRaaS field ops personnel can use to generate, update and modify these values.

The goal would be to streamline/automate the Create service data for agency
and Create keys for agency sections of our onboarding runbook.

in GRaaS Report, group trips by sessionID in addition to tripID

The GRaaS report treats trip_id as a unique identifier. This generally works, as there should only be one "map" per trip, but there are some exceptions, such as:

  1. Two drivers select the same trip (presumably one does so erroneously)
  2. Two devices are running on the same vehicle (ie babyshark & web app, which we've experienced)

In either of these cases, the GRaaS report will arbitrarily consolidate/overwrite the trips, so that they appear as a single trip.

To address this, we could group data on the GRaaS report by "sessionID" in addition to tripID, so that two maps of the same trip can exist side by side.

SesssionID has been implemented already in the web app, which means the remaining step is to handle trip inference. This can be done one of two ways:
A) Assign a sessionID for trip inference devices (ie new daily unique identifier)
B) In the GRaaS report generation logic, make up a session ID for trip inference devices.

I think B would be sufficient.

Weekday routes appearing on Saturday GRaaS report

Both the driver + iPad and TripInference appear to have selected a weekday route during Saturday service.

All four trips in the screenshotted saturday GRaaS report are weekday trips, according to both Glenn's static gtfs and route-names.json.

report-1 (18)

Create staging environment for server deployment

Instructions from here:

  1. When deploying, use the command “gcloud app deploy --no-promote”
  2. Get the new versionID from the versions page, and access it via the URL: https://<VERSION_ID>-dot-default-dot-lat-long-prototype.wl.r.appspot.com/
  3. After testing, use the same versions page to manually migrate traffic from the previous version to the current version

further-generalize SendGrid.java

Kay's note on #98:

We are actually pretty close to making this class a very light-weight java API for sendgrid. It's kind of a separate project, but really what's missing is:

  • changing name of map back to blobMap
  • pass in a list of mime types instead of assuming image\png
  • remove hardcoded sender, and instead use SendGrid.Builder approach to create and configure instances

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.