Design and Development Graphical User Interface on Inertial Navigation System of Submarine

This paper discusses an underwater vehicle named Kapal Tempur Bawah Air (KTBA). This vehicle needs INS and GPS to know attitude, orientation, acceleration, velocity, and position. INS can provide attitude and movement data as well as long distance. INS on KTBA is implemented using Sublocus inertial sensor developed by Advanced Navigation. To know the navigation data, needed a process called interfacing. This process need a processor to read the data from inertial sensor. The processor to be used is Raspberry Pi 3 Model B. Besides data processing, need a user interface for the process that occurred. Therefore, this paper designed a Graphical User Interface for inertial navigation system. This interface design uses PyQt libraries with Python programming. The GUI testing is done by calculating the frame rate per second. The test results have different 56.83 % between Personal Computer and


I. INTRODUCTION
PT Bhimasena Research and Development is developing an underwater vehicle project in the form of diving vehicles called KTBA (Kapal Tempur Bawah Air) and Diver Propulsion Vehicle (DPV). These two projects have in common, both of which have INS (Inertial Navigation System) which is used to determine the direction of the vehicle while in the sea.
As one of the Indonesian Navy's efforts to maintain the country's resilience, lately the KTBA Kopaska Navy has often used its duties in underwater sabotage of enemy installations. This vehicle serves as a tool to support defense missions, security surveillance, and underwater Search and Rescue SAR. The KTBA serves to minimize the difficulties faced by Kopaska personnel while diving and swimming long distances to infiltrate the opponent's area with heavy combat equipment loads. KTBA need INS and GPS to know attitude, movement, speed, and position. Navigation of the vessel is the most important part of the vehicle to reach its destination [1]. INS can provide attitude and movement data and approximate speed and position when the GPS signal is lost in the water. The principle of inertial navigation is the measurement of acceleration. This acceleration is then integrated into velocity. The velocity is then integrated into position [2]. INS on KTBA is implemented using Sublocus inertia sensor developed by Advanced Navigation.
To read data from the sensor, needed a processor as an interface tool. The processor that be used is Raspberry Pi 3 Model B. Raspberry Pi is a singleboard with extensive peripheral communication capabilities [3]. Besides USB (Universal Serial Bus) communication interface, Raspberry Pi has a GPIO (General-Purpose Input/Output) pin that supports the I2C (Inter-Integrated Circuit) communication protocol and the SPI (Serial Peripheral Interface) protocol.
Besides data processing, an interface is designed to monitoring that can integrate the inertial navigation system on this vehicle. Interface software developed to interact with user and GUI (Graphical User Interface) implemented in PyCharm software is used to display data orientation, position, velocity, acceleration, depth, g force, status filter, system status, framerate etc.

A. Inertial Navigation System
INS stands for inertial navigation system. An inertial navigation system can provide position and velocity similar to GPS but with some big differences. The principle of inertial navigation is the measurement of acceleration. This acceleration is then integrated into velocity. The velocity is then integrated into position. Due to noise in the measurement and the compounding of that noise through the integration, inertial navigation has an error that increases exponentially over time. Inertial navigation systems have a very low relative error over short time periods but over long time periods the error can increase significantly.
Inertial navigation system is an important part in determining the position of the vehicle. This navigation method is widely used for robots, airplanes, submarines, and spacecraft. The main purpose of the navigation system is to follow the object's position continuously. INS provides measurements with an accelerometer and a gyroscope to track the position and orientation of an object relative to the starting point, orientation, and speed. As a dead-reckoning navigation, INS requires alignment to determine the initial conditions before operating. Initial velocity and position can be easily obtained by using an external reference navigation system such as Global Positioning System (GPS). Dead-reckoning is the process of estimating the position of the system using the previous position (the coordinates provided by the GPS system) and then 1 Amirotul Khoiro and Imam Arifin are with Department of Automation Electrical Engineering, Institut Teknologi Sepuluh Nopember, Surabaya, 60111, Indonesia. E-mail: amirotulkhoiro@gmail.com. 2 Mahardhika Pratama is with School of Computer Science and Engineering, Nanyang Technological University (NTU), Singapore. International Conference on Engineering, Advance Science and Industrial Application (ICETESIA) 2018 September 6-7 2018, Institut Teknologi Sepuluh Nopember, Surabaya, Indonesia calculating the new position based on the perceived movement of the system [4].
Sublocus is an underwater inertial navigation system that provides accurate position, speed and orientation at depth of up to 3000 meters. This sensor is developed by Advanced Navigation which is an Australian company that focuses on technology and underwater navigation. The sublocus features a gyroscope-fiber-optic locator north direction of high accuracy, accelerometer, internal GPS receiver and pressure depth sensor [2]. The physical form of Sublocus inertial sensors shown in Figure 1. Sublocus is an autonomous underwater vehicle navigation [5]. This sensor has high accuracy and security makes it ideal for control use also provides the ability to perform system settings, obstacle avoidance and control of fully autonomous points.
Sublocus features veru high performance inertial sensors combined with Advanced Navigation's revolutionary fusion agorithms. This allow it to provide highly accurate position, velocity, roll, pith, and yaw. Sublocus can provide underwater position accuracy of 0.08% distance travelled [2]. Communications to the Sublocus unit via the main interface (COM1) is present in the Advanced Navigation Packet Protocol (ANPP). The RS232 or RS422 format is set to 1 start bit, 8 bit data, 1 stop bit and no parity. ANPP is a binary protocol designed with high error checking, high efficiency and safe design practices. The protocol has a well-defined specification and is very flexible. The data types used in packet protocols are all data types in the protocol.

