void ApplyCalibration(bool logDetailsToFile)
        {
            // apply calibration of given profile to acceleration sensor launch detection
            DataItemVehicle vehicle   = Database.GetInstance().GetActiveProfile();
            RunStartStop    startStop = new RunStartStop(vehicle);

            if (logDetailsToFile == true)
            {
                string latitude  = gpsProvider.GetLatitude().ToString().Replace(',', '.');
                string longitute = gpsProvider.GetLongitude().ToString().Replace(',', '.');

                Debug.LogToFile("location [latitude, longitude]: " + latitude + ", " + longitute);
                Debug.LogToFile(startStop.GetStartString());
                Debug.LogToFile(startStop.GetStopString());

                Analytics.TrackLocation(latitude, longitute);
            }

            accelerometerProvider.SetForceDetectLimit(startStop.GetStartLimit());
            accelerometerProvider.SetAxisOffset(vehicle.AxisOffsetX,
                                                vehicle.AxisOffsetY,
                                                vehicle.AxisOffsetZ);

            runModeProvider.StopDetectionLimit = startStop.GetStopLimit();
        }
        protected override void OnAppearing()
        {
            base.OnAppearing();
            Debug.LogToFileMethod();

            if (accelerometerProvider != null)
            {
                accelerometerProvider.SetListener(this);

                labelForceDetectLimit.Text = "ForceDetectLimit: " + sliderForceDetectLimit.Value;
                accelerometerProvider.SetForceDetectLimit((float)sliderForceDetectLimit.Value);

                sliderForceDetectLimit.ValueChanged += (object sender, ValueChangedEventArgs e) =>
                {
                    labelForceDetectLimit.Text = "ForceDetectLimit: " + e.NewValue;
                    accelerometerProvider.SetForceDetectLimit((float)sliderForceDetectLimit.Value);
                };

                labelTimeDetectLimit.Text = "TimeDetectLimit: " + sliderTimeDetectLimit.Value;
                accelerometerProvider.SetTimeDetectLimit((long)sliderTimeDetectLimit.Value);

                sliderTimeDetectLimit.ValueChanged += (object sender, ValueChangedEventArgs e) =>
                {
                    labelTimeDetectLimit.Text = "TimeDetectLimit: " + e.NewValue;
                    accelerometerProvider.SetTimeDetectLimit((long)sliderTimeDetectLimit.Value);
                };

                labelTimeUpdateInterval.Text = "UpdateInterval: " + sliderTimeUpdateInterval.Value;
                accelerometerProvider.SetTimeUpdateInterval((long)sliderTimeUpdateInterval.Value);

                sliderTimeUpdateInterval.ValueChanged += (object sender, ValueChangedEventArgs e) =>
                {
                    labelTimeUpdateInterval.Text = "UpdateInterval: " + e.NewValue;
                    accelerometerProvider.SetTimeUpdateInterval((long)sliderTimeUpdateInterval.Value);
                };

                labelLaunchDetected.Text = "";
            }
        }
 public void SetForceDetectLimit(float limit) // IDeviceAcceleromter
 {
     accelerometerProvider.SetForceDetectLimit(limit);
 }