# TrackInk: An IoT-Enabled Real-Time Object Tracking System in Space
## 4 System Development and Evaluation
### Results  
In this section, we show the results obtained from our system. The desired mode of operation for the automated system is to follow the highest priority object which, was above the horizon. Our configuration has the following priority from highest to lowest: The ISS, Moon, and Sun. This denotes that if all three of these objects were above the horizon, the ISS would be the object to be followed, and if none were visible the apparatus would stay in its last location. The Moon and Sun were chosen as objects to follow due to their frequent visibility from Earth being visible by the opened eye, while the ISS was chosen as the largest artificial satellite.  
We tested our system both at night and during the day, and it was visually confirmed that the apparatus could properly point to the Moon and Sun. A time where both the Moon was visible and the ISS would fly over-head was determined, and a time-lapse video of the system was recorded. During this time-lapse, it could be seen that the Moon was rising, and with it the apparatus. After some time, the system switched to following the ISS, then moved back to the Moon. The timing of the system following the ISS was verified against NASA's \"Spot The Station\" website [71].  
The following figures are sent to ThingSpeak periodically: Roll, pitch, and bearing (from the IMU readings), device latitude and longitude (from the GPS sensor), satellite latitude and longitude (converted from TLE sets), and the system azimuth and elevation (to point to the satellite), and finally the control state of the system. There are only 8 fields that can be published via ThingSpeak. Thus a method of providing comma-separated values was utilised. For example, the satellite latitude and longitude were provided as a single field to ThingSpeak by combining the two values into a single string with a comma. The data was then split into the individual fields via a MATLAB script for data visualisation on Thingspeak. The main visualisations shown on ThingSpeak were the 3D orientation of TrackInk relative to magnetic north, the GPS location of TrackInk (zoomed out and zoomed in), the direction TrackInk is pointing, a control mode status indicator, and the location of the International Space Station.  
The location directly below the ISS can be seen in Figure 6, as displayed on the ThingSpeak server. In this figure, it can be seen between South Africa and Antarctica. Next, the location of the apparatus can be seen in Figure 7, also displayed on the ThingSpeak server. Finally, the 3D rotation of the apparatus can be seen in Figure 8, where positive X is north, positive Y is west, and positive Z is away from the Earth.  
There are additional fields that contain the raw data, some of which are 'combined' values, e.g., the ISS GPS coordinates, which have two values in the same field separated by a comma. These combined values need to be interpreted by MATLAB to obtain the complete information encoded in them.  
Figure 5: Moon, Sun, Mars, and ISS local elevations, azimuths, and distances. The elevations for the Sun and Mars are positive, meaning they were visible from the horizon at the time of measuring, while the ISS and moon were below the horizon. (DEG = Degrees).  
the end of this plot. This is due to the nearly circular orbit of the ISS, in which the latitude will follow a sinusoidal curve. It can also be seen that the latitude has a minimum value of just below \(-50^{\circ}\), which is expected, since the orbital inclination of the ISS is \(51.6^{\circ}\)[72]. It should also be noted the gaps in data-points from around 12:01-12:09 and around 12:18 are from the program being restarted.  
The elevation of the tracked satellite relative to the apparatus is also plotted, with the elevation of the body illustrated in Figure 10. In this plot, it can be seen that the Moon was being tracked. It can be noted that over time, the Moon is setting what appears to be a linear trend, with some slight variations, and this is due to noise from the IMU.