B. Global Positioning System
GPS stands for global positioning system. GPS consists of a number of satellites in space that broadcast navigation signals. These navigation signals can be picked up by a GPS receiver on the earth to determine that receiver's position and velocity.
GPS is excellent for navigational purposes and provides fairly accurate position (2 metres) and velocity (0.03 metres/second). The main drawback of GPS is that the receiver must have a clear signal from at least 4 satellites to function. GPS satellite signals are very weak and cannot penetrate though water and other obstacles. In underwater navigation the main purpose of GPS is to determine the starting position of the system before it submerges and also correct for any errors that may have accumulated each time it surfaces.

C. The Sensor Coordinat Frame
Inertial sensors have 3 different axes: X, Y and Z and these determine the directions around which angles and accelerations are measured. It is very important to align the axes correctly in installation otherwise the system won't work correctly. These axes are shown in Figure 2 with the X axis pointing forwards, the Z axis pointing down and the Y axis pointing starboard.

D. Roll, Pitch, Yaw
Orientation can be described by the three angles roll, pitch and heading, these are known as the Euler angles. The rotation axes of roll, pitch and heading are shown visually in Figure 3. The arrow indicates the positive rotation direction. Roll is the angle around the X axis and is zero when the unit is level. Pitch is the angle around the Y axis and is zero when the unit is level. Heading is the angle around the Z axis and is zero when the positive X axis is pointing to true north.

E. Geodetic Coordinat System
The geodetic co-ordinate system is the most popular way of describing an absolute position on the Earth. It is made up of the angles latitude and longitude combined with a height relative to the ellipsoid.

International Conference on Engineering, Advance Science and Industrial Application (ICETESIA) 2018
September 6-7 2018, Institut Teknologi Sepuluh Nopember, Surabaya, Indonesia Latitude is the angle that specifies the north to south position of a point on the Earth's surface. Longitude is the angle that specifies the east to west position of a point on the Earth's surface. The line of zero latitude is the equator and the line of zero longitude is the prime meridian. Figure  4 shows how latitude and longitude angles are used to describe a position on the surface of the Earth. Latitude and longitude give the 2D point on the surface of the Earth. These are combined with height to give the 3D position on the Earth.
Height is the height above the WGS84 reference ellipsoid. The WGS84 reference ellipsoid is a model used to approximate sea level across the Earth. Therefore the height should be considered approximately relative to sea level. Due to the approximate nature of the WGS84 model, the WGS84 height will not be the same as the actual sea level. For example, in Australia, the WGS84 height at sea level is 9 metres at some points.

F. NED Coordinat Frame
The NED (North East Down) co-ordinate frame is used to express velocities and relative positions. The origin of the co-ordinate frame can be considered the current position. From that origin, the north axis points true north and parallel to the line of latitude at that point. The east axis points perpendicular to the north axis and parallel to the line of longitude at that point. The down axis points directly down towards the centre of the Earth. See Figure 5 for a graphical representation of the NED coordinate frame at a position on the Earth.

G. ECEF Coordinat Frame
The ECEF (Earth-centred earth-fixed) co-ordinate frame is a Cartesian co-ordinate frame used to represent absolute positions on the Earth. It's origin is at the centre of the Earth. ECEF is an alternative to the geodetic co-ordinate frame. It is represented by the three axes X, Y and Z which are presented graphically in Illustration 6. ECEF positions can be retrieved from Advanced Navigation products however the geodetic system is used as the default.

