well, viewpos returns the player's origin + 60 added to Z coordinate. So, they are basically the same thing. You simply have to take 60 units off the Z coordinate.
Confirmed, although viewpos uses integers.
Also, +11 for prone and +40 for crouch
"Does not work" is an error report for a bug between keyboard and chair.