Design, implementation, and thermal modeling of embedded reconfigurable magnetorquer system for nanosatellites