Is it possible to combine
DiscreteCallback while solving
ODEProblem? While the former checks if some real quantity attains a zero value, checking a simultaneous satisfaction of some additional logical/boolean constraint with the help the latter can be useful.
As an example, consider the bouncing ball example in the documentation. Can we add an additional condition for hitting the ground that would require that the vertical component of the ball velocity is negative (the ball is falling)? Perhaps it is redundant in this case (well, is it really guaranteed that during the “bouncing back” phase only a single crossing through zero is detected?) but in some other examples (of hybrid system) is can be necessary to condition triggering of some callback by an additional boolean condition.