FBP Go (Fire Behaviour Prediction on the Go)

Overview

FBP Go (Fire Behaviour Prediction on the Go)

Fire behavior prediction application

Preview latest PWA build on: https://sybrand.github.io/

Lifecycle:Maturing

Build for web

flutter build web --base-href /MyBaseFolder/

Build

Update pubspec.yaml with the the correct version number.

Build for Android

Maybe you want to update first?

I have my android studio install in ~/.local/android-studio - with a symlink in ~/.local/bin/studio.sh

studio.sh

then System Settings -> Updates -> Check now If it fails because it can't update java - exit - check for java processes and kill them

ps -A |grep jav
kill -9 PID
flutter upgrade

Update the build in: android/local.properties e.g.:

sdk.dir=/home/[username]]/Android/Sdk
flutter.sdk=/home/[username]/snap/flutter/common/flutter
flutter.buildMode=release
flutter.versionName=1.0.1
flutter.versionCode=3

Up the version in pubspec.yaml, then run

flutter pub get

NOTE: also had to up flutterVersionCode in android\app\build.gradle

Make sure you have a way to sign it! You need to have your upload-keystore.jks configured in android/key.properties

flutter build appbundle --release

Head over to the play store - https://play.google.com/console/developers

select app internal testing -> create new release -> upload relesases overview -> review it

Build for iOS - on M1 silicon

If you use the default ruby+gem setup that comes out of the box, you'll get errors about ffi not being x86_64 - you COULD fix that by running:

# don't do this
sudo arch -x86_64 gem install ffi

Who wants to run rosetta? That's nuts. Rather get the latest version of ruby and go from there. (It's no use trying to run gem update --system with the system ruby, it's just going to break things for you) This also solves having to run sudo with gem, everything neatly goes into .rbenv

rbenv install 3.1.0
rbenv global 3.1.0
gem update --system
gem install cocoapods

https://github.com/rbenv/rbenv

For rbenv you need to have the shim in your path.

PATH="/{home}/.rbenv/shims:$PATH

App store issues

You may receive an email warning: "ITMS-90078: Missing Push Notification Entitlement" from the app store. FBP Go doesn't use push notifications, it seems to be a side efffect of some flutter stuff. See: flutter/flutter#9984 ; this issue is unresolved at this point in time.

iOS development notes

open -a Simulator
open ios/Runner.xcworkspace

Deploy to app store

Make sure you've got the build number correct! Build number must be unique!

