## 1 Introduction  
Rendezvous maneuvers are a fundamental step for space exploration, and autonomous rendezvous and proximity operations have been expanded over the last decades. Since the beginning of the space era, orbital manned rendezvous and docking maneuvers have been studied and tested, in the Gemini program [1], with the purpose to dock two spacecraft to be able to reach the Moon, land on it, and safely return the crew on Earth in the Apollo program [2]. Cooperation between the United States and Russia made possible the rendezvous and docking of two space vehicles of completely different concepts, such as in the Apollo-Soyuz Test Project [3]. More recently, automated missions to bring supplies to the International Space Station (ISS) have been continuously flying, involving different type of spacecraft (ATV (Ariane Transfer Vehicle) [4], HTV (H-II Transfer Vehicle) [5], Progress [6], Cygnus [7], and more). Since these are unmanned spacecraft, an automated rendezvous mission has to be successfully completed. This brief introduction emphasizes the importance of manned and unmanned rendezvous missions. Recent studies concern the use of unmanned spacecraft in orbital servicing missions, such as the on-orbit refueling of telecommunication satellites, to extend their operational life (the operational life of many satellites is usually limited due to expired propellant, required for station-keeping) or space tugs [8; 9; 10]. In both cases, since such spacecraft are unmanned, a robust flight software must be developed. Even though the ground segment has the role of mission director in automated missions too, a number of unexpected events may appear, and have to be managed; namely, (i) unforeseen orbit crossing of small objects, such as moving of robotic arms in an ISS (International Space Station) scenario; (ii) delays or lack of communication with the control center; and (iii) environment disturbancesand sensor noise. All the events described before have to be taken into account and the Guidance, Navigation and Control (GNC) software must be able to react properly. For this purpose, a robust and accurate simulation tool is very useful to develop and test GNC software. The objective of the present work is the development of a six degree-of-freedom (dof) orbital simulator and the design and implementation of guidance and control algorithms, able to avoid obstacles. The approach proposed for the guidance algorithm is based on the theory of artificial potential fields with a paraboloid-based shape. For the control algorithms, for both position and attitude dynamics, sliding mode controllers (SMC) are proposed. The orbital simulator is written in C, as well as the GNC software. Communications between the simulation block and the on-board software block is allowed by a proper Transmission Control Protocol (TCP). Two separates algorithms are implemented: (i) one related to the simulator and (ii) one related to the GNC system, to design a flight software as close as possible to the \"flyable\" format and to formally separate the physical simulation and the software component, as required by EASA (European Aviation Safety Agency) standards [11]. A local connection is considered in which the six dof simulator is the server and the GNC system is the client. The simulator sent sensor data to the GNC system and the GNC sent the input data, related to the thruster switch on and the reaction wheels' torque to the simulator. In this way, a two channel segment is considered, as for real space software, in which the space segment includes attitude and control systems and the ground segment has simulators and flight dynamics systems. Hardware constraints are also included. The examined case is a rendezvous maneuver, in which an active vehicle (Chaser) orbits kilometers away from a passive vehicle (Target) and it has to reach and, eventually, dock it.