From 193f8be2a30bc976d2c4212f918cbb9cc604d4b9 Mon Sep 17 00:00:00 2001 From: illusion Date: Sun, 11 Apr 2021 02:50:14 +0530 Subject: [PATCH] changed firLatency to 70 --- README.md | 22 +++++++++++++--------- lib/view/widgets/bottomsheet.dart | 4 +++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 019b326..2078b92 100644 --- a/README.md +++ b/README.md @@ -6,26 +6,30 @@ An app to check if you are dizzy or not, and further telling if you should drive ![Supports](https://img.shields.io/badge/Supports-Android-green) ## Techstack -* framework: [`flutter`](https://flutter.dev/) -* backend: [`firebase`](https://firebase.google.com/) + +- framework: [`flutter`](https://flutter.dev/) +- backend: [`firebase`](https://firebase.google.com/) ## Procedure -Simple, to check for dizzyness, just give the user a bunch of random directions to move their head into, __basically tracking the nose__, check the latency, if it exceeds a certain limit, **boom** you have **mr/mrs dizzy** right there. + +Simple, to check for dizzyness, just give the user a bunch of random directions to move their head into, **basically tracking the nose**, check the latency, if it exceeds a certain limit, **boom** you have **mr/mrs dizzy** right there. We can also check for mobile wobbling to give the user a warning without even giving the test. ## Inspiration / reasons / purpose etc idk -| Thing | Source| -|-------|-------| -| concept (kindof) | [netguru](https://dribbble.com/shots/11582376-Lime-Drunk-Test) | -| Deaths due to **drunken driving** | [article](https://www.sundayguardianlive.com/news/drunk-driving-led-38000-road-mishaps-three-years#:~:text=As%20per%20the%20ministry%27s%20data,are%20due%20to%20drunk%20driving.)| + +| Thing | Source | +| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| concept (kindof) | [netguru](https://dribbble.com/shots/11582376-Lime-Drunk-Test) | +| Deaths due to **drunken driving** | [article](https://www.sundayguardianlive.com/news/drunk-driving-led-38000-road-mishaps-three-years#:~:text=As%20per%20the%20ministry%27s%20data,are%20due%20to%20drunk%20driving.) | ## Little bit more + Alright, so there is no proof of concept, but I am kinda confident that this will work. Also, one more thing, tracking the `eyes` (more specifically, `iris`), would be better, much better than moving your head around. **BUT**, since the user is dizzy and/or drunk, it kinda doesn't matter. **But** (yes, a **but** over a **but**), if the user is not an individual rather a third party using this for checking the soberiety of second party, this might be an issue, for the second party of course. But the major reason I am not implementing this is because... I am unable to. Firebase ML Vision does not offer such service, web technologies like [`webgazer.js`](https://webgazer.cs.brown.edu/) need to be calibrated almost every time, hence are not so much practical for the end user. -*Also more research is needed for selecting the `optimal latency range` (1-60 ms imo).* +_Also more research is needed for selecting the `optimal latency range` (1-70 ms imo)._ This can help a lot in preventing accidents due to drunken driving. Moreover since `EVs` are going to takeover the market, vehicles can connect to the `mobile device` and help the user check if he/she is in a stable condition to drive or not. This is in no way or sense a **soberiety or drunk test**, maybe in the future depending on the accuracy of the model used (instead of firebase). -*Interested in implementing this somewhere? Let's chat! [`here`](https://dhruv-tiwari.netlify.app/)* +_Interested in implementing this somewhere? Let's chat! [`here`](https://dhruv-tiwari.netlify.app/)_ diff --git a/lib/view/widgets/bottomsheet.dart b/lib/view/widgets/bottomsheet.dart index 154a9c1..b4a66f0 100644 --- a/lib/view/widgets/bottomsheet.dart +++ b/lib/view/widgets/bottomsheet.dart @@ -8,6 +8,8 @@ import 'package:share/share.dart'; // Project imports: import '../../model/data.dart'; +const fitLatency = 70; + class ResultSheet extends StatelessWidget { const ResultSheet({ Key key, @@ -24,7 +26,7 @@ class ResultSheet extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - "${avg < 0 ? "Failed test, face went out of viewport one or more than one times." : "Here is your last latency: $avg ms."}\n\n${avg > 50 || avg < 0 ? "Sorry not fit to drive" : "Engine on! You are fit to drive."}", + "${avg < 0 ? "Failed test, face went out of viewport one or more than one times." : "Here is your last latency: $avg ms."}\n\n${avg > fitLatency || avg < 0 ? "Sorry not fit to drive" : "Engine on! You are fit to drive."}", style: TextStyle( fontSize: 22, fontWeight: FontWeight.w500,