flight 0.0.23 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -76,3 +76,7 @@ Brighter Planet vigorously encourages collaborative improvement of its emitter l
76
76
  1. Review changes for scientific accuracy.
77
77
  1. Merge changes to master repository and publish.
78
78
  1. Direct production environment to use new emitter version.
79
+
80
+ ## Copyright
81
+
82
+ Copyright © 2010 Brighter Planet. See LICENSE for details. Contact Brighter Planet for dual-license arrangements.
@@ -14,4 +14,4 @@ Description goes here.
14
14
 
15
15
  == Copyright
16
16
 
17
- Copyright (c) 2010 Andy Rossmeissl. See LICENSE for details.
17
+ Copyright © 2010 Brighter Planet. See LICENSE for details. Contact Brighter Planet for dual-license arrangements.
@@ -1,53 +1,131 @@
1
1
  Feature: Flight Committee Calculations
2
2
  The flight model should generate correct committee calculations
3
3
 
4
- Scenario: Cohort committee from t100 with usable characteristics
4
+ Scenario: Date committee from timeframe
5
5
  Given a flight emitter
6
+ And a characteristic "timeframe" of "2010-07-15/2010-07-20"
7
+ When the "date" committee is calculated
8
+ Then the conclusion of the committee should be "2010-07-15"
9
+
10
+ Scenario: Segments per trip committee from default
11
+ Given a flight emitter
12
+ When the "segments_per_trip" committee is calculated
13
+ Then the conclusion of the committee should be "1.67"
14
+
15
+ Scenario: Cohort committee for a direct flight from origin
16
+ Given a flight emitter
17
+ And a characteristic "segments_per_trip" of "1"
6
18
  And a characteristic "origin_airport.iata_code" of "AIA"
7
19
  When the "cohort" committee is calculated
20
+ Then the conclusion of the committee should have a record with "count" equal to "4"
21
+
22
+ Scenario: Cohort committee for a direct flight from destination
23
+ Given a flight emitter
24
+ And a characteristic "segments_per_trip" of "1"
25
+ And a characteristic "destination_airport.iata_code" of "WEA"
26
+ When the "cohort" committee is calculated
27
+ Then the conclusion of the committee should have a record with "count" equal to "5"
28
+
29
+ Scenario: Cohort committee for a direct flight from aircraft
30
+ Given a flight emitter
31
+ And a characteristic "segments_per_trip" of "1"
32
+ And a characteristic "aircraft.icao_code" of "FM1"
33
+ When the "cohort" committee is calculated
34
+ Then the conclusion of the committee should have a record with "count" equal to "1"
35
+
36
+ Scenario: Cohort committee for a direct flight from airline
37
+ Given a flight emitter
38
+ And a characteristic "segments_per_trip" of "1"
39
+ And a characteristic "airline.iata_code" of "IA"
40
+ When the "cohort" committee is calculated
8
41
  Then the conclusion of the committee should have a record with "count" equal to "2"
9
42
 
10
- Scenario: Cohort committee from t100 with no usable characteristics
43
+ Scenario: Cohort committee for an indirect flight with usable characteristics
44
+ Given a flight emitter
45
+ And a characteristic "segments_per_trip" of "2"
46
+ And a characteristic "origin_airport.iata_code" of "AIA"
47
+ When the "cohort" committee is calculated
48
+ Then the conclusion of the committee should be nil
49
+
50
+ Scenario: Cohort committee for a direct flight with origin that exists but is not in t100
11
51
  Given a flight emitter
52
+ And a characteristic "segments_per_trip" of "1"
12
53
  And a characteristic "origin_airport.iata_code" of "XXX"
13
54
  When the "cohort" committee is calculated
14
55
  Then the conclusion of the committee should be nil
15
56
 
16
- Scenario Outline: Date committee from timeframe
57
+ Scenario: Cohort committee for a direct flight with destination that exists but is not in t100
17
58
  Given a flight emitter
