Modelling And Correction Of The Non-Linear Transverse Dynamics Of The Lhc From Beam-Based Measurements