Product -> Archive (make sure you've seleted the correct target)

Code Conventions

  • Dart naming convention rules are often broken in order to conform with the CFFDRS R library. The R code has been manually translated, and in order to debug and stay up to date with changes, it's just easier if the code looks similar.

Todo

  • Change input values to match display (rounding on display, but not on input, can result in what appears to be inconsistent results). Different users are seeing the same input values, but in the backround they are different - as rounded values are being displayed.
  • Add FWI.
  • Grey out the curing slider for fuel types it doesn't apply to. (non-grass fuel types)
  • Add screenshots for iOS.
  • Localization - implement en-CA and fr-CA.
  • Coordinates - provide user feedback on location button. (e.g. fetching and failed state).
  • Add FMC option in advanced.
  • Advanced: Problem: pre-set can conflict with entered values. The moment. anything is changed, the pre-set should become un-set OR You need a "load preset" button - maybe that's better?
  • Advanced: Result columns - there are some "two line" columns. Would be nice if the result columns could size better.
  • FFMC scale at the bottom.
    • Possible, but nothing out of the box - so leaving it alone for now.
  • Finalise disclaimer popup.
  • Diurnal FFMC screen.
    • Add a screen where you can input yesterday's FFMC the RH and the Wind, to get the daily FFMC - see: ffmcCalc.
    • Add a screen where you you can see the impact of the diurnal FFMC (maybe sliding time?) - see: hffmc.
    • Work towards a screen where you can see the impact of changing FFMC on fire.
  • Do lots of re-factoring (code was written as p.o.c. in a big rush).
  • Persist last settings? (Except for lat/long - since that's a log of the persons location and we don't want to persist anything personal)
  • (pending p.o.) set the FFMC lower limit to 60?
  • Add reference content to the Nav - e.g. pictures of the fuel types (trees) a la red book - would be great for newer folks; Easy to do, but needs images that we have licenes for.
  • Request: group the data differently, especially in the advanced tab Work with EK to refine, general idea is to group info by: Head of Fire - Flank of Fire - ROS - CFB - … Back of Fire - ROS - CFB - … So folks can isolate and easily scan the info. They also find it too jumbled and tight and are worried they’ll grab the wrong numbers - Tess can help with that part (layout, sizing, spacing)
  • crowning in grass isn’t possible - is there a bug? (bug in original CFFDRS library - we'll have to fix in our copy)
  • User feedback/request: can we have pre-sets based on task? (Future idea) You open the app, say what you’re doing (prescribed burn, small fire, big fire/incident action plan, no fire just out and about - this is not the actual list) Prescribed burning: I don’t need all this info, reduce the list of data (maybe I can still personalize?) I wouldn’t care about the consumption of the flank in this case, and I better not be causing a crown fire
  • If I’m manually inputting lat/long how do I do -122? Am I dumb? Is lat/long factored into the calcs? I was following along with EK’s demo and I got slightly different numbers from him for CFB, HFI, ROS (many users also reported this) - I can sent you a screenshot of EK’s screen for cross reference
  • From testing session: users report difficulty with the sliders in terms of precision - hard to get the exact number they want. Sometimes this is ok, sometimes it’s very bad. Either way, it’s frustrating. Users pointed out that in the field their hands will be sweaty and dirty. Some folks realized they could turn their phone to landscape mode and it was a bit better. User-feature request: in addition to the sliders, can we have + and - buttons There may be other ways, UX can collaborate
  • I can’t make the number pad go away after modifying location (lat/long/elev) - I have to re-select my fuel type to make it go away, not evident & annoying (from testing session w users) - seems to not be an issue on Android

Log of changes & decisions.

v1.0.2:

  • Change keyboard type to all for negative numbers.
  • Prompting for location permissions if not already granted on iOS. (Android should already be working)
  • Wind + BUI sliders modified - users find it difficult to make small adjustments, resulting in inconsistent results.
  • Changed wind slider to increment in 1's. (was in 1/2's!)
  • Changed the BUI slider to increment in 5's. (was in 1's)
  • Added line break to Beaufort scale 1-5 description (text was going off screen on small phones).

v1.0.1:

  • Beaufort Scale now showing when selecting wind speed.
  • Increased slider width, reduced label width and put line break between label and value.
  • Added check for invalid latitude and longitude (was causing exception)
  • Advanced+Basic: Moved curing from 2nd to last, to last.
  • Advanced: Change PDF and PC to sliders.
  • Advanced+Basic: Prompting for location permissions if not already granted. (Implemented and test for Android, iOS testing outstanding.)
  • Changed icon for iOS.
  • Added crown fraction burned to basic screen.
  • More space on left hand side.
    • Added padding on the left and the right.
  • FFMC scale from 80+
    • Made the scale start at 80.
  • Fuel type picture.
    • Added fuel type pictures, but request for licensed images resulted in pictures being removed for now.
  • Coordinate affects FMC (it may not seem to for some part of the year), so we are keeping coordinates instead of using some default.
  • App name: decided to call it FBP Go.
  • Changed default flutter icon to fire emoji: 🔥
  • Colour of output text and background changes to match severity.
  • Reduced length of preset fire type names.
  • Added disclaimer popup with placeholder text.
  • Added about placeholder text.
