@wfmrda-fmsf/angular-ui
v0.1.7
Published
Angular Components to work with the Fire Modeling Services Framework
Downloads
12
Readme
Fire Modeling Services Framework
This library is under construction and should NOT be used unless instructed
Test component
This component tests the concept of building Angular components for use in Angular applications
Overview
<fmsf-app-calculator>
is a demo basic calculator to demonstrate how Angular components will be built
Demo
Component.html
<fmsf-station-picker [(stationData)]="stationData" [latitude]="latitude" [longitude]="longitude"></fmsf-station-picker>
<fmsf-erc-class [stationId]="stationData.station_id" [(ercClass)]="ercPercentiles" [expanded]="expanded"></fmsf-erc-class>
Component.ts
import { StationData, ErcClassData } from '@wfmrda-fmsf/angular-ui/core';
...
const stationDefaults: StationData = {
station_id: 20107,
station_name: 'LOGAN',
latitude: 36.3530556,
longitude: -113.199167,
station_type: 4,
fcst_zone: '301',
avg_annual_precip: 17,
humidity_code: 2,
elevation: 7605,
aspect: '0',
site: 3,
reg_scheduled_observation_time: 13,
slope_class: '',
grass_type: '',
};
const ercPercentilesDefaults: ErcClassData = {
start_month_day: '01/01',
end_month_day: '12/31',
start_year: 2013,
end_year: 2023,
start_hour: '13',
end_hour: '13',
fuel_model: 'Z',
erc_class: [
{
percentile: '97',
one_hr_tl_fuel_moisture: 5,
ten_hr_tl_fuel_moisture: 11,
hun_hr_tl_fuel_moisture: 19,
energy_release_component: 22,
herbaceous_lfi_fuel_moisture: 30,
woody_lfi_fuel_moisture: 60,
burn_period: 360,
spotting_probability: 0.15,
delay: 0,
},
{
percentile: '95',
one_hr_tl_fuel_moisture: 8,
ten_hr_tl_fuel_moisture: 11,
hun_hr_tl_fuel_moisture: 19,
energy_release_component: 22,
herbaceous_lfi_fuel_moisture: 30,
woody_lfi_fuel_moisture: 60,
burn_period: 300,
spotting_probability: 0.1,
delay: 3,
},
{
percentile: '80',
one_hr_tl_fuel_moisture: 5,
ten_hr_tl_fuel_moisture: 11,
hun_hr_tl_fuel_moisture: 19,
energy_release_component: 22,
herbaceous_lfi_fuel_moisture: 30,
woody_lfi_fuel_moisture: 60,
burn_period: 240,
spotting_probability: 0.05,
delay: 0,
},
{
percentile: '70',
one_hr_tl_fuel_moisture: 5,
ten_hr_tl_fuel_moisture: 11,
hun_hr_tl_fuel_moisture: 19,
energy_release_component: 22,
herbaceous_lfi_fuel_moisture: 30,
woody_lfi_fuel_moisture: 60,
burn_period: 180,
spotting_probability: 0.01,
delay: 0,
},
{
percentile: '60',
one_hr_tl_fuel_moisture: 8,
ten_hr_tl_fuel_moisture: 13,
hun_hr_tl_fuel_moisture: 19,
energy_release_component: 0,
herbaceous_lfi_fuel_moisture: 157,
woody_lfi_fuel_moisture: 141,
burn_period: 120,
spotting_probability: 0,
delay: 0,
},
],
};
...
export class DashboardComponent implements OnInit {
stationData: StationData = stationDefaults;
ercPercentiles?: ErcClassData = ercPercentilesDefaults;
longitude: number = -112.20290843602699;
latitude: number = 36.50550844957497;
expanded: boolean = false;
...
API
Properties
@Input() title:
string
@Output() update:
EventEmitter<any>
Methods
allClear - Return
void()