In-Orbit Results and Attitude Analysis of the SNUGLITE Cube-Satellite

: SNUGLITE (Seoul National University Global navigation satellite system Laboratory satellITE) is a two-unit cube satellite (CubeSat) with dimensions 10 × 10 × 23 cm that requires an attitude system for missions and ground station telecommunication. A linear-quadratic-Gaussian-based optimal attitude system for the CubeSat platform has been developed using low-cost sensors, with the in-orbit veriﬁcation of the attitude system being is one of main study objectives. Since launch, the SNUGLITE CubeSat has continuously broadcast in-orbit status information. In this study, a methodology for the analysis of in-orbit attitude estimation results using received data is presented, and this was achieved by comparing two sun-pointing vectors, i.e., the sun-pointing vector calculated using estimated attitude with the positions of the sun and the satellite and the reference vector generated by the power levels of the solar panels. Because the satellite position was required for the attitude analysis, the veriﬁcation of the performance of the own-developed on-board Global Positioning System (GPS) receiver is also brieﬂy described. Analyses indicate that the attitude estimation of the SNUGLITE CubeSat has achieved an in-orbit real-time pointing accuracy with a root mean square of 6.1 ◦ .


Introduction
A cube-satellite (CubeSat) standard has been developed for the design of pico-satellites and nano-satellites, with the objectives being to reduce cost and development time, increase accessibility to space, and sustain frequent launches [1]. The CubeSat platform allows students to conceive, design, implement, test, and operate a complete spacecraft in space, often using commercial off-the-shelf (COTS) components for educational purposes [2,3], and it also allows developers to test payloads and platforms in orbit at a reasonable price. Various missions and projects have been performed using CubeSats for scientific, private and government purposes, and the number of launches and operations is on the rise [4]. MinXSS-1 CubeSat's science objective is to measure the soft x-ray energy distribution from the sun [5]. The primary mission goal of CSTB1 was to accelerate the maturity of components and subsystems, as well as to accelerate the infrastructure and operations of the CubeSat platform [6]. The primary objective of the Radio Aurora Explorer (RAX) mission is to study the formation of magnetic field-aligned plasma irregulars in the polar lower ionosphere [7,8]. The main performance for the CubeSat platform. The attitude systems of the RAX-1 and RAX-2 CubeSats were quantified by the state error covariance of the estimation filter without reference attitude [8]. Camera images were utilized to generate the reference attitude [6,9]. However, the number of image samples (less than 15 samples) was not sufficient to evaluate the attitude estimation performance. In this study, the estimation performance was investigated by comparing two sun-pointing vectors: the calculated sun-pointing vector by estimated attitude and the reference sun-pointing vector by the generated power levels of the solar panel on each side. Therefore, a sufficient number of samples of reference attitude were considered for the estimation analysis. To generate the sun-pointing vector in the body-frame using the estimated attitude, we utilized the filtered results of the magnetometers, gyroscopes, and photodiodes, as well as the positions of the satellite and the sun. For the reference vector, power levels, which are independent measurements from the photodiodes-although both measure the strength of the sunlight-were normalized to point to the sun in the body-frame. Error vectors between two sun-pointing vectors and their difference in angle were mainly investigated for the performance analysis of the attitude estimation.
To calculate the sun-pointing vector utilizing estimated attitude, the position of the CubeSat was determined from the results of the GPS receiver. Because the GPS receiver was newly developed for the SNUGLITE CubeSat, its validation was also required. Given that the fundamental operability of GPS receivers has already been presented [18], this paper describes newly found characteristics, such as altitude variations by perturbations.
This paper describes the results of the technical mission of the SNUGLITE CubeSat. A brief introduction to the SNUGLITE project is given, and the specification of the CubeSat, payloads, and the structure of broadcasting data are included in Section 2. The attitude system of the SNUGLITE CubeSat is described, and a method to analyze the performance of the attitude estimation is also presented in Section 2. Subsequently, the GPS data received from the SNUGLITE as well as the status of the CubeSat are presented in Section 3. In-orbit results of the attitude estimation are also evaluated and discussed in Sections 3 and 4, respectively. In Section 4 (Discussion), the attitude system is also compared with that of previous studies. Finally, Section 5 summarizes the study and provides suggestions for future work.

