-
Notifications
You must be signed in to change notification settings - Fork 0
/
documentation.html
435 lines (409 loc) · 17.3 KB
/
documentation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
<!--
Copyright (c) 2021, Minh Tran, Tampere University
This web-based program was developed as a part of the project: Experiment with data mashups and report/demonstrate
This source code is licensed under the 3-clause BSD license. See LICENSE file in the repository root directory.
Author(s): Minh Tran <minh.s.tran@tuni.fi>
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Documentation</title>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700;800&display=swap"
rel="stylesheet"
/>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
crossorigin="anonymous"
/>
</head>
<body>
<style>
.style_nav_bar {
height: 80px;
}
.style_sub_link {
color: #4e008e;
font-size: 16px;
font-weight: 200;
text-decoration: none;
font-family: "Open Sans", sans-serif;
}
.style_sub_link:hover {
color: #e1e5f4;
}
.dropdown-item {
color: #4e008e;
}
.style_container {
font-family: "Open Sans", sans-serif;
}
.style_paragraph {
font-size: 17px;
}
.citation {
list-style: none;
margin: 0;
padding: 0;
font-size: 14px;
}
.style_header_row {
height: 120px;
}
.part_menu_link {
font-size: 14px;
font-weight: bold;
color: #4e008e;
text-decoration: none;
}
.part_menu_link:hover {
color: #4e008e;
text-decoration: underline;
}
.subpart_menu_link {
font-size: 14px;
color: #4e008e;
text-decoration: none;
}
.subpart_menu_link:hover {
color: #4e008e;
text-decoration: underline;
}
.citation_link {
text-decoration: none;
color: black;
vertical-align: super;
font-size: 12px;
}
.citation_link:hover {
color: #4e008e;
text-decoration: underline;
}
.style_custom_row {
height: 20px;
}
#tampere_university_logo {
height: 65px;
}
#tampere_university_logo:hover {
cursor: pointer;
}
#logo {
font-family: "Open Sans", sans-serif;
font-size: 30px;
font-weight: 700;
color: #4e008e;
}
h1 {
text-align: center;
color: #4e008e;
font-weight: bold;
font-size: 40px;
}
h3 {
color: #4e008e;
font-weight: bold;
}
h4 {
color: #4e008e;
}
h5 {
color: #4e008e;
font-weight: bold;
}
</style>
<nav class="navbar navbar-light style_nav_bar">
<div class="container justify-content-space-between align-items-center">
<a class="navbar-brand" id="logo" href="index.html">CO2 CALCULATOR</a>
<a class="style_sub_link" href="ice_calculator.html">ICE Vehicles</a>
<a class="style_sub_link" href="ev_calculator.html"
>Electric Vehicles</a
>
<a
class="nav-link dropdown-toggle style_sub_link"
href="#"
id="navbarComparisonLink"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false"
>
Comparison
</a>
<a href="documentation.html" class="style_sub_link">Documentation</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="ev_vs_ev.html">EV - EV</a></li>
<li>
<a class="dropdown-item" href="icev_vs_icev.html">ICEV - ICEV</a>
</li>
<li><a class="dropdown-item" href="icev_vs_ev.html">EV - ICEV</a></li>
</ul>
<img
src="buttons/logo_TAU_fi-eng_violetti_RGB.png"
alt="Tampere University logo"
id="tampere_university_logo"
onclick="parent.open('https://www.tuni.fi/en/')"
/>
</div>
</nav>
<div class="container style_container">
<div
class="row style_header_row justify-content-center align-items-center"
>
<h1>DOCUMENTATION FOR CO2 CALCULATOR</h1>
</div>
<div class="row">
<div class="col-md-2">
<div class="row text-center">
<h5>Menu</h5>
</div>
<a href="#1" class="part_menu_link">1. ICE vehicles CO2 calculator</a
><br />
<a href="#1a" class="subpart_menu_link">a. Traffic data</a><br />
<a href="#1b" class="subpart_menu_link">b. Trip data</a><br />
<a href="#1c" class="subpart_menu_link">c. Weather data</a><br />
<a href="#1d" class="subpart_menu_link"
>d. How the calculations are carried out</a
><br />
<a href="#2" class="part_menu_link"
>2. Electric vehicles CO2 calculator</a
><br />
<a href="#2a" class="subpart_menu_link">a. Traffic data</a><br />
<a href="#2b" class="subpart_menu_link">b. Trip data</a><br />
<a href="#2c" class="subpart_menu_link">c. Emission factor data</a
><br />
<a href="#2d" class="subpart_menu_link">d. Weather data</a><br />
<a href="#2e" class="subpart_menu_link"
>e. How the calculations are carried out</a
><br />
<a href="#3" class="part_menu_link">3. Links and citations</a><br />
</div>
<div class="col-md-10">
<p class="style_paragraph">
This website provides a demonstration on combining different data
sources. The website calculates CO2 emission of different trip
patterns with different cars and different origins and destinations.
The effects of different temperatures are also considered.
</p>
<h3 id="1">1. ICE vehicles CO2 calculator</h3>
<p class="style_paragraph">
The calculator calculates the total emission using the tested
average CO2 emission per kilometre and distance of the trip. The
temperature effects include the change in fuel consumption/CO2
emission in different conditions and the usage of AC in hot weather.
</p>
<h4 id="1a">a. Traffic data</h4>
<p class="style_paragraph">
The emission per kilometre travelled of different cars is obtained
from Traficom <a href="#citation1" class="citation_link">[1]</a>.
Traficom provides technical data on every car that has been
registered in Finland. The database used in the program has been
filtered and contains the brands, models, versions, registration
years and CO2 emissions of different internal combustion passenger
cars. The database used in the calculator is a JSON file in arrays
on objects format.
</p>
<p class="style_paragraph">
The users enter the information for their desired car in the
following order: brand, model, version, year. The calculator will
sort the database accordingly. The available options are given in a
list of suggestions, appeared when the users enter their inputs.
</p>
<h4 id="1b">b. Trip data</h4>
<p class="style_paragraph">
The distance of the trip is obtained from Google Maps Javascript API
<a href="#citation2" class="citation_link">[2]</a>. The input fields
use the Places Autocomplete library
<a href="#citation3" class="citation_link">[3]</a> of the API. After
the users have entered their desired places, the calculator uses the
Distance Matrix service to calculate the distance and time of travel
<a href="#citation4" class="citation_link">[4]</a>. In the
<code>getDistanceMatrix()</code> request,
<code>trafficModel</code> is set to <code>"bestguess"</code>.
</p>
<p class="text-center style_paragraph">
<code>
travelMode: "DRIVING", drivingOptions: { departureTime: new
Date(), trafficModel: "bestguess", }
</code>
</p>
<h4 id="1c">c. Weather data</h4>
<p class="style_paragraph">
The temperature data is obtained from AccuWeather
<a href="#citation5" class="citation_link">[5]</a>. For simplicity,
the program obtains the temperature at the origin, as most people
will drive in not a very long distance everyday.
</p>
<p class="style_paragraph">
Getting the temperature from AccuWeather requires 2 steps: finding
the suitable location key for the origin using AccuWeather's
Geoposition Search API
<a href="#citation6" class="citation_link">[6]</a>, and get the
temperature using that location key using the Current Conditions API
<a href="#citation7" class="citation_link">[7]</a>. As the
Geoposition Search API uses latitude and longitude of the place, the
calculator also uses the Geocoding Service from Google Maps.
</p>
<p class="style_paragraph">
Users also have the choice to manually enter their desired
temperature to the program.
</p>
<h4 id="1d">d. How the calculations are carried out</h4>
<p class="style_paragraph">
The calculator can carry out calculations with or without the
temperature. If the temperature is not given, the total emission
will be calculated as <b>average emission</b> * <b>distance</b>.
</p>
<p class="style_paragraph">
If the temperature is given, the effects of temperature includes
different real-world consumption in different conditions, and the
usage of AC if the weather is hot.
</p>
<p class="style_paragraph">
Considering the manufacturers' tests were conducted at 20 degrees
Celsius, different temperatures affect the real-world values
differently <a href="#citation8" class="citation_link">[8]</a>:
</p>
<ul class="style_paragraph">
<li>-7 degrees Celsius: 16% increase</li>
<li>0 degree Celsius: 11% increase</li>
<li>10 degrees Celsius: 5% increase</li>
<li>30 degrees Celsius: 2% decrease</li>
</ul>
<p class="style_paragraph">
The car users might want to use the AC if the weather outside is
unfavourable. While most cars uses heat from the engine to heat the
car in cold weather, cooling down the car in hot weather requires
fuel. Fuel consumption for AC usage will be considered if the
weather outside is greater than 20 degrees Celsius. The consumption
per hour increases linearly from 20 degrees to 30 degrees (+0.04
litres per hour for each degree rised, e.g. 0.12 litres per hour in
23 degrees and 0.2 litres per hour in 25 degrees, etc.), and stays
at 0.4 litres per hour if the temperature exceeds 30 degrees.
</p>
<p class="style_paragraph">
The program obtains the real-world temperature and decides the
closest data points to the result. The according effects will be
used in calculating the final CO2 consumption.
</p>
<h3 id="2">2. Electric vehicles CO2 calculator</h3>
<p class="style_paragraph">
The calculator calculates the total CO2 emission using the cars'
efficiency, which is the amount of electricity consumed in a
kilometre, the distance of the trip, and the emission factor, which
is the amount of CO2 emitted per 1 kWh of electricity consumed.
</p>
<h4 id="2a">a. Traffic data</h4>
<p class="style_paragraph">
The traffic data is provided by EV-Database
<a href="#citation9" class="citation_link">[9]</a>. As EV-Database
does not provide any APIs, a JSON file is created based on the
brands, models and efficiency figures from the webpage.
</p>
<p class="style_paragraph">
Users enter the information of their desired car in the following
order: brand and model. The calculator will sort and filter the
database accordingly. The available options given in a list of
suggestions, appears when users enter their inputs.
</p>
<h4 id="2b">b. Trip data</h4>
<p class="style_paragraph">
The method of obtaining trip distance is the same as the ICE vehicle
CO2 calculator.
</p>
<h4 id="2c">c. Emission factor data</h4>
<p class="style_paragraph">
The emission factor of each kWh of electricity consumed is provided
by Fingrid, through Emission factor for electricity consumed in
Finland - real time data API. [10] The API provides figures on the
emission factor and the time the figure is updated. For simplicity,
this figure will be used in calculating the total CO2 emission.
</p>
<h4 id="2d">d. Weather data</h4>
<p class="style_paragraph">
The method of obtaining the temperature is the same as the ICE
vehicle CO2 calculator.
</p>
<h4 id="2e">e. How the calculations are carried out</h4>
<p class="style_paragraph">
The calculator can carry out calculations with or without the
temperature. If the temperature is not given, the total emission
will be calculated as
<b>efficiency * distance * emission factor</b>.
</p>
<p class="style_paragraph">
If the temperature is given, the calculation will consider the fact
that real-world range will change in different conditions
<a href="#citation10" class="citation_link">[10]</a>:
</p>
<ul class="style_paragraph">
<li>-20 degrees Celsius: 50% rated range</li>
<li>-10 degree Celsius: 60% rated range</li>
<li>0 degree Celsius: 80% rated range</li>
<li>10 degrees Celsius: 100% rated range</li>
<li>20 degrees Celsius: 115% rated range</li>
<li>30 degrees Celsius: 105% rated range</li>
<li>40 degrees Celsius: 80% rated range</li>
</ul>
<p class="style_paragraph">
The program obtains the real-world temperature and decides the
closest data point to the result. The according effect will be used
in calculating the final CO2 consumption. For simplicity, the energy
efficiency is considered to be inversely proportional to range.
</p>
<h3 id="3">3. Links and citations</h3>
<ul class="citation">
<li id="citation1">
[1]
https://www.traficom.fi/en/news/open-data?toggle=Open%20data%20for%20vehicles%20version%205.14
</li>
<li id="citation2">
[2]
https://developers.google.com/maps/documentation/javascript/overview
</li>
<li id="citation3">
[3]
https://developers.google.com/maps/documentation/javascript/places-autocomplete
</li>
<li id="citation4">
[4]
https://developers.google.com/maps/documentation/javascript/distancematrix
</li>
<li id="citation5">[5] https://developer.accuweather.com/</li>
<li id="citation6">
[6]
https://developer.accuweather.com/accuweather-locations-api/apis/get/locations/v1/cities/geoposition/search
</li>
<li id="citation7">
[7]
https://developer.accuweather.com/accuweather-current-conditions-api/apis/get/currentconditions/v1/%7BlocationKey%7D
</li>
<li id="citation8">
[8] Fontaras, G., Zacharof, N.-G., & Ciuffo, B. (2017, February
21). Fuel consumption and CO2 emissions from passenger cars in
Europe – Laboratory versus real-world emissions. Progress in
Energy and Combustion Science.
https://www.sciencedirect.com/science/article/pii/S0360128516300442.
</li>
<li id="citation9">[9] https://ev-database.org/</li>
<li id="citation10">
[10] To what degree does temperature impact ev range? Geotab.
(n.d.). https://www.geotab.com/blog/ev-range/.
</li>
</ul>
</div>
</div>
<div class="row style_custom_row"></div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
crossorigin="anonymous"
></script>
</body>
</html>