Skip to the content.

🔥 FBP Go (Fire Behaviour Prediction on the Go)

Fire behaviour prediction application

Preview latest PWA build on: https://psu.nrs.gov.bc.ca/fbp-go

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

Confirm that the targetSdkVersion is correct.

./gradlew printTargetSdkVersion

The default targetSdkVersion is configured in the flutter code base but can be overidden in ./android/local.properties by adding:

flutter.targetSdkVersion={target_version}

NOTE: You may need to update the distributionUrl in gradle-wrapper.properties to match you Java versions as per https://docs.gradle.org/current/userguide/compatibility.html.

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 releases overview -> review it

Github Workflow

iOS development notes

You can view/test the app in a simulator by running the following

open -a Simulator
open ios/Runner.xcworkspace

Note: Once the simulator is open and before opening the xcworkspace in Xcode, you can also use the VSCode flutter extension to run the app in debug or release mode with hot reloading. This also works for Android simulators

Build for iOS - on M1 silicon

Navigate to fbp-go/ios and run

pod install

If the app is built with flutter build ios or within Xcode, you may see a warning when validating the app:

Uploads Symbols Failed: The archive did not include a dSYM for the Flutter.framework

This is seemingly a new warning in xcode 16 and it’s possibly updating flutter would solve the issue in the future.

To solve this, the easiest method is to build the ios release with flutter:

flutter build ipa

This will create an ipa file that can easily be validated and uploaded to the App Store/Testflight using Apple Transporter. Creating an ipa file with flutter build tools seems to include the dSYM files, whereas other methods may not at this time.

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: https://github.com/flutter/flutter/issues/9984 ; this issue is unresolved at this point in time.

Deploy to app store

Make sure you’ve got the build number correct! Build number must be unique! This can be validated in the below step:

Either follow the method above using Apple Transporter or follow the process below:

  1. Product -> Archive
  2. Open the “Organizer” window, Window -> Organizer
  3. Select your archived build and click “Validate App” and follow the steps.
  4. If it successfully validates, you can then click “Distribute App” in organize, otherwise fix the validation errors and re-archive.

Updating signing cert and profile

  1. When you receive the new cert/profile and credentials, follow the steps here to install: https://github.com/bcgov/mobile-signing-service/wiki/Apple-App-Signing#for-teams—steps-to-setup-your-xcode-for-local-application-signing
  2. You may see an error after the Signing Certificate label, to fix this edit the CODE_SIGN_IDENTITY and PROVISIONING_PROFILE_SPECIFIER in project.pbxproj to be set to the new cert and profile names.

Code Conventions

Todo

Care should be exercised not to apply the system beyond its useful range. FBP Go/ FBP System can be used to make predictions for a fire spreading during one burning period from a point or line source of fire with the following assumptions: • Fuel conditions are representative one of the 18 benchmark fuel types. • The Fire Weather Index (FWI) values used are representative of the site conditions. • Fuels are uniform and continuous; topography is homogenous. and the wind is constant and one direction during the prediction period. • The fire is wind or wind/slope driven, and spread is not affected by a convection column. • Wind is measured in the open and is corrected to 10 m. • The rate of fire spread levels off at high wind speed and initial spread index (ISI) values. • The fire is unaffected by suppression activities (free burning). • The effect of short-range spotting of firebrands on spread is considered. • A fire starting from a point source will have an elliptical shape under the above conditions.

The FBP System is based on observations of experimental fires and wildfires. There are very few records of sustained fire spread with wind speeds above 60 km and/or ISI > 70. Thus, the largest ROS values in this App roughly correspond to the upper limit of observed spread rates in each fuel type. Higher ROS values may occur with higher wind speeds and during gusts. “

Log of changes & decisions

v1.1.0 (next phase)

v1.0.13 (future)

v1.0.12 (current)

v1.0.11

v1.0.10

v1.0.9

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:

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:

v1.0.6 Release Candidate

v1.0.5 Release Candidate

Summary:

Detail:

v1.0.4

v1.0.3

v1.0.2

v1.0.1