I obtain the heading or yaw angle from a source which I am not allowed to modify, but when the angle goes more than +180 or -180, it interchanges either from 180 to -180 or the other way around. Any suggestion on how to overcome this drastic angle changes will be appreciated.
Here is the plot of angle changes over time,
Update after @Chuc comment, Here is what I feel like desired behaviour