This is bad (TM) and won't even work on windows. There is an issue that arises from writing so many UAVO metadata objects at once, and then rewriting some of them immediately after. What happens is that the FC and GCS get out of sync. Without this nanosleep line, the magnetometer shows the correct flight telemetry period in GCS, but the FC has the wrong one.

I suspect that results will vary from computer to computer, so it's a double bad thing. What I really need to be doing is checking for successful writing of the metadata before continuing. Ideas?