SNUGLITE CubeSat Project
SNUGLITE's shape is described in Figure 1. The project was selected at the 2015 CubeSat competition by the Korea Aerospace Research Institute. After three years of development, SNUGLITE was launched on December 3, 2018. It settled successfully in the target orbit, which is sun-synchronous at an altitude of 575 km. SNUGLITE's designated satellite number given by the North American Aerospace Defense Command (NORAD) is 43,784.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 3 of 18 performance for the CubeSat platform. The attitude systems of the RAX-1 and RAX-2 CubeSats were quantified by the state error covariance of the estimation filter without reference attitude [8]. Camera images were utilized to generate the reference attitude [6,9]. However, the number of image samples (less than 15 samples) was not sufficient to evaluate the attitude estimation performance. In this study, the estimation performance was investigated by comparing two sun-pointing vectors: the calculated sun-pointing vector by estimated attitude and the reference sun-pointing vector by the generated power levels of the solar panel on each side. Therefore, a sufficient number of samples of reference attitude were considered for the estimation analysis. To generate the sun-pointing vector in the body-frame using the estimated attitude, we utilized the filtered results of the magnetometers, gyroscopes, and photodiodes, as well as the positions of the satellite and the sun. For the reference vector, power levels, which are independent measurements from the photodiodes-although both measure the strength of the sunlight-were normalized to point to the sun in the body-frame. Error vectors between two sun-pointing vectors and their difference in angle were mainly investigated for the performance analysis of the attitude estimation.
To calculate the sun-pointing vector utilizing estimated attitude, the position of the CubeSat was determined from the results of the GPS receiver. Because the GPS receiver was newly developed for the SNUGLITE CubeSat, its validation was also required. Given that the fundamental operability of GPS receivers has already been presented [18], this paper describes newly found characteristics, such as altitude variations by perturbations.
This paper describes the results of the technical mission of the SNUGLITE CubeSat. A brief introduction to the SNUGLITE project is given, and the specification of the CubeSat, payloads, and the structure of broadcasting data are included in Section 2. The attitude system of the SNUGLITE CubeSat is described, and a method to analyze the performance of the attitude estimation is also presented in Section 2. Subsequently, the GPS data received from the SNUGLITE as well as the status of the CubeSat are presented in Section 3. In-orbit results of the attitude estimation are also evaluated and discussed in Sections 3 and 4, respectively. In Section 4 (Discussion), the attitude system is also compared with that of previous studies. Finally, Section 5 summarizes the study and provides suggestions for future work.

SNUGLITE CubeSat Project
SNUGLITE's shape is described in Figure 1. The project was selected at the 2015 CubeSat competition by the Korea Aerospace Research Institute. After three years of development, SNUGLITE was launched on December 3, 2018. It settled successfully in the target orbit, which is sun-synchronous at an altitude of 575 km. SNUGLITE's designated satellite number given by the North American Aerospace Defense Command (NORAD) is 43,784.  SNUGLITE is a 2-unit CubeSat whose specifications are described in Table 1. One of the scientific missions of the SNUGLITE CubeSat is to monitor the disturbance of the ionosphere and the magnetic field by seismic events, such as earthquakes, volcanoes, and tsunamis. SNUGLITE has two dual-frequency GPS receivers. The first receiver, which is for satellite positioning, has its antenna mounted at the top of the satellite in the −z direction of Figure 1 to the zenith direction. The second GPS antenna is mounted on the side of the CubeSat in the +y direction in order to measure the ionospheric delay on the path from other GPS satellites to the SNUGLITE. One of the technical missions of the SNUGLITE CubeSat is to verify the in-orbit operation of the on-board L1/L2C GPS receivers, which we developed in co-operation with TelAce Inc. (Seoul, Korea). The receivers are shown in Figure 2. Another technical objective is to develop an LQG-based attitude system. Appl. Sci. 2020, 10, x FOR PEER REVIEW 4 of 18 SNUGLITE is a 2-unit CubeSat whose specifications are described in Table 1. One of the scientific missions of the SNUGLITE CubeSat is to monitor the disturbance of the ionosphere and the magnetic field by seismic events, such as earthquakes, volcanoes, and tsunamis. SNUGLITE has two dual-frequency GPS receivers. The first receiver, which is for satellite positioning, has its antenna mounted at the top of the satellite in the −z direction of Figure 1 to the zenith direction. The second GPS antenna is mounted on the side of the CubeSat in the +y direction in order to measure the ionospheric delay on the path from other GPS satellites to the SNUGLITE. One of the technical missions of the SNUGLITE CubeSat is to verify the in-orbit operation of the on-board L1/L2C GPS receivers, which we developed in co-operation with TelAce Inc. (Seoul, Korea). The receivers are shown in Figure 2. Another technical objective is to develop an LQG-based attitude system. Since launch, the SNUGLITE CubeSat has continuously broadcast its status data in beacons. Ground stations in Asia, Europe, North America, and South America have been receiving the beacons. The ground facility for the SNUGLITE team was constructed in Seoul National University using a conventional amateur satellite transceiver, antenna modules, and amplifiers to communicate with the satellite.
However, an uplink problem occurred, and the SNUGLITE CubeSat became unresponsive to tele-commands from the ground station. Given that commands from the ground station are required Since launch, the SNUGLITE CubeSat has continuously broadcast its status data in beacons. Ground stations in Asia, Europe, North America, and South America have been receiving the beacons. The ground facility for the SNUGLITE team was constructed in Seoul National University using a conventional amateur satellite transceiver, antenna modules, and amplifiers to communicate with the satellite.
However, an uplink problem occurred, and the SNUGLITE CubeSat became unresponsive to tele-commands from the ground station. Given that commands from the ground station are required to initiate the scientific mission, the SNUGLITE CubeSat has not proceeded to 'observation mode' for ionosphere and magnetic field monitoring, and it is currently in standby mode.
Though a problem has occurred in performing the scientific mission, the analysis of the attitude system can be still be performed using the received status data, as they include the estimated attitude, the calculated position and velocity measured by GPS receivers, and other related information.

