Advanced temperature compensation