Good idea!
Just a couple of other notes before I forget:
- The angle returned by GetOrientation() is in 0.1 degrees, so divide by 10
- The Y coordinate should be reversed (negated) to get into a conventional cartesian coordinate space
- The KiCad code can be used as a reference https://github.com/KiCad/kicad-source-mirror/blob/master/pcbnew/exporters/gen_footprints_placefile.cpp#L423