Attitude System Configuration
The attitude system of the SNUGLITE was programmed to maintain the +z direction of the body-frame, as described in Figure 1, pointing to the nadir-direction and the +x direction of the body-frame aligned along-track with the orbit. The LQG-based attitude system was designed using coarse sun-sensors, a 3-axis magnetometer and a 3-axis gyroscope as sensors, and 3-axis magnetorquers as actuators [16,19]. A triple-axis MEMS MPU-3300 gyroscope by InvenSense and an HMC5843 low-cost three-axis magnetometer by Honeywell are utilized. Five SLCD-61N8 photodiodes are attached to the solar panels at +x, −x, +y, −y, and −z sides to work as coarse sun-sensors. The dipole momentum of the utilized magnetorquers is approximately 0.038 Am 2 , and three magnetorquers are integrated into the solar panels at each axis.
The block diagram for the SNUGLITE attitude system is shown in Figure 3. Position, velocity, and time were input into DE405 and IGRF12 models to generate reference vectors of the sun vector and the magnetic field vector. DE405 is NASA's Development Ephemeris, and IGRF12 is a model of the International Geomagnetic Reference Field. Measurements from the coarse sun-sensors, magnetometer, and gyroscope, were compared to the reference vectors for attitude estimation. The 3-axis magnetorquers acted as the actuators for the SNUGLITE CubeSat. Sensing cannot be conducted when the magnetorquers are in operation, because both attitude determination and control utilize magnetic information. Therefore, sensing and actuating of the magnetic field are performed alternately every other second. Algorithms of the attitude system are implemented in the onboard computer, a 32-bit AVR32 processor. In the SNUGLITE CubeSat, the attitude, the command, and the data handling processes are conducted on the same computer in real-time.
In this paper, we describe the attitude estimation by using an EKF in an LQG-based attitude system. The derivation and detailed description of the attitude control algorithm are given in [17].
Appl. Sci. 2020, 10, x FOR PEER REVIEW 6 of 18 HMC5843 low-cost three-axis magnetometer by Honeywell are utilized. Five SLCD-61N8 photodiodes are attached to the solar panels at +x, −x, +y, −y, and −z sides to work as coarse sun-sensors. The dipole momentum of the utilized magnetorquers is approximately 0.038 Am 2 , and three magnetorquers are integrated into the solar panels at each axis. The block diagram for the SNUGLITE attitude system is shown in Figure 3. Position, velocity, and time were input into DE405 and IGRF12 models to generate reference vectors of the sun vector and the magnetic field vector. DE405 is NASA's Development Ephemeris, and IGRF12 is a model of the International Geomagnetic Reference Field. Measurements from the coarse sun-sensors, magnetometer, and gyroscope, were compared to the reference vectors for attitude estimation. The 3-axis magnetorquers acted as the actuators for the SNUGLITE CubeSat. Sensing cannot be conducted when the magnetorquers are in operation, because both attitude determination and control utilize magnetic information. Therefore, sensing and actuating of the magnetic field are performed alternately every other second. Algorithms of the attitude system are implemented in the onboard computer, a 32-bit AVR32 processor. In the SNUGLITE CubeSat, the attitude, the command, and the data handling processes are conducted on the same computer in real-time.
In this paper, we describe the attitude estimation by using an EKF in an LQG-based attitude system. The derivation and detailed description of the attitude control algorithm are given in [17].

Onboard Attitude Determination Algorithm
Sensing measurements from the gyroscope, magnetometer, and coarse sun-sensors must be calibrated properly for attitude estimation. The magnetometer hard-iron and soft-iron calibration was done before shipping to the launch site. In addition, temperature, and current compensation by power generation by the solar panels were also considered for magnetometer sensing [17]. The sine curvature of the photodiodes for the coarse sun-sensors was calibrated based on experimental results [20]. For gyroscope measurements, biases at each axis were implanted in the estimation filter as states. A real-time calibration process for the biases is performed in orbit.
EKF was utilized as shown in Equations (1)-(4), which represent the states of the filter:

Onboard Attitude Determination Algorithm
Sensing measurements from the gyroscope, magnetometer, and coarse sun-sensors must be calibrated properly for attitude estimation. The magnetometer hard-iron and soft-iron calibration was done before shipping to the launch site. In addition, temperature, and current compensation by power generation by the solar panels were also considered for magnetometer sensing [17]. The sine curvature of the photodiodes for the coarse sun-sensors was calibrated based on experimental results [20]. For gyroscope measurements, biases at each axis were implanted in the estimation filter as states. A real-time calibration process for the biases is performed in orbit.
EKF was utilized as shown in Equations (1)-(4), which represent the states of the filter: Appl. Sci. 2020, 10, 2507 where q is the quaternion vector, ω is the vector of three-axis angular velocity, and b is the bias vector of gyroscopes. The non-linear system equation for the estimation is expressed as Equation (5), and Ω(·) is defined as Equation (6).
where ω B LB is the angular velocity of the body frame with respect to the local frame, I is the moment of the inertia dyadic of the SNUGLITE CubeSat, µ is the magnetorquer vector for control input, and B is the strength of the local magnetic field. η drift and η bias are the process noises for the system equation.
The system can be expressed as Equation (7). The process noises include various disturbances; however, they are modeled as Gaussian white noise in Equations (8) and (9).
where σ gg is the process noise from the gravity gradient, σ sr is the process noise from the solar radiation pressure, σ ad is the process noise from the air drag, and σ mdt is the process noise from the residual dipole moment. σ rrw is the rate random walk process noise. Detailed values and descriptions for the criteria related to the variance matrix Q can be found in [17]. The non-linear measurement equations are shown in Equations (10)- (14).
where z is the measurement state vector, B meas is the measurement vector of the 3-axis magnetometer, s meas is the coarse sun-sensor vector, and ω meas is the vector measured by the 3-axis gyroscope. R β α is the rotation matrix from the α-frame to the β-frame. B IGRF is the local magnetic field based on the IGRF-12 model, and s DE405 is the sun vector calculated from the DE405 model. The satellite position utilized for IGRF and DE405 is calculated based on information given by the on-board GPS receiver. The variance matrix for R is formed as Equation (14) considering Gaussian white noise. In Equation (14), σ sun and σ arw are the sun sensor measurement noise and angular random walk measurement noise, respectively. The setting values for matrix R are described in [17].
Using Equations (7) and (10), the linearized system equations for the EKF can be described by Equations (15) and (16), and the measurement equations for the EKF can be described by Equations (17) and (18), respectively. .
where F and G in Equation (15) are partial derivatives of f (x(t), µ(t)) with respect to x and u, respectively. Г is a partial derivative of w with respect to η. H in Equation (17) is a partial derivative of h(x) with respect to x. The continuous EKF is discretized using the first-order Van-Loan algorithm, as described in [21], to consider the processing capacity of the onboard computer. When the magnetorquers are in operation, the magnetometer vector in Equation (11) is excluded during measurement update because the magnetorquer influences the measurements of the magnetic sensor. Similarly, the sun sensor vector in Equation (11) is also excluded during measurement update in the eclipse area. Further descriptions of how the EKF was developed and calculated may be found in [22].

Attitude Estimation Analysis Method
The full beacon from the SNUGLITE CubeSat includes estimated satellite attitude, as described in Table 2. However, it is required to generate any reference for the performance analysis of the attitude estimation. In this paper, the amount of power generated on each side of the CubeSat was utilized to form the reference sun vector in the body frame. The reference sun vector by power generation is compared to the estimated sun vector generated by the estimated attitude, as well as the positions of the satellite and the sun at each epoch. Detailed steps are described below in Equations (19)-(27).
The reference sun vector can be generated as where s body meas. is a reference sun-vector andŝ body meas. is a unit reference sun-vector. P x meas. , P y meas. , and P z meas.
denote generated powers at each axis calculated using the solar-panel input voltages and currents listed in Table 2. T x+ , T x− , T y+ , and T y− denote the temperatures of each solar panel in the body-frame, as described in Table 2. 'sign' in Equation (19) is a function to return the sign of a number. According to the power module structure in the full beacon, ground users would know the amount of power generation at each axis. The temperatures of the solar-panel are needed to distinguish the side of the axis that is facing the sun. It is primarily correct to assume that the temperature of the solar panel facing the sun is high. As there is no solar panel in the z+ side, power generation at the z-axis is always from the z− solar panel. C x , C y , and C z are the number of solar cells on each side. They were used to normalize the power generation on each side to generate the unit sun-pointing vector. C x is four, and C z is one because there is only one solar cell in z− solar panel, as shown in Figure 1. C y is selected based on which side Appl. Sci. 2020, 10, 2507 9 of 17 between y+ and y− is facing the sun as in Equation (21) because there is one less solar cell in the y+ direction on which to mount the GPS antenna.
The estimated sun vector is derived as equations: whereŝ ECI is a unit sun vector in the Earth-centered inertial (ECI) frame andŝ body estm. is a sun vector estimated in the body frame. x ECI sun,DE405 is the position of the sun calculated using the DE405 model, and x ECI sat.,GPS is the position of the SNUGLITE in the ECI frame that is found by using the output of the GPS receiver mentioned in Table 2. R body ECI is a rotation matrix from the ECI to the body-frame. The rotation matrix is comprised of two parts, as shown in Equation (24): (24) where R local ECI is a rotation matrix from the ECI frame to the local orbital plane frame and R body local is a rotation matrix from the local orbital frame to the body frame.
To generate R local ECI , the equinox-based transformation method is utilized with Earth orientation parameters provided by the International Earth Rotation and Reference System [23]. For the rotation matrix from the local frame to the body frame, R body local , the estimated attitude of quaternion parameters, calculated in the attitude system of the CubeSat and denoted as 'estimate attitude' in the full beacon, is utilized in Equation (25): The performance analysis of the attitude estimation of the SNUGLITE CubeSat was conducted using the two equations below: δŝ =ŝ where δŝ is an error vector between the reference sun vector and the estimated sun vector, and δθ is the angle between two vectors.

