# TrackInk: An IoT-Enabled Real-Time Object Tracking System in Space
## 5 Lessons Learned and Discussion  
Several future enhancements can be made to this system. To increase the tracking accuracy of the system, Computer Vision (CV) can be used to analyse images from a camera and give feedback to the system. The OpenCV library can be used to implement this feedback loop by detecting where the tracked object is within the camera frame and adjusting the positions of the servos accordingly. This system can function by taking the gray-scale picture from the camera and creating a mask for all pixels above a specified brightness, filtering out only the brightest pixels in the camera's field of view. Contours can be taken from this mask, and the largest object can be determined, which can be assumed to be the object that should be tracked. A bounding rectangle can be utilised to determine the centre of the object. This centre offset value can then be utilised as an offset which will be sent to the servos. It should be noted that this specific functionality would only work at night, while the system as a whole is able to function during the day. A picture of the Moon with the described CV algorithm can be seen in Figure 11, where the red line is the contour of the Moon, and the green box is the Moon's bounding rectangle. Figure 10: Tracked elevation of the Moon relative to TrackInk over time. A downward trend is visible as the Moon was setting at the time of recording this data. Visible noise in the data is due to variations in the IMU readings from user disturbances. Figure 9: ISS Latitude over a 30-min period. Notice the expected curvature as the latitude approaches \(-50^{\circ}\). There are further additional improvements with regard to the IMU sensor implementation. The gyroscope had issues with regards to drifting over time, while the magnetometer was very sensitive to environmental interference. In order to avoid these issues, a sensor fusion algorithm, e.g., a Kalman filter [73] could be used to further improve reliability and avoid any individual sensor's shortcomings. As system portability is important, a 2-cell Lithium-Ion battery was connected to the device with a voltage regulator. This allowed for a small-sized system to power the device. Additional energy harvesting systems could be implemented, e.g., the use of photo-voltaic panels, but were not implemented into this system due to their additional complexity. Note, the number of channels of data channels is limited to 8 on a free account on ThingSpeak. Our implementation of the project required that 10 channels of data would be uploaded (roll, pitch, yaw, latitude, and longitude of the device, elevation and azimuth of the tracked object, latitude and longitude of the ISS, and automated state of the device). This meant that some of the data must be combined into one field. This was done by separating data by commas in a given field. For example, the latitude and longitude coordinates of the ISS were joined into one channel, and later split into their given coordinates via a MATLAB visualisation. If further expansion and commercialisation of this project were done at scale, a paid ThingSpeak license would be acquired. The common format of satellite orbit was found in the format of a two line element set (TLE), containing an object's orbit, motion, and time data [28] and illustrated in Figure 12. CelesTrak provides updated TLE data infrequently, around once every 6 hours. The python library utilised propagates the old TLE using simplified perturbations models (SGP4) to get the current orbital information for a given satellite. The system described throughout this paper allows for a unique and flexible framework for applications in the space and sensor areas of research. Other similar systems have significantly higher cost and lack any portability [63; 65]. Despite this, the described framework is able to provide a qualitative analysis of following and indicating toward satellites and celestial bodies in the sky. One limitation within TrackInk is the tracking precision.