Functions associated with Speed/Emissions terms.
#calculationsfitSpeedEm(em, time, speed, engine.on = NULL,
data = NULL, method = 1, min.speed = 5,
bin.size = NULL, ...,
fun.name="fitEmSpeed")
#speed/emissions Plots
speedEmPlot(speed, em = NULL, time = NULL,
..., data = NULL, engine.on = NULL,
min.speed = 5, bin.size = NULL,
plot.type = 1, method = 1,
fun.name="speedEmPlot")
fitSpeedEm generates a speed/emissions contribution
report as a pems dataset.
speedEmPlot generates a speed/emissions contribution
report as a lattice plot.
(Typically pems.element vectors) em is the (g/s)
emissions data-series; speed and time are
the associated speed profile and time-series.
(Optimal, single Numeric) The time the emission source, e.g.
monitored vehicle engine, was started. If not supplied, this
is assumed to be start of the supplied em and
time data-series. See also Notes.
(Optional, typically pems) The data source for
em, speed and time.
(Optinal, Numeric) The method to use when calculating
and binning data: method 1 calculate g/km emissions
and bin by row. See also bin.size, Notes and
References.
(Optinal, Numeric) measurements when speeds were less than
this value are exluded, default value 5. See also
Notes.
(Optinal, Numeric) The data binning scale to use. For
method 1, this is the number of rows of
measurements to merge.
(Optional) Other arguments, currently passed on as supplied to associated calculation or plotting function, or back to pemsPlot.
(Optional character) The name of the parent function, to be used in error messaging.
(Optional numeric) For speedEmPlot, the type of
speed/emission plot to generate: 1 a conventional
scatter plot; or 2 a box-and-whisker plot. If not supplied,
plot type 1 is
selected by default.
Karl Ropkins
fitSpeedEm builds a speed and g/km emissions
data sets for the supplied emissions, speed and
time-series data.
speedEmPlot generates a plot of one or more
data set generated by fitSpeedEm.
fitColdStart uses methods described in:
[COPERT on speed/emission terms]
[Ropkins speed/emissions]
See common.calculations (and
checkUnits and
convertUnits) for details of data management.
###########
##example 1
###########
#basic usage
#to do/maybe not run... time to compile...
Run the code above in your browser using DataLab