Made set_tnb_frame more general
All actual functional coding completed