Comments
  • New cert ios build

    New cert ios build

    • Bumps min ios version to 11; won't let me build otherwise, the flutter version requires this apparently
    • New app in test flight
    • Added README instructions based on issues encountered while using the updated cert and profile
    opened by conbrad 0
  • V1.0.8

    V1.0.8

    Summary:

    Improved validation on coordinate input, and resolved some crashes related to invalid values. Direction of spread was incorrectly showing the net effective wind direction.

    Detail:

    • [x] Web: About was crashing in web version.
    • [x] FBP: Direction of spread was incorrect (was showing net effective wind direction).
    • [x] FBP: Limit altitude : 0 to 3000 (negative values are possible in WGS84, but not valid for calculations)
    • [x] FBP: Altitude should specify that it's meters.
    • [x] FBP: Coordinate latitude was accidentally being saved as altitude. Could cause crash on app if latitude was negative.
    • [x] FBP: Latitude, Longitude & Elevation validation implemented.
    • [x] FBP: Handling conditions where prediction could not be calculated. Instead of user getting a gray screen, user should now be able to adjust input conditions to resolve the issue.
    • [x] Added some semantics for accessibility.
    opened by Sybrand 0
  • V1.0.7

    V1.0.7

    Summary:

    BUI no longer changing when fuel type changes. PDF slider no longer showing for M1/M2. 2 decimal places for fuel consumption. Slope limited to 60%. GFL changed to slider (resolves various bugs relating to text input), and no longer storing user value.

    Detail:

    • [x] Re-factor - removing "basic" screen code from app (just commented out for now, in case we want to bring it back in).
    • [x] FBP: Switch grass fuel load to slider. (0.1 minimum, 1.00 maximum).
    • [x] FBP: Reset grass to default on fuel type change, no longer storing GFL.
    • [x] FBP: FFMC lower limit kept at 80 (values lower than 80 not deemed relevant).
    • [x] FBP: Hide CFB and CFC when using grass fuel type.
    • [x] FBP: The percent dead fir slider showing in M1/2, it should only be showing in M3/4.
    • [x] FBP: When switching between fuel types it remembers all settings, but resets BUI to a baseline value
    • [x] FBP: Change fuel consumption to show 2 decimal places (otherwise shows as 0 for grass).
    • [x] FBP: Limit slope to 60%
    opened by Sybrand 0
  • v1.0.5

    v1.0.5

    • [x] FBP: Removed basic screen.
    • [x] FBP: Change "Basic Fire Behaviour Outputs" to match values from Basic, moving all other values to the Advanced group.
    • [x] FBP: Changed headings to "Basic Fire Behaviour Outputs" and "Advanced Fire Behaviour Outputs".
    • [x] FBP: Only showing GFL and curing for OA1 and O1B.
    • [x] FBP: Persist last settings. (excluding PC and PDF)
    • [x] FBP: No longer automatically loading your location on start.
    • [x] FBP: More spacing between each result, and space between heading and 1st result.
    • [x] FBP: A bit more space between the last input item and the results. (e.g. space between curing and primary heading is different.)
    • [x] FBP: Only showing PDF and PC sliders for M1, M2, M3 and M4.
    • [x] FBP: Added unit of measure (m) to fire spread distance.
    • [x] FBP: Drop acronyms, except where there is limited space.
    • [x] FBP: Plus/minus buttons for sliders.
    • [x] FBP: Tried out FontWeight.normal on unit of measure, but it didn't look good. Reverted back to using same font weight as the value.
    • [x] Disclaimer: Changed text from "No warrant or guarantee..." to "No warranty or guarantee...".
    • [x] Disclaimer: Fix bug where user could click away disclaimer without clicking on "OK".
    • [x] Tech: Upgrade to flutter 3.0.0.
    opened by Sybrand 0
  • V1.0.4

    V1.0.4

    • [x] Basic+Advanced: Left align headings.
    • [x] Basic+Advanced: Added flame length.
    • [x] Basic+Advanced: White text over red.
    • [x] Basic+Advanced: Switched to new proposed colour scheme.
    • [x] Basic: "Fire Behaviour Outputs" in Basic heading.
    • [x] Basic: Style sliders to match color of results.
    • [x] Basic: Adjust font size, shorten description & styling of result.
    • [x] Advanced: Match styling applied to basic.
    • [x] Advanced: Remove fuel type dropdown (was problematic when combined with preset selection), remove Crown fuel load as input (show as output), remove crown base height (show as output).
    • [x] About: Add a link to our repository, switch license to small monospace font, fix version mentioned.
    • [x] Basic+Advanced: Change "Crowning" to "Continuous Crowning".
    • [x] Basic+Advanced: Changed fire intensity colour palette.
    • [x] Tech: Automated testing in github workflow.
    • [x] Tech: Automated build (web + iOS) in github workflow.
    • [x] Basic+Advanced: 60 minute fire size change from 0 to 1 decimal places.
    • [x] Basic+Advanced: Modified elevation input keyboard type to match Lat/Long (we don't need decimal or sign, but that's the only way to get the apple keyboard to behave).
    • [x] Basic+Advanced: Rounding more inputs to 2 decimal places (or 0) for more consistent results.
    • [x] Basic+Advanced: Fix bug where negative elevation value could be entered and cause a crash.
    • [x] Disclaimer: Fixed spelling.
    opened by Sybrand 0
  • V1.0.3

    V1.0.3

    • Rounding values from sliders. (e.g. in the background, wind speed would be 29.999999999, but display as 30. Comparing different devices, side by side, it appears as if the results for the same inputs differ.)
    • Crowning was incorrectly reported in grass/slash. Changed cfl from 1 to 0 for grass and slash fuel types.
    • Changed order, styling & layout of Basic output
    opened by Sybrand 0
  •  The next version... v1.0.2

    The next version... v1.0.2

    V1.0.2

    • [x] Change keyboard type to all for negative numbers.
    • [x] Prompting for location permissions if not already granted on iOS. (Android should already be working)
    • [x] Changed wind slider to increment in 1's. (was in 1/2's!)
    • [x] Changed the BUI slider to increment in 5's. (was in 1's)
    • [x] Added line break to Beaufort scale 1-5 description (text was going off screen on small phones).
    opened by Sybrand 0
  • Add project lifecycle badge

    Add project lifecycle badge

    No Project Lifecycle Badge found in your readme!

    Hello! I scanned your readme and could not find a project lifecycle badge. A project lifecycle badge will provide contributors to your project as well as other stakeholders (platform services, executive) insight into the lifecycle of your repository.

    What is a Project Lifecycle Badge?

    It is a simple image that neatly describes your project's stage in its lifecycle. More information can be found in the project lifecycle badges documentation.

    What do I need to do?

    I suggest you make a PR into your README.md and add a project lifecycle badge near the top where it is easy for your users to pick it up :). Once it is merged feel free to close this issue. I will not open up a new one :)

    opened by repo-mountie[bot] 0
  • Tinkering on the sly

    Tinkering on the sly

    • Changed iOS icons.
    • Advanced: Removed "advanced" dropdown. Always show all options when on advanced screen.
    • Advanced+Basic: Changed PDF and PC to sliders.
    • Advanced+Basic: Beaufort scale now showing when changing wind speed.
    • Advanced+Basic: Increased slider width, reduced label width and put line break between label and value.
    • Advanced+Basic: Added check for invalid latitude and longitude (was causing exception)
    • Advanced+Basic: Moved curing from 2nd to last, to last.
    • Advanced+Basic: Prompting for location permissions if not already granted. (Implemented and test for Android, iOS testing outstanding.)
    opened by Sybrand 0
  • Add missing topics

    Add missing topics

    TL;DR

    Topics greatly improve the discoverability of repos; please add the short code from the table below to the topics of your repo so that ministries can use GitHub's search to find out what repos belong to them and other visitors can find useful content (and reuse it!).

    Why Topic

    In short order we'll add our 800th repo. This large number clearly demonstrates the success of using GitHub and our Open Source initiative. This huge success means it's critical that we work to make our content as discoverable as possible. Through discoverability, we promote code reuse across a large decentralized organization like the Government of British Columbia as well as allow ministries to find the repos they own.

    What to do

    Below is a table of abbreviation a.k.a short codes for each ministry; they're the ones used in all @gov.bc.ca email addresses. Please add the short codes of the ministry or organization that "owns" this repo as a topic.

    add a topic

    That's it, you're done!!!

    How to use

    Once topics are added, you can use them in GitHub's search. For example, enter something like org:bcgov topic:citz to find all the repos that belong to Citizens' Services. You can refine this search by adding key words specific to a subject you're interested in. To learn more about searching through repos check out GitHub's doc on searching.

    Pro Tip 🤓

    • If your org is not in the list below, or the table contains errors, please create an issue here.

    • While you're doing this, add additional topics that would help someone searching for "something". These can be the language used javascript or R; something like opendata or data for data only repos; or any other key words that are useful.

    • Add a meaningful description to your repo. This is hugely valuable to people looking through our repositories.

    • If your application is live, add the production URL.

    Ministry Short Codes

    | Short Code | Organization Name | | :--------- | :------------ | | AEST | Advanced Education, Skills & Training | | AGRI | Agriculture | | ALC | Agriculture Land Commission | | AG | Attorney General | | MCF | Children & Family Development | | CITZ | Citizens' Services | | DBC | Destination BC | | EMBC | Emergency Management BC | | EAO | Environmental Assessment Office | | EDUC | Education | | EMPR | Energy, Mines & Petroleum Resources | | ENV | Environment & Climate Change Strategy | | FIN | Finance | | FLNR | Forests, Lands, Natural Resource Operations & Rural Development | | HLTH | Health | | IRR | Indigenous Relations & Reconciliation | | JEDC | Jobs, Economic Development & Competitiveness | | LBR | Labour Policy & Legislation | | LDB | BC Liquor Distribution Branch | | MMHA | Mental Health & Addictions | | MAH | Municipal Affairs & Housing | | BCPC | Pension Corporation | | PSA | Public Service Agency | | PSSG | Public Safety and Solicitor General | | SDPR | Social Development & Poverty Reduction | | TCA | Tourism, Arts & Culture | | TRAN | Transportation & Infrastructure |

    NOTE See an error or omission? Please create an issue here to get it remedied.

    opened by repo-mountie[bot] 0
  • Lets use common phrasing

    Lets use common phrasing

    TL;DR 🏎️

    Teams are encouraged to favour modern inclusive phrasing both in their communication as well as in any source checked into their repositories. You'll find a table at the end of this text with preferred phrasing to socialize with your team.

    Words Matter

    We're aligning our development community to favour inclusive phrasing for common technical expressions. There is a table below that outlines the phrases that are being retired along with the preferred alternatives.

    During your team scrum, technical meetings, documentation, the code you write, etc. use the inclusive phrasing from the table below. That's it - it really is that easy.

    For the curious mind, the Public Service Agency (PSA) has published a guide describing how Words Matter in our daily communication. Its an insightful read and a good reminder to be curious and open minded.

    What about the master branch?

    The word "master" is not inherently bad or non-inclusive. For example people get a masters degree; become a master of their craft; or master a skill. It's generally when the word "master" is used along side the word "slave" that it becomes non-inclusive.

    Some teams choose to use the word main for the default branch of a repo as opposed to the more commonly used master branch. While it's not required or recommended, your team is empowered to do what works for them. If you do rename the master branch consider using main so that we have consistency among the repos within our organization.

    Preferred Phrasing

    | Non-Inclusive | | Inclusive | | :------------- |:--:| :-------- | | Whitelist | => | Allowlist | | Blacklist | => | Denylist | | Master / Slave | => | Leader / Follower; Primary / Standby; etc | | Grandfathered | => | Legacy status | | Sanity check | => | Quick check; Confidence check; etc | | Dummy value | => | Placeholder value; Sample value; etc |

    Pro Tip 🤓

    This list is not comprehensive. If you're aware of other outdated nomenclature please create an issue (PR preferred) with your suggestion.

    opened by repo-mountie[bot] 0
  • It's Been a While Since This Repository has Been Updated

    It's Been a While Since This Repository has Been Updated

    This issue is a kind reminder that your repository has been inactive for 181 days. Some repositories are maintained in accordance with business requirements that infrequently change thus appearing inactive, and some repositories are inactive because they are unmaintained.

    To help differentiate products that are unmaintained from products that do not require frequent maintenance, repomountie will open an issue whenever a repository has not been updated in 180 days.

    • If this product is being actively maintained, please close this issue.
    • If this repository isn't being actively maintained anymore, please archive this repository. Also, for bonus points, please add a dormant or retired life cycle badge.

    Thank you for your help ensuring effective governance of our open-source ecosystem!

    opened by repo-mountie[bot] 0