18
- And a characteristic "timeframe" of "<timeframe>"
19
- When the "date" committee is calculated
20
- Then the committee should have used quorum "from timeframe"
21
- And the conclusion of the committee should be "<date>"
22
- Examples:
23
- | timeframe | date |
24
- | 2010-07-15/2010-07-20 | 2010-07-15 |
59
+ And a characteristic "segments_per_trip" of "1"
60
+ And a characteristic "destination_airport.iata_code" of "ADA"
61
+ When the "cohort" committee is calculated
62
+ Then the conclusion of the committee should be nil
25
63
 
26
- Scenario: Date committee from nil timeframe
64
+ Scenario: Cohort committee for a direct flight with aircraft that exists but is not in t100
27
65
  Given a flight emitter
28
- And a characteristic "timeframe" of ""
29
- When the "date" committee is calculated
66
+ And a characteristic "segments_per_trip" of "1"
67
+ And a characteristic "aircraft.icao_code" of "XX3"
68
+ When the "cohort" committee is calculated
30
69
  Then the conclusion of the committee should be nil
31
70
 
32
- Scenario Outline: Date committee from creation date
71
+ Scenario: Cohort committee for a direct flight with airline that exists but is not in t100
33
72
  Given a flight emitter
34
- And a characteristic "creation_date" of "<creation_date>"
35
- When the "date" committee is calculated
36
- Then the committee should have used quorum "from creation date"
37
- And the conclusion of the committee should be "<date>"
38
- Examples:
39
- | creation_date | date |
40
- | 2010-07-15 | 2010-07-15 |
73
+ And a characteristic "segments_per_trip" of "1"
74
+ And a characteristic "airline.iata_code" of "XX"
75
+ When the "cohort" committee is calculated
76
+ Then the conclusion of the committee should be nil
77
+
78
+ Scenario: Cohort committee for a direct flight with origin and destination that do not match
79
+ Given a flight emitter
80
+ And a characteristic "segments_per_trip" of "1"
81
+ And a characteristic "origin_airport.iata_code" of "ADA"
82
+ And a characteristic "destination_airport.iata_code" of "WEA"
83
+ When the "cohort" committee is calculated
84
+ Then the conclusion of the committee should have a record with "count" equal to "1"
85
+
86
+ Scenario: Cohort committee for a direct flight with origin that exists but is not in t100 and destination in t100
87
+ Given a flight emitter
88
+ And a characteristic "segments_per_trip" of "1"
89
+ And a characteristic "origin_airport.iata_code" of "XXX"
90
+ And a characteristic "destination_airport.iata_code" of "AIA"
91
+ When the "cohort" committee is calculated
92
+ Then the conclusion of the committee should be nil
93
+
94
+ Scenario: Cohort committee for a direct flight with origin in t100, destination that exists but is not in t100, and airline that matches origin
95
+ Given a flight emitter
96
+ And a characteristic "segments_per_trip" of "1"
97
+ And a characteristic "origin_airport.iata_code" of "AIA"
98
+ And a characteristic "destination_airport.iata_code" of "XXX"
99
+ And a characteristic "airline.iata_code" of "IA"
100
+ When the "cohort" committee is calculated
101
+ Then the conclusion of the committee should have a record with "count" equal to "4"
102
+
103
+ Scenario: Country committee from origin and destination
104
+ Given a flight emitter
105
+ And a characteristic "origin_airport.iata_code" of "ADA"
106
+ And a characteristic "destination_airport.iata_code" of "AIA"
107
+ When the "country" committee is calculated
108
+ Then the conclusion of the committee should have "iso_3166_code" of "US"
109
+
110
+ Scenario: Country committee from origin only
111
+ Given a flight emitter
112
+ And a characteristic "origin_airport.iata_code" of "ADA"
113
+ When the "country" committee is calculated
114
+ Then the conclusion of the committee should be nil
115
+
116
+ Scenario: Country committee for international flight
117
+ Given a flight emitter
118
+ And a characteristic "origin_airport.iata_code" of "ADA"
119
+ And a characteristic "destination_airport.iata_code" of "WEA"
120
+ When the "country" committee is calculated
121
+ Then the conclusion of the committee should be nil
41
122
 
