Skip to content

Commit

Permalink
changed firLatency to 70
Browse files Browse the repository at this point in the history
  • Loading branch information
Illusion47586 committed Apr 10, 2021
1 parent 887d831 commit 193f8be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)_
4 changes: 3 additions & 1 deletion lib/view/widgets/bottomsheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 193f8be

Please sign in to comment.