# Development of a Datalogger for Submarine Glider: Integration of Fault-Tolerant Software Layers
(d) The diving and apogee states when the glider performs a sawtooth movement while capturing data from the marine ecosystem. During these states, a large volume of sensor data must be stored [4; 18]. The data obtained from gliders are so important and expensive to obtain that it is recommended to assess and retrieve information at regular intervals to minimize the risk of data loss or to detect data collection problems [19; 20]. The need for cheaper and more suitable storage systems for gliders is clear: submarine missions increasingly generate more information, and the development of specialized strategies or storage systems for this application is a necessity to reduce costs and ensure reliable data capture. The strategies are canalized in optimal samplings, capturing data according to the specific situation [21]. Some gliders are teleoperated and use umbilical cords to avoid problems when transmitting large amounts of data [22]. Other gliders [8; 23; 24] use hard disk drives; however, they are expensive and complicated to interface with electronic subsystems. The most economical and accessible technology currently used by gliders [5; 18; 25; 26] are SD cards; however, data storage errors cannot be controlled, and for marine applications where continuous storage is required, SD memory has random delays of more than 100 ms that can lead to loss of information [27]. NAND Flash memory chips are an interesting alternative solution, as their cost/density ratio is increasingly lower, they allow total control of all their processes, and their error correction module is designed based on this application. However, there are further considerations for a glider, and a more in-depth analysis of the problems that may arise is necessary in order to define the software layers. There are various layers and functions necessary for data storage in a glider: (a) The storage system for a glider must maintain information in the correct order for later reading. (b) The design, evaluation, and validation of a storage system represent a challenge for the operations of receiving, encoding, writing, reading, and erasing the information in a memory chip. (c) The data storage must be fail-safe in the event of loss of electrical energy; it must not store information in bad memory blocks, avoiding the corruption of information as a result of errors intrinsic to the storage system. (d) The sensor samples are taken from a master controller; however, it is important to have an efficient system for handling the data to be stored [28]. For this reason, we propose a novel design comprising different layers of software integrated into a datalogger, which is a type of storage system that is composed of a storage unit and a processing system. The datalogger ensures that the information collected by the sensors connected to the master controller is correctly stored. The system considers the different failure modes mentioned above that could affect the data storage. Before designing our datalogger, we carry out an analysis of the state of the art systems. There are several dataloggers, some for specific applications, others for general purposes. These have been used to validate prediction models based on environmental variables [25; 29; 30]. They have also been used in civil structures [31], livestock applications [32], biomechanical applications [33; 34], energy monitoring [35], and for the internet of things [36]. However, the aforementioned commercial and non-commercial data loggers do not have the characteristics mentioned in the previous paragraph which are necessary to manage the different failure modes that could damage storage in an underwater environment. In addition, a datalogger must adapt to different devices, so it must of a suitable weight and size for underwater gliders [1; 37]. These reasons justify the development of a tailor-made datalogger for the specific glider application.