42
- Scenario Outline: Seat class multiplier committee from seat class
123
+ Scenario: Seat class multiplier committee from seat class
43
124
  Given a flight emitter
44
- And a characteristic "seat_class.name" of "<seat_class>"
125
+ And a characteristic "seat_class.name" of "economy"
45
126
  When the "seat_class_multiplier" committee is calculated
46
127
  Then the committee should have used quorum "from seat class"
47
- And the conclusion of the committee should be "<multiplier>"
48
- Examples:
49
- | seat_class | multiplier |
50
- | economy | 1.00 |
128
+ And the conclusion of the committee should be "0.9"
51
129
 
52
130
  Scenario: Seat class multiplier committee from default
53
131
  Given a flight emitter
@@ -55,13 +133,14 @@ Feature: Flight Committee Calculations
55
133
  Then the committee should have used quorum "default"
56
134
  And the conclusion of the committee should be "1.0"
57
135
 
58
- Scenario: Trips committee
136
+ Scenario: Trips committee from default
59
137
  Given a flight emitter
60
138
  When the "trips" committee is calculated
61
139
  Then the conclusion of the committee should be "1.941"
62
140
 
63
141
  Scenario Outline: Freight share committee from cohort
64
142
  Given a flight emitter
143
+ And a characteristic "segments_per_trip" of "1"
65
144
  And a characteristic "origin_airport.iata_code" of "<origin>"
66
145
  When the "cohort" committee is calculated
67
146
  And the "freight_share" committee is calculated
@@ -76,94 +155,11 @@ Feature: Flight Committee Calculations
76
155
  Given a flight emitter
77
156
  When the "freight_share" committee is calculated
78
157
  Then the committee should have used quorum "default"
79
- And the conclusion of the committee should be "0.07065"
80
-
81
- Scenario: Fuel type committee from default
82
- Given a flight emitter
83
- When the "fuel_type" committee is calculated
84
- Then the conclusion of the committee should have a record with "emission_factor" equal to "2.52714"
85
-
86
- Scenario: Emission factor committee
87
- Given a flight emitter
88
- When the "fuel_type" committee is calculated
89
- And the "emission_factor" committee is calculated
90
- Then the conclusion of the committee should be "3.1293"
91
-
92
- Scenario: Radiative forcing index committee
93
- Given a flight emitter
94
- When the "fuel_type" committee is calculated
95
- And the "radiative_forcing_index" committee is calculated
96
- Then the conclusion of the committee should be "2"
97
-
98
- Scenario: Emplanements per trip committee from default
99
- Given a flight emitter
100
- When the "emplanements_per_trip" committee is calculated
101
- Then the conclusion of the committee should be "1.67"
102
-
103
- Scenario Outline: Distance committee from airports
104
- Given a flight emitter
105
- And a characteristic "origin_airport.iata_code" of "<origin>"
106
- And a characteristic "destination_airport.iata_code" of "<destination>"
107
- When the "distance" committee is calculated
108
- Then the committee should have used quorum "from airports"
109
- And the conclusion of the committee should be "<distance>"
110
- Examples:
111
- | origin | destination | distance |
112
- | ADA | AIA | 100.0 |
113
- | AIA | WEA | 1000.0 |
114
-
115
- Scenario Outline: Distance committee from distance estimate
116
- Given a flight emitter
117
- And a characteristic "distance_estimate" of "<distance_estimate>"
118
- When the "distance" committee is calculated
119
- Then the committee should have used quorum "from distance estimate"
120
- And the conclusion of the committee should be "<distance>"
121
- Examples:
122
- | distance_estimate | distance |
123
- | 185.2 | 100.0 |
124
-
125
- Scenario Outline: Distance committee from distance class
126
- Given a flight emitter
127
- And a characteristic "distance_class.name" of "<distance_class>"
128
- When the "distance" committee is calculated
129
- Then the committee should have used quorum "from distance class"
130
- And the conclusion of the committee should be "<distance>"
131
- Examples:
132
- | distance_class | distance |
133
- | petite | 100.0 |
134
-
135
- Scenario Outline: Distance committee from cohort
136
- Given a flight emitter
137
- And a characteristic "airline.iata_code" of "<airline>"
138
- When the "cohort" committee is calculated
139
- And the "distance" committee is calculated
140
- Then the committee should have used quorum "from cohort"
141
- And the conclusion of the committee should be "<distance>"
142
- Examples:
143
- | airline | distance |
144
- | DA | 99.89200 |
145
- | IA | 1000.0 |
146
-
147
- Scenario: Distance committee from default
148
- Given a flight emitter
149
- When the "distance" committee is calculated
150
- Then the committee should have used quorum "default"
151
- And the conclusion of the committee should be "1121.73083"
152
-
153
- Scenario Outline: Adjusted distance committee
154
- Given a flight emitter
155
- And a characteristic "distance_estimate" of "<distance_estimate>"
156
- When the "distance" committee is calculated
157
- And the "emplanements_per_trip" committee is calculated
158
- And the "adjusted_distance" committee is calculated
159
- Then the conclusion of the committee should be "<distance>"
160
- Examples:
161
- | distance_estimate | distance |
162
- | 0 | 0 |
163
- | 100 | 67.09227 |
158
+ And the conclusion of the committee should be "0.06391"
164
159
 
