Skip to content

Commit

Permalink
changed the science analysis page for correct extants (#108)
Browse files Browse the repository at this point in the history
Co-authored-by: Levi Lesches <[email protected]>
  • Loading branch information
aidanahram and Levi-Lesches authored Jun 1, 2023
1 parent 6247b4a commit 08b05b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions lib/src/data/science.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,13 @@ ScienceResult pHTest(SampleData data) => (data.average! > 3 && data.average! < 1
? ScienceResult.extant : ScienceResult.notPresent;

/// The test to determine the presence of life based on CO2 data.
ScienceResult co2Test(SampleData data) => (data.max! > 409.9)
/// The max has to be greater than 10% greater than min for life to exist
ScienceResult co2Test(SampleData data) => (data.max! >= (data.min! * 1.1))
? ScienceResult.extant : ScienceResult.notPresent;

/// The test to determine the presence of life based on methane data.
ScienceResult methaneTest(SampleData data) => (data.max! > 0)
/// The max has to be greater than 1
ScienceResult methaneTest(SampleData data) => (data.min! > 1)
? ScienceResult.extant : ScienceResult.notPresent;

/// The temperature sensor.
Expand All @@ -143,13 +145,13 @@ const pH = ScienceSensor(
const co2 = ScienceSensor(
name: "CO2",
test: co2Test,
testDescription: "CO2 above 409.8: Extant",
testDescription: "Max CO2 greater than 10% of Min CO2: Extant",
);
/// The methane sensor.
const methane = ScienceSensor(
name: "Methane",
test: methaneTest,
testDescription: "Any methane: Extant",
testDescription: "Methane above 1: Extant",
);
/// A list of all the sensors on the Science subsystem.
const sensors = [temperature, humidity, pH, co2, methane];
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: rover_dashboard
description: Graphical application for remotely operating the rover.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 2023.5.31+1
version: 2023.5.31+2

environment:
sdk: "^3.0.0"
Expand Down Expand Up @@ -63,7 +63,7 @@ flutter_launcher_icons:
# Builds a Windows .msix App Installer file for the Dashboard.
# Run: flutter pub run msix:create
msix_config:
msix_version: 2023.5.31.1
msix_version: 2023.5.31.2
display_name: Dashboard
publisher_display_name: Binghamton University Rover Team
identity_name: edu.binghamton.rover
Expand Down

0 comments on commit 08b05b8

Please sign in to comment.