 volatile uint32_t rpm;
 volatile uint32_t angular_frequency; // In 0.1 degrees / second
 volatile int32_t delta_time_history[DELTA_TIME_HISTORY_LENGTH];
+volatile int32_t low_time_history[DELTA_TIME_HISTORY_LENGTH];
 volatile int32_t magnet_start_time = 0;
 volatile int32_t magnet_time_delta = 0;
 volatile int32_t revolution_time = 0;

		}

		noInterrupts();
		int send_size = sprintf(serial_send_buffer, "{\"ht\":%lu,\"ia\":%ld,\"ea\":%ld,\"ad\":%ld,\"cm\":%ld,"
				"\"rp\":%lu,\"st\":%d,\"af\":%lu,\"da\":%ld,\"nm\":%lu,\"tp\":%lu}\n",
			delta_time_history[0], ignition_angle, estimated_crank_angle, angle_delta, current_magnet, rpm,
			current_state, angular_frequency, dwell_start_angle, nr_of_magnets_passed, temperature);
		interrupts();
		Serial.write((uint8_t*)serial_send_buffer, send_size);

	}
	rpm = (60 * RPM_SMOOTHING_LENGTH) / (revolution_time_sum / 1000000.0);
	float angular_freq_dependent_pre_ignition = (float)pre_ignition_slope / PRE_IGITION_SLOPE_DIVISOR;
//	float ang_freq = 3600.0 / ((float)revolution_time_history[0] / 1000000.0);
	float ang_freq = rpm * 60;
	dwell_start_angle = 3600.0 - (pre_ignition_bias * 10) -
		ang_freq * (dwell_time + angular_freq_dependent_pre_ignition);
	ignition_angle = 3600.0 - (pre_ignition_bias * 10) -