Satellite Status
The following section describes the satellite status data required for the analysis of the attitude system. Calculated GPS results, battery voltage level, and power generation were evaluated to determine whether the attitude system was performing efficiently.

GPS Receiver Results
For the performance analysis of the attitude estimation, the satellite positions were required to generate the reference sun-pointing vector, as shown in Equation (22). This section describes the indicators verifying that the SNUGLITE GPS receivers in orbit are performing normally.
The SNUGLITE CubeSat broadcasts its current position, as calculated by the onboard GPS receiver, every 10 s. Given that the SNUGLITE CubeSat possesses an amateur telecommunication band and uses amateur protocol, the data can be received by any ground stations equipped with conventional amateur equipment. From the launch date until the end of June 2019, a total of 26,400 valid beacons, including GPS position, velocity, and time, have been received. All received GPS positions in latitude and longitude are described in Figure 4. The positioning and velocity results from the SNUGLITE CubeSat were based on the World Geodetic System-84.

Satellite Status
The following section describes the satellite status data required for the analysis of the attitude system. Calculated GPS results, battery voltage level, and power generation were evaluated to determine whether the attitude system was performing efficiently.

GPS Receiver Results
For the performance analysis of the attitude estimation, the satellite positions were required to generate the reference sun-pointing vector, as shown in Equation (22). This section describes the indicators verifying that the SNUGLITE GPS receivers in orbit are performing normally.
The SNUGLITE CubeSat broadcasts its current position, as calculated by the onboard GPS receiver, every 10 s. Given that the SNUGLITE CubeSat possesses an amateur telecommunication band and uses amateur protocol, the data can be received by any ground stations equipped with conventional amateur equipment. From the launch date until the end of June 2019, a total of 26,400 valid beacons, including GPS position, velocity, and time, have been received. All received GPS positions in latitude and longitude are described in Figure 4. The positioning and velocity results from the SNUGLITE CubeSat were based on the World Geodetic System-84. It has been confirmed that the SNUGLITE ground station in the Republic of Korea as well as amateur operators in Europe, North and South America, Oceania, and Asia receive signals from the SNUGLITE CubeSat.
One of the methods for evaluating the GPS positioning results is to compare them with the two line element set (TLE) data uploaded from NORAD. The positioning results of the SNUGLITE GPS receiver continuously fit with the orbit generated from TLE parameters up to the km level [18], which is reasonable, because TLE provides rough orbital parameters with km-level accuracy [24]. In addition, positioning accuracy analyses, which use an orbit determination technique that considers orbit dynamics with perturbations, have shown that the root mean square error (RMS) error of the It has been confirmed that the SNUGLITE ground station in the Republic of Korea as well as amateur operators in Europe, North and South America, Oceania, and Asia receive signals from the SNUGLITE CubeSat.
One of the methods for evaluating the GPS positioning results is to compare them with the two line element set (TLE) data uploaded from NORAD. The positioning results of the SNUGLITE GPS receiver continuously fit with the orbit generated from TLE parameters up to the km level [18], which is reasonable, because TLE provides rough orbital parameters with km-level accuracy [24]. In addition, positioning accuracy analyses, which use an orbit determination technique that considers orbit dynamics with perturbations, have shown that the root mean square error (RMS) error of the position is less than 5 m [18]. These results are indicators that the GPS receiver in the SNUGLITE has been performing normally.
Altitude results calculated from the GPS receivers in the SNUGLITE CubeSat depict the tendency as described in Figure 5. In Figure 5, 'SNUGLITE' indicates the data received at the SNUGLITE CubeSat ground station, and 'SatNOGS' indicates the data uploaded to the SatNOGS website [13]. 'North-direction' and 'south-direction' denote the movement of the satellite from south to north and north to south, respectively. The altitude data are the result obtained when the satellite is located only over the ground station, as described in Figure 4. The altitude varies from 574 to 607 km with a definite period over these regions. The period is caused by the secular motion of perigee, which is also called an apsidal rotation. This secular motion is one of the main effects caused by the first zonal harmonic, which is a J2 by Earth's oblateness. Furthermore, the fundamental period from zonal harmonics has a large magnitude [25].
The period is theoretically calculated following [25]. Using NORAD's TLEs, the mean theoretical orbital period was calculated to be 107.92 days, and it is displayed in Figure 5 using red dashed lines.
The period of altitude variation in the figure coincided with the calculated period. The period of altitude variation can be regarded as another indicator to support the healthy operation of SNUGLITE's GPS receiver.
SNUGLITE CubeSat ground station, and 'SatNOGS' indicates the data uploaded to the SatNOGS website [13]. 'North-direction' and 'south-direction' denote the movement of the satellite from south to north and north to south, respectively. The altitude data are the result obtained when the satellite is located only over the ground station, as described in Figure 4. The altitude varies from 574 to 607 km with a definite period over these regions. The period is caused by the secular motion of perigee, which is also called an apsidal rotation. This secular motion is one of the main effects caused by the first zonal harmonic, which is a J2 by Earth's oblateness. Furthermore, the fundamental period from zonal harmonics has a large magnitude [25].
The period is theoretically calculated following [25]. Using NORAD's TLEs, the mean theoretical orbital period was calculated to be 107.92 days, and it is displayed in Figure 5 using red dashed lines. The period of altitude variation in the figure coincided with the calculated period. The period of altitude variation can be regarded as another indicator to support the healthy operation of SNUGLITE's GPS receiver.

