## 3 Proposed Algorithms Explanation
### Cooperative Localization Free Energy Efficient Routing Protocol (Co-LFEER)
#### 3.2.2 Cooperation of Destination and Single Relay Nodes  
In the proposed Co-LEER protocol, cooperation of the DSN and the single RLN is involved in data packets forwarding. Thus, two copies of information bags are received at the DSN, i.e., one received directly via the source to DSN and the other via the RLN to DSN. Then, the two information bags are merged at the DSN through the MRC technique which converts these two data packets into one data packet. This is in the case when the final DNN is outside the field of the source node. If the final DNN is available inside the field of the source node, then the source node forwards the information bag directly to the final DNN. The BER threshold value is \(\leq\) 0.5. For every information packet, which is collected at the DSN, the protocol checks the BER threshold value. Whenever the information bag received at the DSN has the BER value \(\leq\) 0.5, the information bag is accepted and forwarded towards the next targeted node. If the information bag received has the BER \(>\) 0.5, then the DSN requests to RLN to send the information bag which it has. The RLN performs AF cooperation at each information bag and then sends it to the DSN. The DSN once again checks the BER threshold value. If it is not satisfied, then the DSN drops the data bag. If the information bag received at the DSN satisfies the BER threshold value, then the DSN accepts it and forwards it in the direction of the next targeted node. If the final DNN is not present in the field of the source node, then through multi-hopping information bags are forwarded towards the final DNN. The proposed Co-LEER algorithm is efficient to minimize the channel effects on the information bags by selecting such a DSN and RLN which have minimum BER, highest residual energy and the fewest hops amongst all the nearby nodes. This helps to achieve the maximum information bags at the final DNN by consuming less energy. We can practically implement the Co-LEER algorithm in battlefields and in defence monitoring for UWSNs, in which data loss is very critical. Figure 3: Data Transmission: (**a**) Cooperative Transmission; and (**b**) Direct Transmission. Figure 4: Flowchart of the LFEER and Co-LFEER. The flowchart of the LFEER and the Co-LFEER protocols is given in Figure 4. Firstly, network is initialized and for this purpose a hello packet is transmitted by the final DNN. With the help of hello packet, all the sensor nodes exchange their own information with each other. All the sensor nodes becomes familiar with each other regarding residual energy, number of hops and BER. Then, the information bags are generated by the source nodes. The goal of the framework is to send the maximum data packets toward the final DNN using the minimum energy. For this purpose, after the bags are generated, the source node has to find its nearby nodes. If found, it selects the DSN and RLN in its forwarding range based on the fitness function values. The data are forwarded in the direction of DSN. If the DSN and RLN nodes are not found, then source node sends a signal to the sink node. After receiving the data at the DSN, a BER checking process is set at each DSN. If the BER threshold is not satisfied by the packet received, then DSN requests to RLN to transmit its data. If BER threshold is satisfied, then the DSN checks if the final DNN is present in its range. If so, then data is forwarded to the final DNN. Otherwise, using multi-hopping, this process is repeated unless the final DNN is arrived. After receiving the data at the DSN through RLN, the DSN checks again the BER threshold on the packets which are received through RLN. If this time the BER is higher than the threshold, the DSN drops the packet. Otherwise, it looks for the final DNN if it is available in its range. Otherwise, multi-hopping continues. The combining of two or more packets at the DSNs through MRC technique is given by [33].