165
160
  Scenario Outline: Load factor committee from cohort
166
161
  Given a flight emitter
162
+ And a characteristic "segments_per_trip" of "1"
167
163
  And a characteristic "origin_airport.iata_code" of "<origin>"
168
164
  When the "cohort" committee is calculated
169
165
  And the "load_factor" committee is calculated
@@ -172,14 +168,15 @@ Feature: Flight Committee Calculations
172
168
  Examples:
173
169
  | origin | load_factor |
174
170
  | ADA | 0.8 |
171
+ | AIA | 0.83333 |
175
172
 
176
173
  Scenario: Load factor committee from default
177
174
  Given a flight emitter
178
175
  When the "load_factor" committee is calculated
179
176
  Then the committee should have used quorum "default"
180
- And the conclusion of the committee should be "0.85"
177
+ And the conclusion of the committee should be "0.82222"
181
178
 
182
- Scenario Outline: Seats committee from aircraft
179
+ Scenario Outline: Seats committee from aircraft with seats
183
180
  Given a flight emitter
184
181
  And a characteristic "aircraft.icao_code" of "<code>"
185
182
  When the "seats" committee is calculated
@@ -188,18 +185,31 @@ Feature: Flight Committee Calculations
188
185
  Examples:
189
186
  | code | seats |
190
187
  | FM1 | 125 |
191
- | BA1 | 125 |
192
- | BA2 | 100 |
188
+ | BA1 | 120 |
189
+
190
+ Scenario Outline: Seats committee from aircraft missing seats
191
+ Given a flight emitter
192
+ And a characteristic "aircraft.icao_code" of "<code>"
193
+ When the "seats" committee is calculated
194
+ Then the committee should have used quorum "default"
195
+ And the conclusion of the committee should be "121.6666667"
196
+ Examples:
197
+ | code |
198
+ | XX1 |
199
+ | XX2 |
200
+ | XX3 |
201
+ | XX4 |
193
202
 
194
203
  Scenario: Seats committee from seats estimate
195
204
  Given a flight emitter
196
- And a characteristic "seats_estimate" of "100"
205
+ And a characteristic "seats_estimate" of "100.25"
197
206
  When the "seats" committee is calculated
198
207
  Then the committee should have used quorum "from seats estimate"
199
208
  And the conclusion of the committee should be "100"
200
209
 