Battery Voltage
The battery voltage of the CubeSat also needs to be considered for the attitude analysis, as there is no power generation when the battery is fully charged. Two lithium-ion 18650 cells were used for the power system of the SNUGLITE CubeSat. The maximum battery voltage was set to 8300 mV. Battery voltage variation from the launch date to the end of June 2019 is described in Figure 6. From March 2019, ground stations have observed a decrease in the battery voltage to under 7900 mV. This decrease has been attributed to the operation of the battery heater.

Battery Voltage
The battery voltage of the CubeSat also needs to be considered for the attitude analysis, as there is no power generation when the battery is fully charged. Two lithium-ion 18650 cells were used for the power system of the SNUGLITE CubeSat. The maximum battery voltage was set to 8300 mV. Battery voltage variation from the launch date to the end of June 2019 is described in Figure 6. From March 2019, ground stations have observed a decrease in the battery voltage to under 7900 mV. This decrease has been attributed to the operation of the battery heater.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 12 of 18 Figure 6. Battery voltage level. Figure 6 depicts several full-charge cases, which decreases the number of valid epochs for the attitude analysis because power generation is essential to compute the reference sun-pointing vector, as per Equation (19). Figure 7 describes the level of power generation according to the latitude in December 2018. We classified the power generations into two groups: north and south directions in orbit. Given that the orbit of the SNUGLITE CubeSat is sun-synchronous, the movements were consistent such that the north and south denote eclipse and daytime, respectively. Since the CubeSat does not use sun-pointing attitude control and the number of solar cells at each surface is different, the power generation changes depending on the CubeSat's attitude. In addition, the high level of battery voltage also decreases the power generation. When the battery is fully charged, the power generation level is near zero, as described in Figure 7. Though the level of power generation varies, we deduced that the power generation has generally been above 2 W.  Figure 6 depicts several full-charge cases, which decreases the number of valid epochs for the attitude analysis because power generation is essential to compute the reference sun-pointing vector, as per Equation (19). Figure 7 describes the level of power generation according to the latitude in December 2018. We classified the power generations into two groups: north and south directions in orbit. Given that the orbit of the SNUGLITE CubeSat is sun-synchronous, the movements were consistent such that the north and south denote eclipse and daytime, respectively. Since the CubeSat does not use sun-pointing attitude control and the number of solar cells at each surface is different, the power generation changes depending on the CubeSat's attitude. In addition, the high level of battery voltage also decreases the power generation. When the battery is fully charged, the power generation level is near zero, as described in Figure 7. Though the level of power generation varies, we deduced that the power generation has generally been above 2 W. Figure 7 describes the level of power generation according to the latitude in December 2018. We classified the power generations into two groups: north and south directions in orbit. Given that the orbit of the SNUGLITE CubeSat is sun-synchronous, the movements were consistent such that the north and south denote eclipse and daytime, respectively. Since the CubeSat does not use sun-pointing attitude control and the number of solar cells at each surface is different, the power generation changes depending on the CubeSat's attitude. In addition, the high level of battery voltage also decreases the power generation. When the battery is fully charged, the power generation level is near zero, as described in Figure 7. Though the level of power generation varies, we deduced that the power generation has generally been above 2 W.

Satellite Attitude
A performance analysis of attitude estimation was conducted by comparing the two sun-pointing vectors (found using Equation (20)), and the estimated attitude with the vector from the satellite to the sun was calculated using Equation (23). Equations (26) and (27) were utilized to depict the performance of the attitude estimation. During the analysis, Equation (20) was considered as the reference sun-pointing vector. Though the pointing accuracy of the reference sun-pointing

Satellite Attitude
A performance analysis of attitude estimation was conducted by comparing the two sun-pointing vectors (found using Equation (20)), and the estimated attitude with the vector from the satellite to the sun was calculated using Equation (23). Equations (26) and (27) were utilized to depict the performance of the attitude estimation. During the analysis, Equation (20) was considered as the reference sun-pointing vector. Though the pointing accuracy of the reference sun-pointing vector is somewhat low, it could be used as a rough indicator to verify the operation of the attitude estimation.
Total 8138 full beacons that include information on attitude, temperature, and power generation during 1384 contacts were received between December 2018 and late June 2019. Four conditions needed to be met in order to extract valid epochs for the attitude estimation analysis: • The z-component of the GPS velocity in Earth-centered Earth-fixed (ECEF) is negative.

•
The total power generation is more than 2 W. • The power generation on the -z side is more than 100 mW.