III. EXPERIMENTAL SETUP
Sublocus inertial sensor is given a voltage source of 24 V from the battery. Sublocus is connected to the GPS antenna, which is subsea Poseidon to be able to retrieve GPS data in Sublocus shown Figure 6. There is a main cable which is divided into four parts. The part used is the primary cable that uses RS422 serial communication. The RS422 cable is connected to a USB to RS422 converter, then USB is connected to the USB port on the Raspberry Pi. The GUI processed on Raspberry Pi is then displayed on the underwater monitor.
Sublocus also connected to the RS422 cable and connected to a USB converter that is USB to RS422, then the USB cable goes to the USB port on the Raspberry Pi, from Raspberry Pi connected to an HDMI cable to the underwater monitor.
Sublocus can display many data packets that are not all required. The data on Sublocus consists of several packages of ANPP (Advanced Navigation Packet Protocol). To know the data, then it takes a view of Graphical User Interface that can facilitate the user (user) during being in KTBA.
This program contains serial reading of USB port using PySerial library. USB port on Personal Computer named COM, while on Raspberry Pi named devtty. When USB is detected, data goes in serial buffer. At this stage data entry buffer and accommodated by ANPacket Decoder. This decoder has a header size of 5 bits and a maximum of 255 bits, and a buffer size of 8 bits. After going through the decoding process, data goes to ANPP belonging to the Sublocus inertia sensor. Package shown that includes ANPP Packet ID 20 with length of 112 bits and ANPP Packet ID 28 with length 48 bits for more details can be seen in Appendix B-12 for Data type ANPP, B-13 ANPP Packet 20, B-14 ANPP Packet 28. This program contains GUI design on Python programming using PyQt4 library. This design utilizes PyQt functions, mostly using Qt QPainter, QLineEdit, and QLabel.
In this design the use of QLabel is used to display Sublocus images. QLineEdit is used in the data viewer section. QCheckBox is a selection button that can be activated (checked) or turned off (unchecked). In this design the QCheckBox section is on the status menu. QPainter provides very optimal functions for doing most GUI programs. The GUI display using the PyQt4 library. In this design the QPainter section is found in all posts, lines, backgrounds, etc. QColor can provide colors based on RGB, HSV, or CMYK values. In this design the writing made by QPainter uses the QColor function.
QFile provides an interface for reading and writing files. QFile is an I / O device for reading and writing text and binary files. The process of storing data files during testing using the QFile function for the WriteOnly command. QIODevice is the basic interface class of all I / O devices in Qt. In this design the part that uses QTimer is to calculate the framerate.
Framerate on the GUI is derived from the total time count when the end of GUI processing is reduced by the time at which the GUI process starts. Used to ensure data rates from Sublocus inertial sensors can be viewed at the framerate speed when the GUI is run.
Data storage has been processed in the form of csv file. Calculation of data at 200 ms intervals. This data logging process utilizes the Qt QFile function for data storage and QTextStream for streaming data entered in files.

A. GUI using a Personal Computer
Tested using Personal Computer to know the program that has been made. (Figure 7 and 8) To determine the movement of Sublocus data values it is necessary to treat the movement according to its axis. When testing the roll value, Sublocus is tilted to the right and left. When testing the pitch value, Sublocus is lowered and pulled backwards from the starting position. And for testing the yaw value, Sublocus is rotated up to 360 °. The following is the result of Sublocus inertia sensor testing using Personal Computer shown in Table 1. To know the accuracy of data, the value of data reading by treatment. The visualization results of the treatment at Sublocus shown in Figure 9. From this graph shows the fluctuation data due to the treatment to prove the data orientation.

B. Testing GUI using Raspberry Pi
In this section the system is tested by using Raspberry Pi with a monitor screen in the form of underwater monitor. Underwater monitors are used because in a water diving vehicle that is outside can also enter inside the vehicle's diving space so that it requires a waterproof screen. To determine the movement of Sublocus data values it is necessary to treat the movement according to its axis. The treatments were similar to those used in the test using a PC. System testing and GUI display shown in Figure 10. To determine the movement of Sublocus data values it is necessary to treat the movement according to its axis. When testing the roll value, Sublocus is tilted to the right and left. When testing the pitch value, Sublocus is lowered and pulled backwards from the starting position. And for testing the yaw value, Sublocus is rotated up to 360 °. The following are the results of the inertia sensor Sublocus testing using the Personal Computer shown in Table 2. To know the accuracy of data, the value of data reading by treatment. The visualization results of the treatment at Sublocus shown in Figure 9. From this graph shows the fluctuation data due to the treatment to prove the data orientation.   Testing using PC framerate generated on the GUI is very large due to the influence of CPU clock and screen resolution. This test has the advantage that the GUI that is displayed is very good. However, the use of PC has a disadvantage, that is, it cannot support the system on KTBA. While testing using Raspberry Pi framerate produced smaller. But from these two computers, the computer that is most suitable for use in this dive vehicle is Raspberry Pi, because this computer is small in size and the features it has are very sufficient for the data processing system of this vehicle even though the GUI display on the Raspberry Pi is not as good as on a PC, because the result framerate can be seen properly by the user.
Based on the planning and testing carried out by the author, the next development of this system is an interface system that in addition to displaying data in the form of numbers will be better displayed in graphical form. Because the design that has been done only displays numbers and processes data. then the next development is expected to be able to perform an interface in the form of a GUI that