The guidance algorithms and software utilized during the Apollo missions for lunar descent and landing had fundamental limitations that precluded real-time guidance and autonomous Hazard Detection and Avoidance (HDA). This was partially due to the lack of closed form guidance solutions for the major portion of the descent braking phase. Emergent Space Technologies, Inc. has designed and developed prototype automated real-time targeting and guidance (ARTGUID) software for precision lunar landing and descent. Optimal control theory was successfully applied to produce closed form guidance solutions for the major portion of the descent braking phase. Improvements were also made to the quartic closed form solutions used (from Apollo) for the remainder of descent. Formulations for vehicle attitude were also developed and implemented, allowing the evolution of the vehicle attitude to be modeled and understood. The closed form constant thrust solutions and the improved quartics enabled real-time landing site re-targeting, which was demonstrated in simulation. This real-time re-targeting capability will be a key technology for autonomous Hazard Detection and Avoidance (HDA) during any future lunar landing mission.