def _compute_heading_difference_between_segments(segments):
	"""
	Compute the heading difference between segments, and add this
	information o each segment in the attribute
	`heading_difference_with_previous_segment`
	"""
	heading_difference = []
	previous_segment_heading = segments[0]['heading'].mean()
	for seg in segments:
		segment_heading = seg['heading'].mean()
		delta_heading = abs(previous_segment_heading - segment_heading)
		heading_difference.append(delta_heading.data)
		previous_segment_heading = segment_heading
	return heading_difference