201
210
  Scenario Outline: Seats committee from cohort
202
211
  Given a flight emitter
212
+ And a characteristic "segments_per_trip" of "1"
203
213
  And a characteristic "origin_airport.iata_code" of "<origin>"
204
214
  When the "cohort" committee is calculated
205
215
  And the "seats" committee is calculated
@@ -208,28 +218,34 @@ Feature: Flight Committee Calculations
208
218
  Examples:
209
219
  | origin | seats |
210
220
  | ADA | 125 |
221
+ | AIA | 120 |
211
222
 
212
223
  Scenario: Seats committee from aircraft class
213
224
  Given a flight emitter
214
225
  And a characteristic "aircraft_class.brighter_planet_aircraft_class_code" of "EX"
215
226
  When the "seats" committee is calculated
216
227
  Then the committee should have used quorum "from aircraft class"
217
- And the conclusion of the committee should be "116"
228
+ And the conclusion of the committee should be "121"
218
229
 
219
230
  Scenario: Seats committee from default
220
231
  Given a flight emitter
221
232
  When the "seats" committee is calculated
222
233
  Then the committee should have used quorum "default"
223
- And the conclusion of the committee should be "118"
234
+ And the conclusion of the committee should be "121.6666667"
224
235
 
225
- Scenario: Passengers committee
236
+ Scenario: Passengers committee from seats and load factor
226
237
  Given a flight emitter
227
- And a characteristic "seats" of "100"
238
+ And a characteristic "seats" of "105"
228
239
  And a characteristic "load_factor" of "0.9"
229
240
  When the "passengers" committee is calculated
230
- Then the conclusion of the committee should be "90"
241
+ Then the conclusion of the committee should be "95"
231
242
 
232
- Scenario Outline: Fuel use coefficients committee from aircraft
243
+ Scenario: Fuel type committee from default
244
+ Given a flight emitter
245
+ When the "fuel_type" committee is calculated
246
+ Then the conclusion of the committee should have "name" of "Jet Fuel"
247
+
248
+ Scenario Outline: Fuel use coefficients committee from aircraft with fuel use coefficients
233
249
  Given a flight emitter
234
250
  And a characteristic "aircraft.icao_code" of "<code>"
235
251
  When the "fuel_use_coefficients" committee is calculated
@@ -242,22 +258,36 @@ Feature: Flight Committee Calculations
242
258
  | code | m3 | m2 | m1 | b |
243
259
  | FM1 | 0 | 0 | 1 | 0 |
244
260
  | BA1 | 0 | 0 | 2 | 0 |
261
+ | XX2 | 0 | 0 | 3 | 0 |
262
+ | XX4 | 0 | 0 | 4 | 0 |
245
263
 
246
- Scenario Outline: Fuel use coefficients committee from aircraft class
264
+ Scenario Outline: Fuel use coefficients committee from aircraft missing fuel use coefficients
247
265
  Given a flight emitter
248
- And a characteristic "aircraft_class.brighter_planet_aircraft_class_code" of "<code>"
266
+ And a characteristic "aircraft.icao_code" of "<code>"
249
267
  When the "fuel_use_coefficients" committee is calculated
250
- Then the committee should have used quorum "from aircraft class"
251
- And the conclusion of the committee should have a record with "m3" equal to "<m3>"
252
- And the conclusion of the committee should have a record with "m2" equal to "<m2>"
253
- And the conclusion of the committee should have a record with "m1" equal to "<m1>"
254
- And the conclusion of the committee should have a record with "endpoint_fuel" equal to "<b>"
268
+ Then the committee should have used quorum "default"
269
+ And the conclusion of the committee should have a record with "m3" equal to "0"
270
+ And the conclusion of the committee should have a record with "m2" equal to "0"
271
+ And the conclusion of the committee should have a record with "m1" equal to "1.66667"
272
+ And the conclusion of the committee should have a record with "endpoint_fuel" equal to "0"
255
273
  Examples:
256
- | code | m3 | m2 | m1 | b |
257
- | EX | 0 | 0 | 2 | 0 |
274
+ | code |
275
+ | XX1 |
276
+ | XX3 |
277
+
278
+ Scenario: Fuel use coefficients committee from aircraft class
279
+ Given a flight emitter
280
+ And a characteristic "aircraft_class.brighter_planet_aircraft_class_code" of "EX"
281
+ When the "fuel_use_coefficients" committee is calculated
282
+ Then the committee should have used quorum "from aircraft class"
283
+ And the conclusion of the committee should have a record with "m3" equal to "0"
284
+ And the conclusion of the committee should have a record with "m2" equal to "0"
285
+ And the conclusion of the committee should have a record with "m1" equal to "1.66667"
286
+ And the conclusion of the committee should have a record with "endpoint_fuel" equal to "0"
258
287
 
259
288
  Scenario Outline: Fuel use coefficients committee from cohort
260
289
  Given a flight emitter
290
+ And a characteristic "segments_per_trip" of "1"
261
291
  And a characteristic "origin_airport.iata_code" of "<origin>"
262
292
  When the "cohort" committee is calculated
263
293
  And the "fuel_use_coefficients" committee is calculated
@@ -268,31 +298,130 @@ Feature: Flight Committee Calculations
268
298
  And the conclusion of the committee should have a record with "endpoint_fuel" equal to "<b>"
269
299
  Examples:
270
300
  | origin | m3 | m2 | m1 | b |
271
- | AIA | 0 | 0 | 1 | 0 |
301
+ | ADA | 0 | 0 | 1 | 0 |
302
+ | AIA | 0 | 0 | 2 | 0 |
272
303
 
273
- Scenario Outline: Fuel use coefficients committee from default
304
+ Scenario: Fuel use coefficients committee from default
274
305
  Given a flight emitter
275
306
  When the "fuel_use_coefficients" committee is calculated
276
307
  Then the committee should have used quorum "default"
277
- And the conclusion of the committee should have a record with "m3" equal to "<m3>"
278
- And the conclusion of the committee should have a record with "m2" equal to "<m2>"
279
- And the conclusion of the committee should have a record with "m1" equal to "<m1>"
280
- And the conclusion of the committee should have a record with "endpoint_fuel" equal to "<b>"
308
+ And the conclusion of the committee should have a record with "m3" equal to "0"
309
+ And the conclusion of the committee should have a record with "m2" equal to "0"
310
+ And the conclusion of the committee should have a record with "m1" equal to "1.66667"
311
+ And the conclusion of the committee should have a record with "endpoint_fuel" equal to "0"
312
+
313
+ Scenario: Dogleg factor committee from segments per trip
314
+ Given a flight emitter
315
+ And a characteristic "segments_per_trip" of "2"
316
+ When the "dogleg_factor" committee is calculated
317
+ Then the conclusion of the committee should be "1.25"
318
+
319
+ Scenario: Route inefficiency factor committee from country
320
+ Given a flight emitter
321
+ And a characteristic "country.iso_3166_code" of "US"
322
+ When the "route_inefficiency_factor" committee is calculated
323
+ Then the committee should have used quorum "from country"
324
+ And the conclusion of the committee should be "1.1"
325
+
326
+ Scenario: Route inefficiency factor committee from default
327
+ Given a flight emitter
328
+ When the "route_inefficiency_factor" committee is calculated
329
+ Then the committee should have used quorum "default"
330
+ And the conclusion of the committee should be "1.1"
331
+
332
+ Scenario: Route inefficiency factor after country committee has returned nil
333
+ Given a flight emitter
334
+ When the "country" committee is calculated
335
+ And the "route_inefficiency_factor" committee is calculated
336
+ Then the committee should have used quorum "default"
337
+ And the conclusion of the committee should be "1.1"
338
+
339
+ Scenario Outline: Distance committee from airports
340
+ Given a flight emitter
341
+ And a characteristic "origin_airport.iata_code" of "<origin>"
342
+ And a characteristic "destination_airport.iata_code" of "<destination>"
343
+ When the "distance" committee is calculated
344
+ Then the committee should have used quorum "from airports"
345
+ And the conclusion of the committee should be "<distance>"
281
346
  Examples:
282
- | m3 | m2 | m1 | b |
283
- | 0 | 0 | 2 | 0 |
347
+ | origin | destination | distance |
348
+ | ADA | AIA | 100.0 |
349
+ | AIA | WEA | 1000.0 |
350
+
351
+ Scenario: Distance committee from distance estimate
352
+ Given a flight emitter
353
+ And a characteristic "distance_estimate" of "185.2"
354
+ When the "distance" committee is calculated
355
+ Then the committee should have used quorum "from distance estimate"
356
+ And the conclusion of the committee should be "100.0"
357
+
358
+ Scenario: Distance committee from distance class
359
+ Given a flight emitter
360
+ And a characteristic "distance_class.name" of "petite"
361
+ When the "distance" committee is calculated
362
+ Then the committee should have used quorum "from distance class"
363
+ And the conclusion of the committee should be "100.0"
364
+
365
+ Scenario Outline: Distance committee from cohort where all distances > 0
366
+ Given a flight emitter
367
+ And a characteristic "segments_per_trip" of "1"
368
+ And a characteristic "origin_airport.iata_code" of "<origin>"
369
+ When the "cohort" committee is calculated
370
+ And the "distance" committee is calculated
371
+ Then the committee should have used quorum "from cohort"
372
+ And the conclusion of the committee should be "<distance>"
373
+ Examples:
374
+ | origin | distance |
375
+ | ADA | 100.0 |
376
+ | AIA | 1000.0 |
377
+
378
+ Scenario Outline: Distance committee from cohort where some distances > 0
379
+ Given a flight emitter
380
+ And a characteristic "segments_per_trip" of "1"
381
+ And a characteristic "origin_airport.iata_code" of "<origin>"
382
+ When the "cohort" committee is calculated
383
+ And the "distance" committee is calculated
384
+ Then the committee should have used quorum "from cohort"
385
+ And the conclusion of the committee should be "<distance>"
386
+ Examples:
387
+ | origin | distance |
388
+ | ADA | 100.0 |
389
+ | AIA | 1000.0 |
390
+
391
+ Scenario: Distance committee from cohort where all distances = 0
392
+ Given a flight emitter
393
+ And a characteristic "segments_per_trip" of "1"
394
+ And a characteristic "origin_airport.iata_code" of "WEA"
395
+ When the "cohort" committee is calculated
396
+ And the "distance" committee is calculated
397
+ Then the committee should have used quorum "default"
398
+ And the conclusion of the committee should be "366.66667"
399
+
400
+ Scenario: Distance committee from default
401
+ Given a flight emitter
402
+ When the "distance" committee is calculated
403
+ Then the committee should have used quorum "default"
404
+ And the conclusion of the committee should be "366.66667"
405
+
406
+ Scenario: Adjusted distance committee from distance, route inefficiency factor, and dogleg factor
407
+ Given a flight emitter
408
+ And a characteristic "distance" of "100"
409
+ And a characteristic "route_inefficiency_factor" of "1.1"
410
+ And a characteristic "dogleg_factor" of "1.25"
411
+ When the "adjusted_distance" committee is calculated
412
+ Then the conclusion of the committee should be "137.5"
284
413
 
285
414
  Scenario: Adjusted distance per segment committee
286
415
  Given a flight emitter
287
416
  And a characteristic "adjusted_distance" of "100"
288
- And a characteristic "emplanements_per_trip" of "2"
417
+ And a characteristic "segments_per_trip" of "2"
289
418
  When the "adjusted_distance_per_segment" committee is calculated
290
419
  Then the conclusion of the committee should be "50"
291
420
 
292
421
  Scenario: Fuel per segment committee
293
422
  Given a flight emitter
