Estimation and filtering are important tasks in most modern control systems. These methods rely on accurate discrete-time approximations of the system dynamics. We present filtering algorithms that are based on discrete mechanics techniques (variational integrators), which are known to preserve system structures (momentum, symplecticity, and constraints, for instance) and have stable long-term energy behavior. These filtering methods show increased performance in simulations and experiments on a real digital control system. The particle filter as well as the extended Kalman filter benefits from the statistics-preserving properties of a variational integrator discretization, especially in low bandwidth applications. Moreover, it is shown how the optimality of the Kalman filter can be preserved through discretization by means of modified discrete-time Riccati equations for the covariance updates. This leads to further improvement in filter accuracy, even in a simple test example.