This paper investigates the optimization of the Attitude Determination and Control System (ADCS) for LAICE and CubeSail, two nanosatellites based on the Illinisat-2 bus. The ADC system is divided into two separate, but interlinked subsystems: attitude determination and attitude control. The coupled system is limited in available mass and power and must use inexpensive components. In the case of IlliniSat-2, the system uses the Earth's magnetic field for both attitude determination (through the use of a magnetometer) and for attitude control (through the use of magnetic torque coil actuators). Previous work has seen these two systems independently optimized. This study optimizes the coupled system to generate an optimal pointing method for IlliniSat-2 satellites. In these previous studies, it was assumed that there were no constraints on the duration or intensity of the magnetic torque utilization beyond the physical limits of the hardware in question. In this investigation, the energy stored in the battery and available for use by the ADCS will be considered.