294
423
  And a characteristic "adjusted_distance_per_segment" of "100"
295
- And a characteristic "aircraft_class.brighter_planet_aircraft_class_code" of "EX"
424
+ And a characteristic "aircraft.icao_code" of "BA1"
296
425
  When the "fuel_use_coefficients" committee is calculated
297
426
  And the "fuel_per_segment" committee is calculated
298
427
  Then the conclusion of the committee should be "200"
@@ -300,24 +429,46 @@ Feature: Flight Committee Calculations
300
429
  Scenario: Fuel committee
301
430
  Given a flight emitter
302
431
  And a characteristic "fuel_per_segment" of "100"
303
- And a characteristic "emplanements_per_trip" of "2"
432
+ And a characteristic "segments_per_trip" of "2"
304
433
  And a characteristic "trips" of "2"
305
434
  When the "fuel" committee is calculated
306
435
  Then the conclusion of the committee should be "400"
307
436
 
308
- Scenario Outline: Emission committee from fuel and passengers and coefficients
309
- Given a flight emitter
310
- And a characteristic "fuel" of "<fuel>"
311
- And a characteristic "passengers" of "<passengers>"
312
- And a characteristic "seat_class_multiplier" of "<seat_mult>"
313
- And a characteristic "emission_factor" of "<ef>"
314
- And a characteristic "radiative_forcing_index" of "<rfi>"
315
- And a characteristic "freight_share" of "<freight>"
316
- And a characteristic "date" of "<date>"
317
- And a characteristic "timeframe" of "2010-01-01/2010-12-31"
318
- When the "emission" committee is calculated
319
- Then the committee should have used quorum "from fuel and passengers with coefficients"
320
- And the conclusion of the committee should be "<emission>"
321
- Examples:
322
- | fuel | passengers | seat_mult | ef | rfi | freight | date | emission |
323
- | 100 | 100 | 1.5 | 10 | 2 | 0.10 | 2010-07-15 | 27 |
437
+ Scenario: Aviation multiplier committee from default
438
+ Given a flight emitter
439
+ When the "aviation_multiplier" committee is calculated
440
+ Then the conclusion of the committee should be "2"
441
+
442
+ Scenario: Emission factor committee from default fuel type
443
+ Given a flight emitter
444
+ When the "fuel_type" committee is calculated
445
+ And the "emission_factor" committee is calculated
446
+ Then the conclusion of the committee should be "1.0"
447
+
448
+ # Scenario: Emission committee from origin ADA
449
+ # Given a flight emitter
450
+ # And a characteristic "segments_per_trip" of "1"
451
+ # And a characteristic "aircraft.icao_code" of "FM1"
452
+ # And a characteristic "date" of "2010-01-01"
453
+ # And a characteristic "timeframe" of "2010-01-01/2010-12-31"
454
+ # When the "cohort" committee is calculated
455
+ # When the "country" committee is calculated
456
+ # And the "seat_class_multiplier" committee is calculated
457
+ # And the "trips" committee is calculated
458
+ # And the "freight_share" committee is calculated
459
+ # And the "load_factor" committee is calculated
460
+ # And the "seats" committee is calculated
461
+ # And the "passengers" committee is calculated
462
+ # And the "fuel_type" committee is calculated
463
+ # And the "fuel_use_coefficients" committee is calculated
464
+ # And the "dogleg_factor" committee is calculated
465
+ # And the "route_inefficiency_factor" committee is calculated
466
+ # And the "distance" committee is calculated
467
+ # And the "adjusted_distance" committee is calculated
468
+ # And the "adjusted_distance_per_segment" committee is calculated
469
+ # And the "fuel_per_segment" committee is calculated
470
+ # And the "fuel" committee is calculated
471
+ # And the "aviation_multiplier" committee is calculated
472
+ # And the "emission_factor" committee is calculated
473
+ # And the "emission" committee is calculated
474
+ # Then the conclusion of the committee should be "4.2"