Ok, enough of this "sonata form actually being rondo crap." If it's gonna be a rondo, why didn't he just call it Haydn Piano Rondo? Seriously!
Anyway, this composite 5 part rondo in D major is rather simplistic. Without delay Haydn leads us to the rounded binary A section. In the b part of the rounded binary A section, we have modulated to the dominant key of A major. After several authentic cadences we find ourselves back in the key of D major by the end of this section.
Bar 21 is the beginning of the B section of this composite rondo. We have modulated to the parallel minor key of D minor. Not much to comment here, but notice Haydn's humor when he throws in the out of place deceptive cadence.
Back to the A section.
The C section follows the circle of fifths in the opposite direction landing us in the key of G major. This section is full of half cadences, finally ending on a PAC sending us into an extensive transitional section that modulates us back to our tonic key of D major.
Haydn doesn't go down without a fight, the final repeat is not literal. The composer embellishes the A section and adds a terminative phrase the end instead of a coda to finish the piece.