•
Reverse direction cases of sun-pointing vector by slow temperature changes are excluded.
This type of analysis can be performed only when the satellite is exposed to the sunlight and when power is being generated. According to Figure 7, at least 2 W of power is normally generated during daylight when the battery is not fully charged. According to Figure 6, there are several full-charge cases that decrease the number of valid epochs. Another condition for the daylight is that the z-component of the velocity calculated from the GPS receiver is negative in the ECEF frame. Given that the orbit is sun-synchronous, the negative z-component of velocity indicates that the satellite is moving south during the daytime, and positive cases indicate that it is moving north during eclipse. This decreases the number of valid epochs by half. To use the sun-pointing vector for generating power levels, at least three sides of the solar panels should be exposed to the sunlight. Given that there is no solar panel on the +z side of the SNUGLITE CubeSat, the analysis can be performed only when the -z side is facing the sun. Generating power on the z-axis at more than 100 mW indicates that the -z side is exposed to the sun. In addition, the + or − directions of the x and y axes can be distinguished using the temperatures of each solar panel, as in Equation (19). When the satellite is rotating, however, there is a possibility that the indicated temperature may be that of the reverse side of the radiated panel because temperature changes take time to represent the right direction. These conditions also decrease the number of valid epochs.
The valid number of epochs found by using the above filtering conditions was 587 during 158 contacts, and this was the value used to conduct the attitude analyses. Figure 8 displays the angle error between the two sun-pointing vectors, as per Equation (27), at each valid epoch.
generating power levels, at least three sides of the solar panels should be exposed to the sunlight. Given that there is no solar panel on the +z side of the SNUGLITE CubeSat, the analysis can be performed only when the -z side is facing the sun. Generating power on the z-axis at more than 100 mW indicates that the -z side is exposed to the sun. In addition, the + or − directions of the x and y axes can be distinguished using the temperatures of each solar panel, as in Equation (19). When the satellite is rotating, however, there is a possibility that the indicated temperature may be that of the reverse side of the radiated panel because temperature changes take time to represent the right direction. These conditions also decrease the number of valid epochs.
The valid number of epochs found by using the above filtering conditions was 587 during 158 contacts, and this was the value used to conduct the attitude analyses. Figure 8 displays the angle error between the two sun-pointing vectors, as per Equation (27), at each valid epoch. The mean angle error was approximately 12.6°, and the RMS was 14.7°. Figure 9 displays the difference between the two sun-pointing vectors using x, y, and z components for four contact cases. Figure 9b,c display the cases when the attitude estimations were calculated accurately. On the other hand, Figure 9a,d depict the cases where two sun-pointing vectors were biased. However, they displayed similar tendencies. The mean angle error was approximately 12.6 • , and the RMS was 14.7 • . Figure 9 displays the difference between the two sun-pointing vectors using x, y, and z components for four contact cases. Figure 9b,c display the cases when the attitude estimations were calculated accurately. On the other hand, Figure 9a,d depict the cases where two sun-pointing vectors were biased. However, they displayed similar tendencies.

Discussion
A correlation existed between the sun-pointing error and power generation, as described in Figure 10. When there was high power generation, the accuracy of the attitude estimation was improved.

Discussion
A correlation existed between the sun-pointing error and power generation, as described in Figure 10. When there was high power generation, the accuracy of the attitude estimation was improved.

