public void StorePeakAcceleration(DataItemVehicle itemVehicle, DataItemRun itemRun)
        {
            if (samples.Count == 0)
            {
                Debug.LogToFileMethod("peak-a: no samlpes");
                return;
            }

            if (isPeakAStored == true)
            {
                // refuse to process peakA again
                Debug.LogToFileEventText("peak-a: already found");
                return;
            }

            double peakA     = 0;
            double speed     = 0;
            double magnitude = 0;
            int    count     = samples.Count;

            // user calibrated profile before run -> get accelerometer offsets
            // to eleminate earth gravitation and slope of the device in the car mount
            double offsetX = itemVehicle.AxisOffsetX;
            double offsetY = itemVehicle.AxisOffsetY;
            double offsetZ = itemVehicle.AxisOffsetZ;

            // from collection to array with offset compensation ("normalize" to axis origin)
            ToArray(offsetX, offsetY, offsetZ);

            // apply low pass filter to each "normalized" axis
            OnlineFilter filter = OnlineFilter.CreateLowpass(ImpulseResponse.Finite,
                                                             FILTER_SAMPLE_RATE,
                                                             FILTER_CUT_OFF_RATE,
                                                             FILTER_ORDER);

            double[] filteredX = filter.ProcessSamples(samplesX);
            filter.Reset();

            double[] filteredY = filter.ProcessSamples(samplesY);
            filter.Reset();

            double[] filteredZ = filter.ProcessSamples(samplesZ);
            filter.Reset();

            // search max value of magnitude of all filtered axes
            for (int i = 0; i < count; i++)
            {
                // magnitude of all components
                magnitude = Math.Sqrt(filteredX[i] * filteredX[i] +
                                      filteredY[i] * filteredY[i] +
                                      filteredZ[i] * filteredZ[i]);

                // store if new max
                if (magnitude > peakA)
                {
                    peakA = magnitude;
                    speed = samplesS[i];
                }
            }

            // store to given run
            itemRun.PeakAcceleration = (float)peakA;

            Debug.LogToFileEventText("found peak-a [m/s^2]: " + peakA.ToString("0.00") +
                                     " at speed [m/s]: " + speed.ToString("0.00"));

            if ((count >= SIZE_MAX) && (peakA > 0))
            {
                isPeakAStored = true;
            }
        }