XoomCentre PlugIns

Tuesday, 19 June 2012



XoomCentre PlugIns

As well as displaying information direct from the log files, XoomCentre uses a system of plugins to allow calculations to be performed on the logged data.  These calculations can either modify the data in the logfile, add new traces to the logfile or print the results of calculations.  A no. of plugins have been written already for the system and others are simple to write using the built in JavaScript interpreter with auto completion and syntax analysing editor.

Plugins are divided into two general categories.

  • File processors - are used to process entire files.  Additionally these can be configured to be called automatically each time a logfile is imported from the XoomBox.
  • Trace Processors are used to process single traces from inside a log file.

The following plugins have already been written

File Processors

  • Slip Calculator - uses the wheel speed traces to provide 3 additional traces - 'Driven Axle Speed', 'Undriven Axle Speed' and 'Driven/Undriven Axle slip'
  • G-Circle - Calculates total acceleration as the vector sum of 'Lateral acceleration' and 'Longitudinal acceleration'.  The result is added as an additional trace.
  • Empty Trace Remover - examines all the traces in a logfile.  If any contains only 0.0 values, then it is deleted from the logfile.
  • Summary - prints summary info on the contents of a logfile.  Includes max and min info on each channel, and no. of samples recorded.
  • Acceleration times - displays times taken from launch until a given speed is reached.  Prints speeds at 5mph intervals.
  • Trim Start - search from the start of the logilfe until the first longitudinal acceleration >0.25g - indicating the start of a run.  Delete data more than 1second before this point from all channels.
  • Calc Speed and Distance - adds 2 new channels.  Vehicle speed, determined from all the wheel speed sensors, and distance travelled since the start of the run.

Trace Processors

  • Light, Medium, Heavy Smoother - a set of 3 separate plugins which perform varying degrees of smoothing to the selected trace.  Used to minimise noise on poor quality analogue signals.
  • Trace Copier - Adds another trace to a logfile which is simply a copy of an existing trace.
  • Zero Average - Adds a constant value to every sample in a trace such that the average value of all the samples is 0.0.  This is typically of use to correct DC errors in accelerometer readings.  If the car was stationary at the start and end of the runs, then the averages of lateral and longitudinal acceleration should both be 0.0.
  • Integrator - Creates a new trace by calculating the time integral of the given trace.  Useful to calculate approximate velocity from longitudinal acceleration.


Below is a screenshot of the 'Trace Copier' PlugIn in the included JavaScript editor.  As can be seen, the structure of a PlugIn is very simple and the object oriented structure of the logfile makes writing a PlugIn a simple process.


Perhaps a more interesting example is the acceleration time printout

Here's what the same code looks like if you misspell a variable name.  See if you can spot the difference from the above.  The wiggly underlines highlight the bits of code the editor thinks are wrong.


Home | Up

This site was last updated 06/19/12