CSTA

The basic theory behind CSTA is described here (Section 3.2), where a link to the implementation is also available.