mutex for critical code sections
add config file support
calc quaternion avg