## 2 KITSUNE Satellite
### Software  
#### 2.4.1 Camera Controller Board  
The RPi CM3+ on the CCB is where all the code scripts are written. It is installed with the GNU/Linux Ubuntu distribution version 18.04 operating system (OS) that is very compatible with the Application Programming Interface (API) of the CAM. C++ and Perl are used to communicate the RPi CM3+ with the CAM software and other subsystems (OBC and C-band). In addition, wildfire classification is executed using DL libraries. OpenCV version 4.4.0 and Tensorflow version 2.4.0 are installed in the RPi CM3+ to train the dataset and classify the input image based on a convolution neural network algorithm. The limited size of the random access memory (RAM) without graphics processing unit (GPU) of RPi CM3+ created a tight DL training process but may be possible by choosing the optimum CNN model and training parameters. A second option is to train the CNN algorithm using other computers or Colaboratory (Colab), generating a pre-trained model that can be used for classifying input images captured by the KITSUNE payload onboard the RPi CM3+. The classification step has no trouble running on RPi CM3+ as the process has lower computational costs than the training step. Finally, for KITSUNE, the second option is chosen to train the CNN model on Colab with more RAM and GPU availability. The CAM software, DL libraries, CNN pre-trained models, and code scripts are installed and organized in dedicated directories for smooth execution. Forty-nine percent of the 32-GB embedded multi-media card (eMMC) has been consumed, and the rest is reserved for flight image data. The size of the pre-trained models is 200 MB, which uses less than 1% of the memory on the RPi CM3+; however, the DL libraries are significantly heavy and utilize most memory. An erase-flash-memory command is also implemented in case there is no available space. The free memory could survive for around four months without erasing the eMMC for an image captured daily. Hence, the mission operation will be carefully coordinated in order to avoid any losses of images captured by the payload. The CAM codes are created based on the mission operation scenario. The entire mission case is an uplink capture command sent to the CubeSat in the first pass, the initial downlink command in the second pass, and the final downlink command in the third and following passes. The capturing command script worked to acquire six images in PNG (or JPG) file format with sensor parameters, such as resolution, gain, and exposure values. The full resolution of the payload is 6464 \(\times\) 4852 pixels, while the gain and exposure values can be input manually or automatically. Finally, the initial downlink retrieved six thumbnails and selected one PNG (or JPG) image in the following downlink satellite passes. Figure 3: KITSUNE main mission subsystems block diagram. The camera payload consists of two modes: target pointing and nadir pointing. The first mode is where the coordinates and time are provided from the orbital parameters of the CubeSat. The GS monitors the latitude and longitude of the satellite while the time is generated from the GPS onboard. Meanwhile, the nadir pointing is time-sensitive only. Therefore, both modes require a degree of high accuracy from the ADCS to point the payload to face Earth. After the photo was captured, KITSUNE would have the option to classify image data onboard or directly downlink to the GS. The DL algorithm can be executed by choosing these three CNN models: ShallowNet, LeNet, and MiniVGGNet. The classified result will be appended to the image. On the other hand, the downlink options are real-time and from the buffer memory. The real-time option is conducted through C-band communication. However, the second option has two possibilities: either C-band or UHF communication. Due to the limited speed of UHF (4800 bps), the thumbnail images are saved in the buffer memory of the transceiver before the mission downlink. Thus, it creates the feasibility of retrieving the images in a pass-time window.