Owner
Province of British Columbia
Where Ideas Work
Province of British Columbia
A dart timer that can be configured to fire once or repeatedly with ability start, stop, resume and cancel.

A timer that can be configured to fire once or repeatedly with ability start, stop, resume and cancel. Getting started Add CompleteTimer to your pubsp

MohammadAminZamani.afshar 3 Jul 20, 2022
Automatically generate profile picture with random first name and background color. But you can still provide pictures if you have them. As the default color, based on the name of the first letter. :fire: :fire: :fire:

FLUTTER PROFILE PICTURE Automatically generate profile picture with random first name and background color. But you can still provide pictures if you

Aditya Dharmawan Saputra 10 Dec 20, 2022
Flutter Gender Prediction App Flutter Gender Prediction App

gender_predictor A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Pawan Kumar 30 May 31, 2022
:fire:GeoFlutterFire:fire: is an open-source library that allows you to store and query firestore documents based on their geographic location.

GeoFlutterFire ?? GeoFlutterFire is an open-source library that allows you to store and query a set of keys based on their geographic location. At its

Darshan N 282 Dec 11, 2022
A API integrated 5 day weather forecast and prediction application created using flutter framework and Dart language.

A API integrated 5 day weather forecast and prediction application created using flutter framework and Dart language. This API used here is OPEN WEATHER API, which specializes in predicting the weather of any city in this world.

Nitin Verma 0 Dec 26, 2021
A dart timer that can be configured to fire once or repeatedly with ability start, stop, resume and cancel.

A timer that can be configured to fire once or repeatedly with ability start, stop, resume and cancel. Getting started Add CompleteTimer to your pubsp

MohammadAminZamani.afshar 3 Jul 20, 2022