Discussion
A correlation existed between the sun-pointing error and power generation, as described in Figure 10. When there was high power generation, the accuracy of the attitude estimation was improved. The performances with different power generation levels are described in Table 3. When epochs whose power generation was greater than 4 W were considered, the RMS error of the estimated attitude was at its lowest, at approximately 6.1°.  The performances with different power generation levels are described in Table 3. When epochs whose power generation was greater than 4 W were considered, the RMS error of the estimated attitude was at its lowest, at approximately 6.1 • . Utilizing the information currently provided, it was difficult to distinguish which of the sun-pointing vectors of Equations (20) and (23) included error sources. As the power generation on each side of the satellite was considered to generate the reference vector, it was possible that the high power generation cases could make the definitive reference sun-pointing vector with less error. If this is correct, attitude performance analysis using epochs with high power generation capabilities is more reliable. Figure 11 displays the angle error of two sun-pointing vectors at epochs whose power generation was more than 4 W. Utilizing the information currently provided, it was difficult to distinguish which of the sun-pointing vectors of Equations (20) and (23) included error sources. As the power generation on each side of the satellite was considered to generate the reference vector, it was possible that the high power generation cases could make the definitive reference sun-pointing vector with less error. If this is correct, attitude performance analysis using epochs with high power generation capabilities is more reliable. Figure 11 displays the angle error of two sun-pointing vectors at epochs whose power generation was more than 4 W. The in-orbit real-time attitude estimation performance of the LQG-based attitude system of the SNUGLITE CubeSat was compared and analyzed with previous studies. Because of the lack of studies on the in-orbit performance of the CubeSat platform, there were no cases to present a direct comparison with the SNUGLITE CubeSat's LQG-based attitude system. For instance, the MinXSS-1 CubeSat achieved high performance attitude estimation, with an accuracy of up to 0.012° (3-σ) [5]. This was possible because of the use of a star tracker, which is very expensive and not suitable for low-cost attitude systems. The performance of a star tracker is in the arc-seconds accuracy level; however, its price is over €30,000 at the time of this publication [26]. The SNUGLITE CubeSat attitude sensors comprises five COTS photodiodes, one MEMS-level three-axis gyroscope, and one three-axis magnetometer, with a total price not exceeding €300. Therefore, the performance comparison of attitude algorithms between these two satellites was inappropriate. The in-orbit real-time attitude estimation performance of the LQG-based attitude system of the SNUGLITE CubeSat was compared and analyzed with previous studies. Because of the lack of studies on the in-orbit performance of the CubeSat platform, there were no cases to present a direct comparison with the SNUGLITE CubeSat's LQG-based attitude system. For instance, the MinXSS-1 CubeSat achieved high performance attitude estimation, with an accuracy of up to 0.012 • (3-σ) [5]. This was possible because of the use of a star tracker, which is very expensive and not suitable for low-cost attitude systems. The performance of a star tracker is in the arc-seconds accuracy level; however, its price is over €30,000 at the time of this publication [26]. The SNUGLITE CubeSat attitude sensors comprises five COTS photodiodes, one MEMS-level three-axis gyroscope, and one three-axis magnetometer, with a total price not exceeding €300. Therefore, the performance comparison of attitude algorithms between these two satellites was inappropriate.
The attitude system of the CSTB1 CubeSat comprises 16 COTS photodiodes sensors and five two-axis magnetometers [6]. Attitude estimation was conducted based on a triad algorithm. The reference-pointing vector for attitude estimation analysis was calculated using an image from the on-board visible camera and the satellite's position. Since only one sample was considered for the preliminary attitude estimation analysis, with a pointing error was 2.2 • , it cannot be considered as a generalized performance. In addition, the attitude of the satellite was calculated based on the sensor data received at the ground receiving station.
The ESTCube-1 CubeSat attitude estimation performance was also evaluated using the on-board camera images [9]. A total 15 images were considered for analysis, which is not sufficient for generalized performance. Its maximum pointing error was 1.43 • with unscented Kalman filtering. The ESTCube-1 CubeSat attitude sensor suite includes COTS equipment, two magnetometers, and four gyroscopes, along with six fine sun-sensors, which are superordinate equipment to the photodiode-based sun sensor. The fine sun-sensor can provide a sun-tracking error smaller than 1 • (3-σ), but it is not categorized as a low-cost sensor, with a price exceeding €12,000 if six sides of the satellite are fully equipped [26].
Among previous studies, the RAX satellites attitude sensor configuration is the most similar to the attitude sensors of the SNUGLITE CubeSat [8]. RAX-1 and RAX-2 were three-unit CubeSats equipped with two COTS three-axis magnetometers and a three-axis MEMS gyroscope, with different photodiode configurations (9 and 17 photodiodes for RAX-1 and RAX-2, respectively). An extended Kalman filter was considered for attitude estimation. However, the performance of the attitude determination was analyzed by the state error covariance of the filter. Though the RAX CubeSats attitude system performance using the covariance matrix of the filter was below 1.5 • (3-σ), it could not represent the actual attitude estimation performance, because a Kalman filter assumes that input errors have a Gaussian distribution [21]. However, there are unexpected biases or disturbances in sensor measurements that increase the actual attitude errors. Instead, attitude analyses need to be evaluated using a reliable performance presented by independent reference sources. Further, the filtering and tuning processes of the RAX CubeSats were conducted offline after the satellite sensor measurements were downloaded.
In general, the in-orbit validations of former attitude systems for the CubeSat platform have limitations, as generalized performances have not been analyzed. In this paper, an attitude estimation analysis of the LQG-based attitude system using low-cost sensors was presented. Generalized performance was achieved by comparing two sun-pointing vectors using independent reference sources with a sufficient number of samples. This methodology can be used in future analyses of attitude systems for the CubeSat platform, particularly for systems using low-cost sensors.

Conclusions
The SNUGLITE CubeSat was successfully launched and settled in orbit, and it has since been broadcasting its beacon data continuously. Unfortunately, being that the CubeSat is unable to pick up commands from the ground station, it cannot receive the expected datasets that are excluded from beacon data. Still, though raw data measurements were unavailable, analyses were performed based on the available datasets. Particularly, the results of attitude estimation were verified by evaluating the operation.
In this paper, the novel LQG-based attitude system using low cost sensors and actuators for the CubeSat platform was presented, with focus on the in-orbit real-time attitude estimation performance and analysis using a new method for comparing two sun-pointing vectors. The sun-pointing vector calculated from attitude estimation was compared to the reference sun-pointing vector generated using on-board parameters, such as the power generation levels at each side of the CubeSat. The calculated RMS error between two sun-pointing vectors was approximately 15 • , but it reduced to 6.1 • for a high power generation situation, which is more reliable.
When the uplink functionality of tele-commands from the ground station to the satellite is restored, SNUGLITE will be able to download continuous raw data, including sensor data and control input for the attitude system, as well as measurements from GPS receivers for scientific missions. This will allow for deep performance analyses of the SNUGLITE CubeSat, including the analysis of the attitude control.