The Electron Loss and Fields INvestigation (ELFIN) mission comprising two 3U +CubeSats was developed, built, and operated by several generations of undergraduate students at UCLA. The spin-stabilized CubeSats (spin-rate: 21 RPM) produced high-resolution measurements of precipitating, trapped, and backscattered fluxes of electrons and ions in the radiation belts. Launched in September 2018, ELFIN operated successfully until its deorbit just over four years later. At first, however, mission operations was very challenging and only tapped the full mission potential after a thorough redesign of the operations paradigm. This mid-mission adjustment yielded the higher data downlink volume necessary to acquire a comprehensive data set, therefore enabling ensemble studies with su fficient statistical significance. The new operational framework also led to additional improvements across the mission. Most notably, the Attitude Determination and Control System (ADCS) benefited from more reliable collections of magnetometer data for attitude determination, enabling knowledge and control to <1◦. This allowed high pitch-angle resolution (especially within the loss cone) and high energy resolution spectrograms, both powerful diagnostics of radiation belt electron and ion precipitation. This paper highlights the scientific advancements made possible by ELFIN’s e fficient mission operations and ADCS design, unique for CubeSats, and emphasizes the role of electron precipitation measurements for future studies in magnetospheric, ionospheric, and atmospheric physics. ©2024 COSPAR. Published by Elsevier Ltd All rights reserved. Keywords: ELFIN; CubeSats; radiation belts; electron precipitation; wave-particle interactions; magnetospheric physics ∗Corresponding author: ethantsai@ucla.edu Preprint submitted to Advances in Space ResearchMarch 12, 2024 2 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 1. Introduction 1 1.1. Motivation for ELFIN 2 Earth’s magnetic field traps energetic particles in large toroidal regions around Earth known as the radiation belts. Energetic 3 (often relativistic, with energy >500 keV) electrons there are highly dynamic, with fluxes that can vary by five orders of magnitude 4 on timescales from days to minutes (Horne et al., 2007). Such electrons can pose a risk to spacecraft and astronaut safety and are 5 studied under the general domain of “space weather” (Horne et al., 2013; Baker et al., 2017). Energetic electrons ( >100 keV) can 6 leave the radiation belts either by transport (back out into the magnetosphere and solar wind) or di ffusively (via wave-scattering 7 along the field line, leading to precipitation and loss through collisions with the denser atmosphere at ∼100 km). Precipitation, 8 often correlated with auroral phenomena (e.g., Miyoshi et al., 2020, 2021; Shumko et al., 2021), can cause many changes in the 9 atmosphere (Tesema et al., 2020; Mironova et al., 2019; Chapman-Smith et al., 2023) and ionosphere (Oyama et al., 2017; Yu 10 et al., 2018; Verronen et al., 2021), and is therefore also important to study from the perspective of atmospheric energy input. For 11 example, higher energy electrons penetrate deeper into the atmosphere (Xu et al., 2020) contributing to localized ozone depletion 12 (Thorne, 1980; Lam et al., 2010; Turunen et al., 2016) and, if they reach low enough altitudes, can even produce secondary 13 ionization e ffects via bremsstrahlung radiation (Xu et al., 2021; Xu & Marshall, 2019). Energetic particles typically precipitate 14 by two di fferent mechanisms in Earth’s magnetosphere: field-line curvature scattering (e.g., Sergeev et al., 1983, 1993; Yahnin 15 et al., 2016) and wave-particle interactions (e.g., Thorne, 2010; Li & Hudson, 2019). In particular, energetic ion motion is largely 16 controlled by the geomagnetic field configuration and Ultra-Low-Frequency (ULF; <1 Hz) dynamics, whereas the smaller and 17 more magnetized energetic electrons are mostly a ffected by electromagnetic waves within the Extremely Low Frequency (ELF) 18 and Very Low Frequency (VLF) ranges (10 −104Hz) (Lyons & Williams, 1984). Prior to the launch of ELFIN, there remained 19 many open questions regarding the nature and dynamics of electron energization or losses, both of which are currently still highly 20 unpredictable during some of the most active magnetospheric phenomena such as geomagnetic storms and substorms. These 21 phenomena are crucial for space weather forecasting, which aims to protect society from the harmful e ffects of these relativistic 22 particles. Therefore, energetic electron precipitation during storms and substorms is intently studied by a wide range of space 23 weather missions. 24 Most recent and current missions have been dedicated to exploring the radiation belts from an equatorial vantage point due to 25 the prevalence of magnetospheric processes detectable at those high altitudes. At the equator, the range of pitch-angles (angle 26 between particle velocity and background magnetic field) for particles capable of reaching the ionosphere (i.e., those within the 27 loss cone) is very narrow (less than few degrees). However, the loss cone becomes large along the field line at low altitudes 28 (several hundred kilometers). From such low altitudes (i.e., high latitudes along the field line), precipitation and associated losses 29 can be well-characterized. When data are acquired there as a function of activity and MLT, statistical investigations of the drivers 30 of precipitation are possible. This cannot be achieved with short-lived balloon or sub-orbital rocket flight(s), but instead requires 31 long-lived LEO satellites acquiring high-quality measurements with significant throughput. 32 The Electron Loss and Fields INvestigation (ELFIN) is a space weather mission specifically designed to fill this observational 33 gap (Angelopoulos et al., 2020). The mission consists of two 3U +CubeSats that were developed, built, and operated by several 34 generations of undergraduate students at UCLA. Both CubeSats launched together on September 15th, 2018 into a ∼460 km circular 35 polar orbit with a 93◦inclination. After 4 dutiful years on orbit, ELFIN-A re-entered on September 17th, 2022 and ELFIN-B re- 36 entered on September 30th, 2022, thereby concluding the operational phase of the mission. ELFIN was designed to capture, for 37 the first time, the energy distributions of energetic electrons and ions (E >50 keV) with pitch-angle ( α) resolution high enough 38 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 3 to resolve the bounce loss cone (particles with pitch-angles within the loss cone ( α < α lc) are lost within one bounce period). Its 39 primary objective was to determine the storm-time particle precipitation rates and elucidate the variety of di fferent mechanisms 40 that can lead to such particle losses. ELFIN accomplished this using an Energetic Particle Detector for Electrons and Ions (EPDE, 41 EPDI)—capable of measuring the energy and pitch-angle distributions of energetic electrons and ions with ∆E/E=40% across 16 42 energy channels between 50 keV and 5 MeV—along with a Fluxgate Magnetometer (FGM) deployed at a distance of ∼75 cm to 43 avoid noise from the spacecraft bus. By spinning at just over 21 revolutions per minute (spin period ∼2.8 sec) with its spin plane 44 aligned with the orbital plane (to include the magnetic field direction), ELFIN’s 16 sectors per spin yielded a spin phase resolution 45 of∆α=22.5◦and allowed for full pitch-angle coverage with sub-loss cone resolution. From its low-altitude vantage point, ELFIN 46 routinely turned ON its instruments to collect data multiple times per day as it traversed the L-shell ranges 3 <L<18, providing 47 a radial snapshot of equatorial processes at a given magnetic local time (MLT) in what were called “Radiation Belt Crossings”, or 48 “Science Zones” (SZs). The latter term, which is most commonly used, signifies that each collection captures much more than the 49 outer radiation belt, including the slot region and parts of the inner belt on the low-latitude side, and the plasma sheet and parts of 50 the polar cap on the other. 51 This was unique because no previous mission had been able to achieve such routine, high-recurrence rate, high-time resolution, 52 high-energy, and high-pitch-angle collections of particle distributions within the radiation belts. The loss cone within these SZs 53 wasαlc≈65◦−70◦—whereas it is usually <3◦at the equator—so equatorial missions, like the Time History of Events and 54 Macroscale Interactions during Substorms (THEMIS) (Angelopoulos, 2008), Magnetospheric Multiscale (MMS) (Burch et al., 55 2016), and Van Allen Probes (V AP) (Mauk et al., 2013) cannot resolve the loss cone, let alone any spectral details inside or outside 56 of it. Although equatorial, the Exploration of energization and Radiation in Geospace (ERG) (Kasahara et al., 2018) mission 57 has the ability to measure precipitating electrons from the equator with high pitch-angle resolution; such electron precipitation 58 measurements, however, are limited in energy to <100 keV (Kasahara et al., 2018). This does not allow for the study of how 59 particles can be accelerated to relativistic energies and how o ff-equatorial processes may a ffect precipitation rates. There have been 60 a number of low-altitude missions in orbits similar to ELFIN’s—such as SAMPEX (Baker et al., 1993), POES (Evans & Greer, 61 2004), and Firebird II (Crew et al., 2016)—none of which can provide either adequate /consistent pitch-angle resolution or the 62 appropriate energy range in order to study the full gamut of energetic electron precipitation phenomena. The ability of ELFIN to 63 measure precipitating, trapped, and reflected populations of particles in a single spin (in addition to pitch-angle distributions within 64 the loss cone) provided the necessary capability to determine signatures of various types of wave-particle interactions. Every aspect 65 of the ELFIN mission was optimized for this purpose, leading to the implementation of a CubeSat with a highly customized yet 66 efficient design. 67 1.2. ELFIN System Overview 68 An expanded schematic view of ELFIN can be seen in Figure 1. The ELFIN payload consists of three primary instruments: 69 (1) an energetic particle detector for electrons (EPD-E) and an energetic particle detector for ions (EPD-I) and (2) the fluxgate 70 magnetometer (FGM). The avionics unit is comprised of 8 PCBs and 4 Li-Ion batteries stacked inside of a PEEK (Polyether Ether 71 Ketone, a type of thermoplastic) frame with a thin aluminum and MLI (Multi-Layer Insulation) blanket shielding for electrical and 72 thermal purposes. The flight computer (FPCB), attitude control board (ACB), and two solar-battery boards (SBPCB) were built by 73 the Aerospace Corporation. Each board contains one or two PIC microprocessors with custom software and firmware implemented 74 by UCLA students. Interface and auxiliary boards were also designed and built at UCLA, including two Little Et Cetera boards 75 (LETC1 and LETC2), a big Et Cetera board (BETC), and various small PCBs for battery heaters and harness interconnects. The 76 4 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx EPD electronics EPD-EEPD-I FGM electronics FGM Sensor75 cm stacerZ coil (reor) Y coil (spin)FPCB, ACB, SBPCB1/2 LETC1/2Batteries, heatersRadio, BETC TunacanUHF VHF(1) UHFVHF ELFIN’s Coordinate System (2)(3)(1) Energetic Particle Detector (EPD) (2) Fluxgate Magnetometer (FGM) (3) Avionics Stack SMAR actuator Fig. 1. Interior components of ELFIN are shown in this expanded view. From left to right: (1) the energetic particle detector instrument (EPD) which includes the electronics (SIPS, IDPU, 2 EPD digital boards, preamplifier, and the front end bias supply) along with the electron and ion sensor heads; (2) the fluxgate magnetometer (FGM) sensor mounted at the end of a 75 cm deployable stacer; and (3) the avionics stack which consists of the flight computer, solar battery power boards, attitude control board, radio, and relevant interface boards. The two pairs of deployable bent-dipole antennas are shown on the right, with the two air coils attached to the chassis. Note the coordinate system which is atypical from the CubeSat standard: ELFIN spins about its Z-axis, deploys the fluxgate in the +Y direction, and measures incoming particles from its +X direction. radio is a custom form factor Helium-82 radio from AstroDev— which is a slightly smaller version of the Helium-100—capable 77 of VHF uplink and UHF downlink. Power was generated via 20 body-mounted Spectrolab UTJ cells on custom solar panels and 78 stored in 4 Molicel ICR18650J Li-Ion batteries. 79 There are two deployables on ELFIN: the antennas and the stacer boom. The antennas are stowed in the “bonus” volume of the 80 3U+form factor, and consist of custom rolled up BeCu /fiberglass elements (built by Loadpath) held down by Spectraline as shown 81 in Figure 2e. Deployment occurs when a series of redundant burn resistors are energized, which heat and melt the thin Spectraline 82 and allow the antennas to unfurl. The stacer boom is a miniaturized version of the axial booms that were flown on THEMIS 83 (designed and manufactured by Kaleva Design) and is pictured at the center of Figure 2a. The chassis and rail-based mechanical 84 structure were custom designed and machined in-house. Most components were manufactured at UCLA with 6061 aluminum or 85 PEEK (although brass, copper, tantalum, delrin, and Windform were either machined in-house or printed at commercial facilities). 86 The magnetorquers were PEEK-framed air coils wound with Elektrisola High Tension Copper-Clad Aluminum (HTCCA) magnet 87 wire, seen in Figure 2b. This magnet wire was chosen as an optimal compromise between resistivity, weight, and high tensile 88 strength. 89 High-fidelity thermal simulations were performed in Thermal Desktop and validated by tests in our Thermal Vacuum (TV AC) 90 chamber. These simulations informed the placement of various thermal treatments and blankets employed throughout the spacecraft. 91 Custom MLI blankets, silver telfon, black kapton, and innovative use of PEEK brackets can be readily seen throughout Figure 2 92 and were designed to keep the EPD as cold as possible while minimizing battery heater use to optimize power utilization. 93 In addition to the standard challenges of miniaturizing three instruments, electronics, and deployables into a 3U +CubeSat form 94 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 5 Fig. 2. ELFIN’s flight model from various perspectives using axes defined in Figure 1. factor, ELFIN’s science goals imposed some unique challenges. First, by spinning at ∼21 RPM with the spin plane aligned with 95 the orbital plane to within 20◦, ELFIN needed a custom ADCS solution, communication design, and power strategy. Second, due 96 to the sensitive fluxgate magnetometer onboard, the spacecraft was required to be magnetically clean ( <30 nT DC field @ 75 cm 97 away): this limited material and design choices while also adding several levels of intricacies during system-level testing. Finally, 98 the spacecraft was designed and built by a large team of nearly 300 undergraduate students across the 5-year development period 99 while its on-orbit satellite operations was conducted by more than 50 undergraduate students over 4 years. This meant that retain- 100 ing internal knowledge and enforcing high technical standards was a significant management-level challenge. The development, 101 fabrication, testing, and satellite operations necessarily revolved around the academic calendar, which was an obstacle both to de- 102 velopment continuity and to attaining reliable daily operations. There could not be an expectation of full-time commitment, and 103 ELFIN’s success relied heavily on extracurricular student volunteer time. 104 6 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx Operational Period Time Range Total SZ Crossings SZs/Month Commissioning Sept 2018 - March 2019 0 0 Calibration +Ops 1.0 April 2019 - June 2020 675∼40 Refactor 2.0 June 2020 - Feb 2021 3255∼360 Inner Belt Observations Mar 2021 - Nov 2021 5436∼600 Working Attitude Control Dec 2021 - May 2022 2558∼380 Calibrated Ions June 2022 - Sept 2022 481∼120 Total:∼12,500 Table 1. This table shows the various phases within ELFIN’s on-orbit operations. The mission reached a turning point in June 2020 with the release of Refactor 2.0, which greatly enhanced the scientific return from ELFIN. Only observations in which data completeness >60% over the planned L-shell range are counted (outer radiation belt crossings are from L ∈[3,18] while inner radiation belt data collections span L ∈[1.1,18]). 1.3. Organization 105 This paper is organized as follows: Section 2 describes the operational performance over the lifetime of ELFIN and identifies 106 satellite operations refactoring as pivotal to ELFIN’s success. This is followed by a discussion of ELFIN’s coverage from a space 107 physics perspective in Section 3; this extensive coverage is only enabled by a comprehensive overhaul of satellite operations, called 108 Refactor 2.0, described next in Section 4. Refactor 2.0 also led to better attitude control, which is covered in the context of satellite 109 operations in Section 5. The novelty of obtaining pitch-angle-resolved electron distributions in low Earth orbit (LEO) a fforded by 110 functioning attitude control is detailed in Section 6. In Section 7, we discuss the overarching strategies and lessons learned relevant 111 to small satellite capacity building, look ahead to the possibility of future missions, and emphasize the value of contextualized 112 electron precipitation measurements. Further technical details regarding the implementation of Refactor 2.0 and ELFIN’s ADCS 113 design are found in Appendix A and Appendix B. 114 2. Operations Timeline 115 ELFIN data has enabled a wide range of studies primarily due to its novel data products, multi-year statistics, full MLT coverage, 116 and thousands of science zone (SZ) data collections. E ffective satellite operations and full attitude control were the two final hurdles 117 that were overcome on-orbit which enabled the necessary throughput of high-quality science data. 118 One metric for assessing ELFIN’s data throughput (and, therefore, operational success) is the number of SZs ELFIN successfully 119 downlinked per month, as itemized throughout various phases of ELFIN’s on-orbit life in Table 1. Even after commissioning, the 120 first two years were challenging: more than 95% of the 12 ,500 science zone crossings were downlinked by ELFIN after the 121 first 1.7 years of the mission, i.e., after a complete revision of its operational paradigm, called Refactor 2.0, was rolled out in 122 June 2020. This is shown in the last column of Table 1. It can be seen that the ELFIN SZ downlink rates improved by 9x 123 after this refactoring and remained sustainably high until the end of the mission. This rapid increase in downlink data volume is 124 also evident in Figure 3. Science zone downlink e fficiency after Refactor 2.0 fluctuated as a function of partner downlink station 125 availability (partners included NASA’s Near-Earth Network (NEN) dish-antenna on Wallops Island, StellarStation’s antennas in 126 Tokyo, and Montana State University’s UHF downlink station). It also fluctuated due to downlink complications from ELFIN 127 overlapping passes (or OLPs, when both ELFINs are overhead during the same passes, e ffectively halving the available pass 128 time), and additional desired data volume per science zone collection (SZs /month decreased when downlinking additional inner 129 belt data, attitude data, and /or ion data corresponding with each of ELFIN’s more advanced operational phases). It took several 130 months to optimize our operations paradigm around the new software, and our first major update (which included significantly 131 more optimized science packets and better downlink strategies) was released shortly before the first set of overlapping passes at the 132 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 7 ELFIN's Lifetime Science Downlink Efficiency9/1/18 10/1/18 11/1/18 12/1/18 1/1/19 2/1/19 3/1/19 4/1/19 5/1/19 6/1/19 7/1/19 8/1/19 9/1/19 10/1/19 11/1/19 12/1/19 1/1/20 2/1/20 3/1/20 4/1/20 5/1/20 6/1/20 7/1/20 8/1/20 9/1/20 10/1/20 11/1/20 12/1/20 1/1/21 2/1/21 3/1/21 4/1/21 5/1/21 6/1/21 7/1/21 8/1/21 9/1/21 10/1/21 11/1/21 12/1/21 1/1/22 2/1/22 3/1/22 4/1/22 5/1/22 6/1/22 7/1/22 8/1/22 9/1/22Blue (left axis): Unique Science Packets per Month Orange (right axis): Total SZs Downlinked per Month with >60% completeness900 800 700 600 500 400 300 200 100 010000150002000025000 05000Launch aboard Delta-II rocket 9/15/18. Operations team establishes /f_irst contact 9/16/18.StellarStation and Wallops begin to support ELFIN Preliminary calibration of ELFIN instruments completed We declare /f_irst light as the operations team reaches burnout Ops reset and begin redesignRefactor 2.0 work begins Lockdown due to COVID-19Refactor 2.0 rolls out!StellarStation and Wallops both go down inde/f_initely StellarStation returns Period of Overlapping Passes (OLP)Wallops returns StellarStation goes down Period of OLP ADCS now fully functionalPeriod of OLP Period of OLPBegin Inner Belt ObservationsIons fully calibrated OLPMSU begins dl supportStellarStation returns OLPOLP OLPELFIN A reentry 9/17/23ELFIN B reentry 9/30/23 Commissioning, spin up, and in-/f_light calibration of ELFIN-ABegin the same commissioning on ELFIN-B Fig. 3. We show ELFIN’s science packet downlink e fficiency (blue, left axis), measured in science packets downlinked per month, as well as science zone downlink efficiency (orange, right axis), measured in number of science zone crossings with greater than 60% completeness per month. Key phases of the mission are annotated, showing the large impact of Refactor 2.0 and how it enabled significantly higher cadence and coverage of ELFIN measurements. Various e ffects cause the downlink e fficiency to vary throughout the mission, such as variable external downlink support and increased downlink volume requirements to support new science /operations objectives. end of 2020. This significantly reduced the error rate at which we downlinked data, as exemplified by the closer matching slopes 133 between the blue curve (the total number of science packets downlinked, including duplicates) and the orange curve (the total 134 number of SZs downlinked with completeness >60%). When ADCS became fully operational in November 2021—demonstrating 135 attitude determination and control of both ELFINs to <1◦of precision—it significantly increased the quality of ELFIN science 136 data at the cost of reduced overall science data due to the increased attitude data downlink requirements and even more constrained 137 spacecraft resources. Combined with ion data becoming fully online in June 2022—which increased generated data volume per 138 SZ by 50%—and the rapidly increasing OLPs, the number of SZs downlinked decreased towards the end of the mission. The 139 lower SZ coverage manifested near the end of mission was justified by the added value of fully contextualized ELFIN data with all 140 instruments working, allowing ELFIN to achieve far more than its originally proposed science objectives. 141 3. ELFIN Data Coverage 142 ELFIN was inserted into a circular 460 km orbit with 93◦inclination. This results in just under 0 .5◦of nodal precession per day, 143 meaning that the orbital plane rotates about 180◦in a year (relative to the Sun-Earth system), and, given the freedom to chose any 144 of the four available science zones in each the orbit (at opposing meridians), results in full MLT coverage once per year. With the 145 increased science collections a fforded by the refactored satellite operations, each ELFIN satellite was collecting and downlinking up 146 to 12 SZs per day, depending on power constraints and downlink backlog. Figure 4 shows the lifetime ELFIN coverage as a function 147 of MLT and geomagnetic indices. ELFIN lifetime coverage per MLT sector (indicated in (d) by light blue bars and numbers) show 148 reduced coverage near midnight because the noon-midnight orbit case is ELFIN’s coldest and lowest power state (given its attitude 149 requirement of having the spin axis along the orbit-normal). Not only are Earth shadows maximum here (ELFIN charges for 150 only over half its orbit track), but also panels along ELFIN’s spin plane have reduced solar cell coverage since instruments and 151 deployables are also in the same plane. This results in reduced power availability for downlinks and lower SZ collections in the 152 noon-midnight meridian, as evidenced in the figure. 153 8 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 241 603 551 571 450 327 269 222 198 251266 218 243283353448590579568446460464427203 5989 888 1750 # SZs/bin PDYN [nPa] (30-min average leading up to SZ)# SZs/colored bin 1221 5070 293 2106 # SZs/bin Sym-H [nT] (30-min average leading up to SZ)# SZs/colored bin# SZs/colored bin 1880 4108 3028 # SZs/bin AE [nT] (4-hr average leading up to SZ)# SZs/colored bin(a) ELFIN Lifetime AE Coverage (b) ELFIN Lifetime Sym-H Coverage (c) ELFIN Lifetime P DYN Coverage AE<100nT 100<AE<300nT AE>300nTSym-H>10nT |Sym-H|<10nT Sym-H<-20nTPdyn<2nPa Pdyn>3nPaMLT(a) AE (b) Sym-H (c) P dyn(d) ELFIN Lifetime MLT Coverage MLT=0# of SZs/MLT sector Fig. 4. ELFIN lifetime coverage binned by (a) auroral electrojet (AE), (b) high resolution Dst (Sym-H), and (c) solar wind dynamic pressure (P dyn) levels (King & Papitashvili, 2005). (d) shows lifetime MLT coverage in light blue, while each ring indicates the di fferent levels /states of activity /magnetosphere per MLT sector based on color coding indicated at the bottom right. Geomagnetic indices used here are averaged over 4 /0.5/0.5 hours leading up to each science collection; AE indicates substorm activity with quiet /moderate /active corresponding with yellow /orange /dark orange; Sym-H indicates storm activity and ring current strength, with compressed magnetosphere /quiet geomagnetic activity /active geomagnetic activity corresponding with pink /purple /blue; P dynindicates the dynamic pressure of the solar wind on the magnetosphere, with larger values (red) indicating strong magnetospheric compression. The data is further binned as a function of three geomagnetic indices, mean AE (averaged over 4 hours prior to the SZ), Sym- 154 H (Dst), and P dyn(both of which are averaged over the 30 minutes prior to the SZ). Figure 4(a-c) show coverage binned by 155 magnetospheric conditions. Although most of the time the magnetosphere is quiet, exhibiting low substorm activity (yellow, with 156 AE<100 nT), Figure 4a shows that ELFIN made the vast majority of its collections at times of moderate geomagnetic substorm 157 activity (orange, with 100 <AE<300 nT). This is because when storms (generally including multiple intense substorms) were 158 forecast or ongoing (based on Kp and AE indices), operators would schedule more science collections than normal, meaning 159 that ELFIN’s AE coverage does not represent the actual statistical AE occurrence. This can be seen by an unnatural peak in the 160 histogram at about AE ∼250 nT and a general skew of collections preferentially towards active times (dark orange, with AE >300 161 nT). Such collections provided the desired abundance of collections during periods of strong plasma injections with intense wave 162 activity. 163 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 9 Figure 4b shows ELFIN coverage binned by Sym-H (minute resolution ring current index, Dst), where most measurements 164 are made under quiet-time magnetospheric conditions (purple, |Sym-H|<10 nT). There is fair coverage when Sym-H <−20 nT 165 (pink), which represents pronounced ring current and plasma sheet (ion and electron) injections, typically associated with EMIC 166 wave-induced electron precipitation in addition to storm-time electron acceleration and pitch-angle scattering by whistlers. 167 Figure 4c shows ELFIN coverage binned by P dyn, the solar wind dynamic pressure on Earth’s magnetosphere. The majority of 168 SZs are collected during non-compressed magnetospheric conditions (green, with P dyn<2 nPa). However, there is su fficient cov- 169 erage during compressed magnetospheric conditions (red, with P dyn>3 nPa) when dayside drift shell splitting and magnetopause 170 shadowing e ffects are more pronounced, allowing for studies of geomagnetic field topology e ffects on electron anisotropy, wave 171 generation, wave-scattering, and subsequent precipitation. 172 There are a total of 9,200 SZs included in Figure 4, which is fewer than the 12,500 SZs mentioned above in Section 2 because 173 the criteria used here are stricter: we excluded all data that is (1) collected in the South Atlantic Anomaly (SAA), (2) contained 174 low precipitation /count rates, or (3) contained any significant data quality issues. Conversely, including all ELFIN data without any 175 restrictions results in a much larger number of SZs downlinked: around 20,000 SZs. Although many of these collections have data 176 gaps, they are still usable (e.g., Tsai et al., 2023; Tsai et al., 2024, statistically analyzed ELFIN data at the spin level). 177 ELFIN’s large coverage of MLTs and geomagnetic conditions enables studies which can statistically characterize various types 178 of wave-particle interactions (e.g., Angelopoulos et al., 2023; Capannolo et al., 2023; Tsai et al., 2023; Tsai et al., 2024; Zhang 179 et al., 2022a), compare electron lifetimes in the radiation belt with models (Mourenas et al., 2021, 2024), and investigate phenomena 180 such as isotropy boundary properties and their dependence on activity and longitude (Wilkins et al., 2023). Additionally, ELFIN’s 181 spatially and geomagnetically comprehensive collections yield increased opportunities for active time conjunction studies with 182 other spacecraft and ground-based observatories (see examples of such studies in Chen et al., 2022; Grach et al., 2022; An et al., 183 2022; Gan et al., 2023). In particular, ELFIN and THEMIS (Angelopoulos, 2008) coordinated their collections to make multiple 184 daily measurements when ELFIN’s orbital plane aligned well with either THEMIS’ inbound or outbound leg of its orbit through the 185 inner magnetosphere. As shown in Figure 5, by deliberately including, in a similar fashion, conjunctions with other observatories 186 whenever it was opportune to do so (ERG (Kasahara et al., 2018), MMS (Burch et al., 2016)) and by the sheer volume of data 187 enabling conjunctions with GPS (GPS53–73, excluding 60) (Distel et al., 1999; Morley et al., 2016, 2017), and DMSP (DMSP15- 188 18) (Hardy et al., 1984; Greenspan, 1986; Rich & Hairston, 1994) satellites, we find that ELFIN has obtained thousands of high- 189 quality conjunctions (fairly strict criteria of ∆MLT<1 and ∆L<1) with other missions. By relaxing the conjunction constraints, 190 either spatially or especially temporally, the number of conjunctions available for study grows substantially. In terms of ground 191 station coverage, many ELFIN collections were preferentially planned with their ionopsheric footprint over North America /Canada, 192 so a large fraction of SZs additionally coincide with all-sky imager and ground magnetometer coverage. 193 Spacecraft conjunction coverage as a function of Land MLT is shown in Figure 5a, where conjunctions with equatorial space- 194 craft here are defined as any high-quality SZ within ∆MLT<1 and ∆L<1. This comprehensive coverage with equatorial missions 195 provides key wave and particle inputs, enabling a large number of case studies to be performed. For example, Artemyev et al. 196 (2021, 2024a) confirmed that ducted whistler-mode waves are likely a significant contributor to relativistic electron losses using 197 ELFIN, in conjunction with ground VLF receiver stations and equatorial spacecraft measurements. Tsai et al. (2022) showed that 198 THEMIS wave and plasma measurements, when modeled, produced a precipitation distribution closely matching ELFIN observa- 199 tions, while Gan et al. (2022) used several events of ELFIN-THEMIS conjunctions to provide the first direct evidence of high-order 200 resonance-driven relativistic electron precipitation. Angelopoulos et al. (2023) and Grach et al. (2022) utilized ground-based EMIC 201 10 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx MLT=0 Outer ring (blue): # of SZs in conjunction with equatorial spacecraft Total: 1662 ELFIN SZs Inner ring (green): # of SZs in conjunction with DMSP Total: 1111 ELFIN SZs95 204 198 153 109 67 36 10 29 4141 45 416373768269242463523928 45941 26 55 101 145 105 91 64 24(b) MLT Coverage of ELFIN Conjunctions with Equatorial Spacecraft and DMSP Equatorial spacecraft conjunctions are de/f_ined as /uni0394MLT < 1 and /uni0394L < 1. DMSP conjunctions are de/f_ined as /uni0394MLT < 2 and no L restrictions since both spacecraft cross all L shells within 10 minutes. Magnetic Local Time (MLT) L shell # of SZs# of SZsERG: 101 GPS: 682 MMS: 23 THEMIS: 856(a) Coverage of ELFIN Conjunctions with Equatorial Spacecraft Fig. 5. Lifetime ELFIN conjunctions with 4 equatorial missions ( ∆MLT<1 and ∆L<1) are shown geographically in (a) as a function of L shell and MLT with corresponding histograms in log scale. These are further binned by MLT sectors in (b), with the blue bars and outer numbers indicating total equatorial spacecraft conjunction events in each MLT sector. The green bar and inner numbers indicate ELFIN conjunctions with the polar orbiting DMSP spacecraft defined as∆MLT<2. There are more conjunctions with other missions and ground stations not shown here. measurements to explain ELFIN-observed relativistic electron losses, while Capannolo et al. (2023) di fferentiated between rela- 202 tivistic electron precipitation driven by EMIC waves versus curvature scattering using ELFIN-conjunctions with ring-current ion 203 precipitation observations from POES. Sergeev et al. (2023) combined ELFIN precipitation measurements with near-equatorial 204 THEMIS data to construct a detailed magnetic field model of substorm dynamics. Notably, two new mechanisms of bursty, sub- 205 relativistic electron precipitation were discovered using multiple conjunctions of ELFIN with near-equatorial measurements of very 206 oblique whistler-mode waves: nonlinear Landau trapping (Artemyev et al., 2022b) and loss-cone overfilling (Zhang et al., 2022b). 207 Figure 5b also includes DMSP conjunctions (green bars), polar-orbiting spacecraft capable of measuring the thermal population 208 of electron precipitation in a mostly noon-midnight sun-synchronous orbit. The conjunctions here are defined as collections within 209 ∆MLT<2 of each other, regardless of dependence on L, since they both cross all Lshells within 10 minutes of each other. DMSP- 210 ELFIN conjunctions have already been used to study energetic electron precipitation embedded within sub-auroral polarization 211 streams (SAPS) (Artemyev et al., 2024b) and energetic electron losses from plasma sheet injections (Shen et al., 2022b). These 212 types of studies are only possible thanks to the extensive coverage ELFIN provided through the Refactor 2.0 e ffort, discussed below. 213 4. Refactor 2.0 214 4.1. Planner, Intents, and Allocations 215 The original operational design for planning and scheduling spacecraft activities was accomplished in the Planner software 216 module. The original Planner had a timeline view which allowed the user to view all pertinent orbital events and add spacecraft 217 activities as they desired. However, matching all these activities with resources used on the spacecraft was too complex to automate 218 and was therefore done manually. As a result, this flexibility led to a complicated experience where operators were oftentimes 219 juggling several tens of di fferent activities daily, manually keeping track of how the state of each activity evolved over time and 220 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 11 Fig. 6. A screenshot of the Planner in April 2021. In the calendar view, green denotes when all necessary Intents are confirmed aboard the spacecraft for that day. This allows operators to quickly tell which days and what activities have yet to be planned. Intent /Allocation states are color-coded on the bottom bar. Clicking on the "wands" will bring up Intent creation "wizards" for each type of Intent. Clicking on each day shows a summary of the Intents planned at the bottom right. The 14th is red because Downlinks Intents over non-UCLA stations have yet to be created. The Downlink Completeness Table (DCT) on the top left side provides up-to-date downlink completeness percentages and Intent states for each Science Compression Intent. Expanding each of those would show the associated downlink completeness and Allocation state for each of the associated science collections. The spin log on the lower left corner shows the latest spin rates. figuring out each planned activity eventually mapped to spacecraft memory to determine where future activities could be stored. 221 Thus, the operations team used several supplemental spreadsheets just to maintain updated status on daily operations; this tedious, 222 time-consuming e ffort rapidly became untenable. 223 The refactored Planner (Figure 6) removed the timeline view, instead opting to build a new workflow around “wizards” (similar 224 to generic software installation wizards) where the user interface would guide operators through a sequence of simple allowable 225 steps, allowing them to plan each spacecraft activity while following a rigid set of rules that were enforced by the software logic 226 in the background. Each spacecraft activity would be associated with an Intent – which refers to a high-level spacecraft activity, 227 such as collecting science, performing attitude maneuvers, compressing science data, downlinking data over a communication pass, 228 etc. Thus, each Intent would have its own dedicated wizard workflow. Intents carry all the information necessary to perform the 229 particular activity in a human-readable format in addition to the Scope , which is the property that allows Intents to be compared 230 to each other, thus allowing the software logic in the background to ensure that Intents do not overlap or conflict. Intents require 231 onboard resources to be executable, such as flash memory space or scheduler space, that would dynamically change as a result 232 of the intended flow of execution. The mapping from an Intent to a resource was defined as an Allocation . Thus, this paradigm 233 would become known as the Intents and Allocations paradigm, because any activity onboard the spacecraft could be traced to an 234 Intent (high level, human-readable information) and its associated Allocation (how this particular activity was to be executed on 235 the particular spacecraft). A rigid series of rules and constraints was implemented in the background to keep operations safe and 236 prevent unintended behavior: Intent rules were designed to ensure no conflict of activities and scheduling, while Allocation rules 237 would ensure no conflicts onboard spacecraft resources. Further definitions and rules are detailed in Appendix A. 238 The eight di fferent ELFIN Intents are as follows: 239 1.Science Collection Intents help ELFIN achieve the primary goal of the mission by enabling a specified mode of science 240 collection across any number of Science Zones throughout an entire day. The wizard allows the operator to select any 241 12 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx Science Zone that does not conflict with any other intent. It would also display geomagnetic activity and highlighted periods 242 of conjunctions with the THEMIS probes. In addition, the wizard would check the other ELFIN satellite’s Science Collection 243 Intents and highlight any SZ within 30 minutes of an already selected SZ. This enabled studies of the spatial and temporal 244 evolution of kinetic scale to mesoscale phenomena, such as Zhang et al. (2023a). 245 2.Science Compression Intents were necessary for ELFIN to bring down the volume of science data generated since the data 246 compression operation had to be commanded. This introduced a lot of hidden complexity, as there were many di fferent 247 types of science data, several options for data compression, and multiple compression timestamps associated with each data 248 compression. 249 3.Attitude Collection Intents were nominally required every other day to assess the attitude (orientation) of the spacecraft. 250 Attitude knowledge was accomplished by recording 24 minutes of 3.125 samples per second (SPS) magnetoresistive mag- 251 netometer (MRM) data (mounted on the electronics boards within the spacecraft-body) while avoiding terminator crossings 252 (because the battery charging regulators produced random o ffsets in the MRM data that were di fficult to calibrate out). 253 4.Spin Maneuver Intents were typically required twice a week to maintain ELFIN’s desired spin rate. These were typically 254 centered at the magnetic equator, where the B field magnitude is weaker and allowed for fine control of the spin rate. 255 5.Reorientation Maneuver Intents were typically required once a week to maintain ELFIN’s attitude pointing. This was a 256 ground-in-the-loop commanded maneuver involving a suite of software tools called Attitools (see Appendix B). 257 6.Downlink Script Intents were the only non-temporal intent, and allowed operators to select what data to downlink and store 258 on an addressable script onboard the spacecraft. These scripts could then be used for downlink during UCLA (commanded) 259 or non-UCLA passes (scheduled). 260 7.UCLA Pass Prep Intents were simple scripts that were scheduled before a communications pass over UCLA and ensured 261 the spacecraft was set to a known consistent state and ready to downlink. 262 8.Non-UCLA Pass Intents performed the same activity as UCLA Pass Prep intents in addition to linking to a specified 263 Downlink Script such that data was automatically transmitted over a non-UCLA ground station. 264 Most of these Intents have unique scheduling constraints, but we refrained from fully automating this in order to avoid hidden 265 complexity. The goal was to deliberately balance what operators can and cannot control: automate too much and the system 266 becomes a rigid black box that students have no ownership over; automate too little and the system becomes tedious, cumbersome, 267 and error-prone. Thus, the compromise was that operators would select a time window (representing the scope of an intent) and 268 the software would find the optimal time within the window to schedule something. For example, in the Spin Maneuver generation 269 wizard, the operator would be presented with the historical trend of spin rates, a few options for configuring the spin control law, 270 and a selection menu showing all valid 2-hr windows (the scope). Upon choosing a 2-hr window, the Planner will pick a time that 271 centers the spin maneuver over the magnetic equator and on the next window, the user will select what scheduler address on the 272 spacecraft to use. Therefore, a simple two-page wizard allows the operator to quickly create an Intent and Allocation in a traceable 273 and conflict-free manner. Operators typically created 20-30 Intents per spacecraft per day, which would normally take about 30 274 minutes (including the next steps which involve translating the Intents /Allocations to commands and generating command load 275 files). Prior to Refactor 2.0, operators would spend an average of 3 hours per spacecraft per day and achieve, at best, about 10 SZs 276 per spacecraft per week. In the first month after the release of Refactor 2.0, operators were spending only 3 hours on console per 277 spacecraft per week and downlinking nearly 50 SZs from each ELFIN per week. By version 3.0 of the ELFIN operations software 278 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 13 (which notably enabled inner belt observations in March of 2021), the operations team achieved 75 SZs per spacecraft per week 279 without spending more time: this is roughly a 50-fold e fficiency increase compared to pre-Refactor 2.0. 280 4.2. Downlink Completeness Table 281 A major theme of the refactoring was providing contextually useful information. By taking advantage of the Intents /Allocations 282 framework, we could track the state of Allocations from beginning to end, and therefore quickly understand the state of the space- 283 craft as a whole. The Downlink Completeness Table (DCT) integrated key aspects of the science data processing pipeline into the 284 Planner and leveraged the new layered levels of insight a fforded by the paradigm of Intents and Allocations in order to give opera- 285 tors direct access to information regarding collections of science data, onboard data processing /compression status, and downlink 286 status /completion rates. The full view is accessed in the Downlinks tab in the Planner (not shown), but a smaller preview can be 287 seen in the upper left side of Figure 6. 288 The DCT shows all science collections (based on Science Collection Intents), grouped into uncompressed and compressed (based 289 on Science Compression Intents). This consolidation was already beneficial, as operators previously used spreadsheets to track the 290 many di fferent types of timestamps associated with each science collection: (1) the science collection date; (2) the ntimeranges 291 associated with the nplanned science zone crossings throughout that given date; (3) the science compression timerange; (4) up to 292 four science compression timeranges (one for each product: EPDE, EPDI, FGM, and inner belt data); (5) the downlink time (of 293 which data is typically downlinked over 2-4 passes to ensure high completeness percentages). This quickly became confusing, as 294 there was a fast-growing number of new timestamps required to keep track of command state and future command generation that 295 was produced each day. The DCT was thus the cornerstone of the refactored Planner as it consolidated, grouped, and provided the 296 status of every SZ ELFIN collected. By presenting the downlink completeness rates of each SZ, the operator could easily recognize 297 which SZs needed the most attention; they could then map the desired data and timestamps to the Downlink Script Intent wizard 298 without typing anything. As one of the largest sources of operator error came from manually typing timeranges and timestamps, 299 completely avoiding that step (and minimizing typing in general) during planning operations saved time and ensured that every 300 downlink worked as intended. 301 4.3. Management 302 Ultimately, ELFIN was a small student-driven development and satellite operations team. An oft repeated phrase in spacecraft 303 engineering is to “push complexity to the ground.” In this case, however, a simple but flexible flight software design on ELFIN 304 made satellite operations untenable, incurring significant team attrition and resulting in software that was incompatible with the 305 team it was supposed to help. We recognized quickly that the solution was for the operations software design to focus on being as 306 understandable and traceable as possible, prioritizing these facets at the cost of performance, flexibility, and other factors. Refactor 307 2.0 was a significant undertaking that vastly simplified the operational paradigm, despite growing the codebase to nearly half a 308 million lines of code across 15 di fferent custom software modules (see Figure A.13). However, there was also a big focus on 309 layered code organization, which led to easier-to-maintain code and reduced troubleshooting times when issues arose. This gave 310 both the operations and the software developers teams more time to tackle o ff-nominal operations and develop future improvements 311 to the ground software. 312 Another key aspect of Refactor 2.0’s success was ensuring that workers and stakeholders were in constant communication. This 313 was done by having developers regularly operate the spacecraft along with the dedicated spacecraft operators, forcing operators to 314 present operational metrics to the science team weekly, and creating automated "tohban" (i.e., Autohban) reports (in the context 315 14 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx of prior science missions like RHESSI and THEMIS, this term refers to a person-in-charge, a scientist whose job is to check the 316 science quality of observations and quickly notify the operations team if anything is amiss) that allowed scientists to quickly and 317 consistently convey any issues to the student team through a standardized format. These combined decisions led to a positive 318 feedback cycle that continually fixed operational problems by focusing on metrics, usability, and transparency. It formalized and 319 standardized both operations and scientific oversight, leading to streamlined operations, rapid detection of any science quality 320 issues, and allowed operators to focus on bringing down the most useful science data. 321 5. ADCS 322 The newly refactored operations a fforded the team more time and data volume to begin improving other aspects of the mission 323 by updating and expanding the Intents and Allocations framework. This quickly enabled an expansion of science scope as well, 324 beyond the goals of the minimum mission (outer-belt electron collections). New targets included studies of the inner belt and 325 doubling the pitch-angle resolution of the EPD collections (from 16 to 32 sectors per spin). After streamlining science operations, 326 resources were then allocated to resolving two issues related to science objectives beyond minimum science: 1) fully calibrating 327 the EPDI (ion) data (ion data is not discussed in this paper, but the data is shown in, e.g., Shen et al., 2023a; Artemyev et al., 2023, 328 2024b) and 2) improving the quality and flexibility of science zone collections by fixing ELFIN’s ADCS. 329 ELFIN utilized a highly stripped-down ADCS architecture that relied on only one sensor and one pair of actuators. This is 330 possible due to the spin-stabilization provided by the stacer boom, which damps rotation about other axes (wobble) other than the 331 primary Z spin axis. Because ELFIN is spin-stablized, its attitude can be described by its spin axis vector in GEI (Geocentric 332 Equatorial Inertial) in addition to its spin rate. Attitude determination is performed on the ground, utilizing data collected from 333 a low-cost, but reliable 3-axis HMC5883L magnetoresisitve magnetometer (MRM). For redundancy, each ELFIN contained two 334 MRMs placed on electronics boards on either side of the spacecraft. Spin rate was maintained at ∼21.15 RPM with a magnetorquer, 335 an air coil (along the Y face), using closed-loop B-act and B-dot algorithms. The former relied on applying a torque based on the 336 actual magnetic field, and reliably worked down to zero spin; the latter is widely used for detumbling spacecraft (Stickler & 337 Alfriend, 1976; Lovera, 2015). On ELFIN, B-dot was tuned to control spin rates from 7-35 RPM, while B-act was slightly less 338 efficient and designed to work at all spin rates. This worked well right from the beginning of the mission, immediately after launch, 339 enabling early orbit operations. Spin control is described in more detail in Appendix B. 340 “Reorientations” (or “reors” for short), on the other hand, could not easily be tested at a hardware level on the ground and instead, 341 verification relied on simulation for maneuver planning and validation on orbit. The spacecraft spin axis is precessed by pulsing the 342 Z-coil at precise points in orbit when the magnetic field lined up in such a way that the torque generated would move ELFIN’s spin 343 axis towards its target vector. A reor would typically require four short (1 −5 min) pulse sequences per orbit, where the duration 344 of each pulse was determined by the error tolerance: longer pulses result in faster reors with lower precision. Nominally, ELFIN 345 would perform 20 −30◦reors over∼10 orbits with minute-long pulses to keep control precision well below 1◦. 346 Reors, however, were di fficult to verify on orbit due to our uncertainty in attitude determination, which arose from MRM o ffsets 347 on the order of 1000 nT that changed every time the spacecraft was rebooted. This complicated attitude determination early in 348 the mission, which was still possible assuming spin-axis evolution was changing slowly (which was the case in the absence of 349 reor maneuvers). Therefore, as long as the spin vector was evolving not too far from orbit normal, lack of control did not a ffect 350 science significantly. The EPDE data sectoring used the onboard FGM instrument while pitch-angle binning occurred on the 351 ground; both were su fficient to satisfy the primary mission. As operations streamlining and high-science yield e fforts took the 352 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 15 primary development focus initially, ADCS troubleshooting and development e fforts were relegated to a lower priority. However, 353 by mid-2021, attitude determination was revisited resulting in operational improvements, which eventually led to the successful 354 implementation of full attitude control on both spacecraft by November 2021. 355 5.1. Attitude Determination 356 -8×104-6×104-4×104-2×10402×1044×1046×104 -6×104-4×104-2×10402×1044×1046×104 IGRF X fit IGRF Y fit IGRF Z fitExample ELFIN Attitude FitMRM data [nT] IGRF /f_it [nT] 0620 0630 2021 Feb 14 0625 0615 0635 X Y Z X Z Y Fig. 7. Top panel shows a sample attitude collection (i.e., 24 minutes of MRM data collected at 3.125 SPS, in ELFIN body coordinates). ELFIN’s attitude determination procedure finds the optimal attitude that fits the MRM data, including o ffsets and gains, to the IGRF field. Results of data and model fit are shown in the second panel in (despun) GEI coordinates. To keep ELFIN capable of obtaining full pitch-angle resolution, ELFIN’s spin plane must contain the local magnetic field vector 357 within the EPD’s 22 .5◦field-of-view (FOV). In a polar orbit, this could be more simply approximated as aligning the spin plane 358 with the orbital plane. ELFIN nominally used 24-minute MRM collections (out of the ∼90 minute orbital period), which provided 359 sufficient field variance for the data to be fit to the IGRF model field. The attitude determination method was not very sophisticated 360 at first, fitting only MRM o ffsets and using a blocked-bootstrap Monte Carlo simulation to check for stability. Therefore, attitude 361 determination was unreliable with very high uncertainty (several degrees, yet still su fficient for EPDE science whose data was 362 sectored relative to the zero-field crossings using the FGM). For purposes of ADCS, though, this condition meant that we could 363 only determine the spacecraft attitude with reasonable fidelity when it drifted consistently (especially assisted by using historical 364 sine fits), but had di fficulty acquiring the absolute orientation value again after attitude reorientation maneuvers, due to abrupt 365 changes in attitude. Thus, for a large portion of the mission, operators refrained from performing reors. Rather, they planned to 366 acquire data during the best one or two out of the four possible SZ collection opportunities per orbit that minimized the angle 367 between B and the spin plane. These were found by checking when the quadrants in which the B-to-spin-plane angle is minimized, 368 simply due to Earth’s tilted dipolar field. This operations paradigm in the early part of the mission resulted in reasonable-quality 369 collections, i.e., having good pitch-angle coverage within the loss cone. While not ideal, it served the science su fficiently well until 370 fully functional attitude determination and control was enabled in November 2021. Once ADCS control was fully functional, it 371 16 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx meant that both ELFIN satellites could measure across any of the four available SZ crossings with full pitch-angle coverage and 372 resolution within the loss cone. This qualitative improvement in the science enabled a wealth of new studies which are detailed in 373 Section 6. 374 ELFIN’s ADCS software was built into a software module called Attitools , which bridged functionality between IDL code (for 375 attitude determination), Julia code (for attitude modeling), and Python code (for integration into ground operations and science 376 processing software, including generation of reor maneuver commands). This was all controlled by a custom web interface to allow 377 operators and scientists to quickly query data, verify attitude solutions, and generate reor maneuvers. 378 Y [GEI]X [GEI] Z [GEI] Result with lowest uncertainty is the best fit attitude solution: (0.681, 0.124, 0.721) Uncertainty (°)0.60 0.50 0.40 0.30 0.20 0.10 60140 80100120160180 40 20 0 0.0 0.2 0.4 0.6 0.8 1.0 Uncertainty (°)Angle from Best Solution (°)(a) Attitude Determination Sphere Method (b) Sphere results as a function of uncertainty Results converge around the best fit solution1.0 0.8 0.6 0.4 0.2 0.00.168 0.169 0.170 0.171 Fig. 8. Sphere solutions use many points evenly distributed on a unit sphere as initial attitude guesses for the fitting process. (a) depicts a 120-point sphere run using the data shown in Figure 7. The lines indicate the solution it converges to, based on the initial point (grayscale dot with shading representing distance to the viewer). The line color indicates uncertainty (higher uncertainty is orange). The green dot and green arrow show the initial guess and the solution with the lowest uncertainty; this is the final attitude solution that is used as “ground truth”. (b) shows the angular di fference to the best solution in the sphere as a function of uncertainty angular uncertainty. A inlaid zoom shows the stability of this method, since many points converge to within within a degree of the best fit attitude . To obtain the attitude, we first provide a seed attitude vector S(i.e., a guess vector), which is typically the last known attitude. 379 Next, we solve B∥=Bigr f,gei·Sfor the spin axis component of the magnetic field Bz,ssl. Then, through a moving boxcar window, 380 we solve (using minimum variance) for B∥andB⊥=B−B∥components relative to the spin axis, which allows us to produce 381 offsets and relative gains (because ELFIN is spinning stably about its Z axis). We then use the Levenberg-Marquardt (LM) multi- 382 parameter fit (a damped least squares method) to numerically obtain the best fit to IGRF with the following parameters: Gain ⊥, 383 Offset⊥, Gain∥, and spin axis angles θandϕ(all in body coordinates). The attitude is represented by the last two parameters, θ 384 andϕ, which describe the best fit spin axis that results in the best match between ELFIN’s MRM data and the IGRF field. To 385 confirm the validity of the attitude solution, we can plot the despun and calibrated MRM data on top of the IGRF field, shown in 386 Figure 7 (top panel shows raw data, bottom panel shows fitted data). From this, we can simply estimate the error in the residual by 387 taking its standard deviation about the mean in nT, or estimate the angular error by taking the geometric mean of the error about 388 the mean, and the error of the mean compared to the IGRF model. With this method, we find angular errors typically well below 389 <0.5◦. For a spin-stable spacecraft, there are only two attitude solutions that provide a good despun fit to the IGRF field: a solution 390 close to the actual attitude vector and its opposite (with a negative gain, deemed unphysical). These two solutions correspond to 391 global minimums in the manifold that describes this model within the parameter space, so if the guess vector is far away from either 392 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 17 solution, the algorithm may converge to a local minimum that is unstable (i.e., has large angular error). Therefore, if we need to 393 ascertain the validity of an attitude solution output, we first look at the angular uncertainty to determine the solution trustworthiness, 394 then validate with solar panel currents to ensure the sign is correct. Additionally, we can repeat this process across an entire sphere 395 of initial guess vectors. This is shown in Figure 8a with the grayscale dots representing 120 seed vectors evenly distributed around 396 the sphere (the shading denotes distance to the viewer, black is closer, gray is further away). The green arrow denotes the solution 397 with the lowest uncertainty, and the rest of the lines lines point in the direction that the solution using that particular seed vector 398 converged to. The color scale denotes the angular uncertainty with orange representing larger uncertainty; note that the green lines 399 are thus either pointing along or opposite to the best fit solution. It is evident how sensitive the final solution is to the initial guess: 400 for those points in roughly the same direction (around ∼30◦), all the solutions converge to the best fit solution. However, if the seed 401 vector is too far o ff, the results can converge either in the opposite direction, a perpendicular direction, or somewhere in between 402 with significantly more variance. The reliable sphere attitude determination method was used to establish ELFIN’s “ground truth” 403 attitude. We would then use an attitude propagation simulation, detailed in the next section, to model ELFIN’s attitude in between 404 solutions which would then be used for EPD calibration routines. 405 5.2. Attitude Modeling and Reorientations 406 At an inclination of about ∼93◦, ELFIN’s attitude must keep up with the precession of its orbital plane as it rotates ∼0.5◦/day. In 407 addition, the attitude control system must account for magnetic perturbation torques despite our best e fforts to keep the spacecraft 408 magnetically clean. This is due to the residual magnetic moment dipole from the batteries’ steel casings and the shielded 2.5 409 kG octupole broom magnet in the EPDI instrument. The two battery pairs were placed inverted from each other on the -X side 410 such that their moments would cancel; on the +X side, the EPDI’s broom magnet was placed such that its dipole moment would 411 be balanced by the batteries, minimizing the overall e ffective dipole moment. Ground testing in a magnetically clean chamber 412 estimated the flight units to have nearly identical e ffective dipole moments in the range of µz=−0.015±0.005 A m2, consistent 413 with our observations from spin-axis drift rate in Earth’s field, in space. We care only about the magnetic moments along the spin 414 axis because torques associated with the permanent magnetic moments on the spin plane µx/yare averaged out over the spacecraft 415 spin. 416 On orbit, these perturbation torques amounted to a drift of up to 2◦per day. Attitude modeling and reorientation maneuver 417 generation is implemented in the Julia language (Bezanson et al., 2017), and a block diagram of its design is shown in Figure 9. 418 The largest contributor to attitude drift was found to be the residual dipole moment and using a value of µz=−0.014±0.005 and 419 µz=−0.0125±0.005 on ELFIN A and ELFIN B, respectively, was experimentally found to most closely fit ELFIN’s spin axis 420 on-orbit evolution over time. Figure 10 shows attitude modeling results (lines) filling in the gaps between actual solutions (dots) for 421 ELFIN B over a 1 month period with no reors. The solutions generally converge well from one solution to the next. Average angular 422 error for solutions one day apart was about 0 .8◦, while accumulated angular error was up to 2◦when modeling over a 7-day period. 423 This indicates that the modeling stability is quite good, with low accumulated error. This is evident when examining the Z values 424 of the spin axis in Figure 10, where it often seems like the attitude determination algorithm has converged on a spin axis Z value 425 that is slightly o ff, despite having low statistical uncertainty. This remained an unresolved issue with our attitude determination 426 algorithm, but was manageable given that the overall error still remained <1◦even in the worst case scenario. Investigation of this 427 issue is on-going, as an academic curiosity. 428 Figure 11 shows six months of attitude data from ELFIN-A from January 1 to June 1, 2022. In the top panel, the dots represent 429 each of ELFIN A’s attitude solutions (spin axis) in GEI coordinates connected by straight lines. The target attitude, the orbit normal 430 18 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx Eddy currents are due to a design /f_law where the torquer coils made a ground loop when OFF. This is the primary eﬀect slowing ELFIN’s spin rate. Residual dipole in the Z direction due to the EPDI’s broom magnet is the primary cause of attitude dr/f_it. When attitude modeling (rather than generating reorientation maneuvers), saved torques are fed into the “Z Coil State” block instead. Fig. 9. Block diagram of the integrator used to model ELFIN’s attitude, either to generate reorientation maneuvers operationally, or to model ELFIN’s attitude between solutions. TimestampELFIN B Attitude Vector (GEI)1.0 0.5 0.0 -0.5 -1.0 2021-05-13 2021-05-20 2021-05-27 2021-06-03 2021-06-10 Fig. 10. Attitude solutions (assume ground truth) is shown as dots, while attitude modeling is used to predict ELFIN’s attitude between solutions. Modeling works well even over long periods of time with no attitude solutions, but has some convergence issues in the ZGEIaxis(although the total angular error is trivial). vector, is shown with the dashed lines in corresponding colors. Vertical dashed lines indicate each time a reorientation maneuver 431 was performed, roughly once a week. In early April, ELFIN’s orbital plane was approaching a noon-midnight orbit (for both 432 spacecraft), which represents its worst power state with maximum shadow and less incident sunlight on solar cells. ELFIN A’s 433 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 19 (a) Normalized Attitude Vector in GEI (b) Angular Difference between Attitude and Orbit Normal (deg) (c) Spin Rate (RPM)2022-01-01 2022-02-01 2022-03-01 2022-04-01 2022-05-01 2022-06-01-1.0-0.50.00.51.0 2022-01-01 2022-02-01 2022-03-01 2022-04-01 2022-05-01 2022-06-012022-01-01 2022-02-01 2022-03-01 2022-04-01 2022-05-01 2022-06-01 21.0021.502030 20.5020.7521.2510Error Threshold: 22.5°Vertical pink lines indicate reorientation maneuvers, dashed RGB lines indicate orbit normal vector Vertical pink lines indicate reorientation maneuvers Vertical blue lines indicate spin up maneuvers Target spin rate: 21.15 RPM Fig. 11. This figure shows 6 months of ELFIN’s attitude data from January 2022 to June 2022. (a) shows the attitude solutions in GEI coordinates with the target attitude vector in dashed lines. Vertical lines indicate reor maneuvers in both (a) and (b), keeping ELFIN’s spin plane aligned with the orbit plane. On April 10th, 2022, a near-180◦flip was performed in order to place the side of ELFIN that has more solar cells towards the sun for increased power input. (b) indicates the absolute angular di fference between the target vector and ELFIN’s attitude, where the science requirement is to keep the angle below 22 .5◦. (c) shows spin rate evolution over time with vertical lines indicating spin maneuvers. attitude was such that, post noon-midnight, the -Z panel (with only 4 solar cells as opposed to the 6 solar cells on the +Z panel) 434 would be facing the sun. Therefore, the team executed a ∼155 degree flip, performing torques over 24 hours to rotate the spacecraft 435 to a more optimal power state. Figure 11b shows the absolute angle between the attitude solution and the orbit normal vector, 436 and during this flip, the target goal was to undershoot by 25 degrees for a more favorable power state (to satisfy science attitude 437 requirements while maximizing power generation) while the natural attitude drift would slowly drift to the target vector as the 438 orbit precessed. Even with such a large reor maneuver, the final attitude was only 1 .92◦offfrom the expected attitude. Typical 439 reor maneuvers were generally around ∼10 orbits long (∼15−16 hours) and precise to within a degree of their intended target. 440 Figure 11b shows that the operations team was able to reliably keep the spin plane aligned below the 22 .5◦threshold for optimal 441 pitch-angle resolution, per mission requirements. Figure 11c shows spin control over time, keeping as close to the target of 21.15 442 RPM as possible. More details on spin control can be found in Appendix B. 443 6. Pitch-Angle Resolved Electron Distributions at LEO 444 Obtaining full pitch-angle distributions is important when trying to understand the coupling between magnetospheric, iono- 445 spheric, and atmospheric physics. For example, Capannolo et al., (2024) (to be submitted, paper title: “Unraveling the Atmospheric 446 Energy Input and Ionization due to EMIC-Driven Electron Precipitation from ELFIN’s Observations”) used ELFIN observations 447 20 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx to examine the pitch-angle evolution of relativistic electron fluxes driven by EMIC waves. These energy-binned pitch-angle distri- 448 butions provided previously unavailable inputs for the Boulder Electron Radiation to Ionization (BERI) model—a comprehensive 449 ionization model (Xu et al., 2020)—and show that EMIC-driven precipitation contributes significantly to the production of iono- 450 spheric ionization and atmospheric ozone depletion. In addition, the backscatter of these electrons (i.e., electrons in the loss cone 451 that bounce back and remain trapped for another bounce period) depends critically on their pitch-angle. Fluxes that are closest to 452 the loss-cone are backscattered most e fficiently, whereas electrons that are very field-aligned backscatter very little. This is why 453 studies like Berland et al. (2023) use ELFIN’s pitch-angle coverage within the loss cone to test their ionization models (see Figure 454 15 in Berland et al., 2023). 455 Another application of narrow FOV pitch-angle sectors cleanly sampling the loss cone is for the detection of microbursts, short- 456 lived and intense bursts of electron precipitation that can reach MeV energies but typically last for ∼100 ms (Chen et al., 2022). 457 Although not originally designed to study microbursts, ELFIN can identify them in the precipitation spectrum by sharp increases in 458 the precipitating flux above ambient values anywhere within the loss cone when they become comparable to or exceed the trapped 459 flux (see Figure 1b in Zhang et al. (2022a)). These ephemeral flux increases can only be di fferentiated from the trapped fluxes 460 within a background of di ffusive precipitation flux at least one order of magnitude below the trapped flux. This is only possible if 461 precipitating fluxes are cleanly measured for multiple spin sectors within the loss cone (i.e., well-separated from the trapped fluxes) 462 which can only occur when there is at least 45◦between the loss cone edge ( αLC≈65−70◦pitch-angle) and the detectors once 463 per spin. This translates to an attitude requirement such that the B-field must be no more than ∼67.5◦−45◦=22.5◦away from 464 ELFIN’s spin plane. This cannot be done fortuitously and requires control. Throughout the ELFIN era, ∼1000 microbursts have 465 been identified (statistical analysis has been performed on 322 of those in Zhang et al., 2022a). 466 Indeed, nearly any scattering mechanism that drives energetic electron precipitation can be remotely studied using the ELFIN- 467 measured precipitating-to-trapped flux ratio as a diagnostic. This ratio reflects the strength of the precipitation relative to its locally 468 mirroring population as a function of energy and usually bears unique signatures of electron precipitation drivers; however, it can 469 only be reliably measured with the correct spacecraft attitude. By aligning ELFIN’s spin plane approximately with the orbital plane 470 (since ELFIN is in a polar orbit), the full pitch-angle distribution can be resolved, and each population—trapped, precipitating, and 471 backscattered—provides even more insight into precipitation drivers. In some cases, though, relying on the Jprec/Jtrapflux ratio is 472 not enough. For example, ELFIN data was used in Shen et al. (2022b, 2023b) to investigate electron losses driven by kinetic Alfven 473 waves during substorm injections. The pitch-angle distributions were essential for distinguishing between anisotropic precipitation 474 (Jprec<Jtrap) driven by KAWs at low energies and whistler-mode waves at intermediate energies from isotropic precipitation 475 (Jprec≈Jtrap) produced by field-line scattering at higher energies (see Figure 2(c-e) in Shen et al., 2022b). Hence, the use of both 476 theJprec/Jtrapflux ratio and pitch-angle distributions together enable us to clearly distinguish between various precipitation drivers. 477 These are therefore powerful remote diagnostics for studying magnetospheric phenomena. 478 Here, we show multiple cases of both Jprec/Jtrapflux ratios and pitch-angle distributions from ELFIN that exemplify various 479 types of wave-particle interactions or field line scattering in Figure 12. For each case, the energy spectrogram of trapped fluxes 480 (locally trapped /outside of the bounce loss cone; top left panel), energy spectrogram of precipitating-to-trapped flux ratios (bottom 481 left panel), and pitch-angle distributions (right panel) are shown. For example, EMIC wave-driven electron precipitation is char- 482 acterized by intense MeV-level precipitation, and specifically exhibits a filled loss cone at MeV energies, but not at lower energies 483 (as seen in Figure 12d and Angelopoulos et al., 2023; Capannolo et al., 2023). Whistler-mode chorus waves, on the other hand, 484 are more e ffective at scattering electrons in the tens to hundreds of keV (Nishimura et al., 2010; Kasahara et al., 2018; Thorne 485 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 21 Credit: NASA’s Goddard Space Flight Center Mary Pat Hrybyk-Keith 102103104105106 102103 0 30 60 90120150180 10−210−1100 1001000 06:28 06:29 06:30 06:31 102104106 1001000 2022-08-02 ELFIN B pitch-angle, °Jprec/Jtrap energy, keVJtrap energy, keV 102103104105106 102103 0 30 60 90120150180 10−310−210−1100 1001000 05:02:30 05:03:30 05:04:30 102103104105106 1001000 2022-04-18 ELFIN A pitch-angle, °Jprec/Jtrap energy, keVJtrap energy, keV 103104105 100 50200500 0 30 60 90 120 150 180 10−310−210−1100 1001000 12:40:3012:41:3012:42:3012:43:30 102103104105106 1001000 2020-08-04 ELFIN A pitch-angle, °Jprec/Jtrap energy, keVJtrap energy, keV 102103104 102103 0 30 60 90 120 150 180 10−210−1100 1001000 09:30 09:32 09:34 09:36 102104106 1001000 2020-10-04 ELFIN A pitch-angle, °Jprec/Jtrap energy, keVJtrap energy, keV 103104105 1001000 0 30 60 90 120 150 180 10−210−1100 1001000 06:15:00 06:16:00 06:17:00 06:18:00 102104106 1001000 2020-03-12 ELFIN A pitch-angle, °Jprec/Jtrap energy, keVJtrap energy, keV 103104105106 100 50200 0 30 60 90 120 150 180 10−310−210−1100 100200500 13:4213:4413:4613:4813:50 102103104105106 100200500 2021-06-23 ELFIN A pitch-angle, °Jprec/Jtrap energy, keVJtrap energy, keV 102103104105106 102103 0 30 60 90120150180L~7 10−210−1100 1001000 12:20:00 12:21:00 12:22:00 12:23:00 102104106 1001000 2021-08-30 ELFIN B pitch-angle, °Jprec/Jtrap energy, keVJtrap energy, keV 102103104105106 102103 0 30 60 90120150180 10−310−210−1100 1001000 01:0901:1001:1101:1201:1301:14 102103104105106 1001000 2020-11-21 ELFIN A pitch-angle, °Jprec/Jtrap energy, keVJtrap energy, keV loss coneL~12L~4 L~7.5loss coneL~3.5 L~8 L~7loss coneL~5 L~20 L~9loss cone L~13L~2.6 L~4loss cone L~7 L~4 L~6.5loss coneL~3 L~1.1 L~1.8L~10L~5.6 L~7loss cone L~3 L~8 L~5.5loss cone(a) Dayside Chorus Waves, MLT~12 (b) Dawn QP Chorus Waves, MLT~9 (c) WISP , MLT~2 (e) Hiss Waves, MLT~1.5 (h) Nightside Chorus, MLT~0 (g) Isotropy Boundary, MLT~22 (f) Plasma Sheet, MLT~22(d) Duskside EMIC Waves, MLT~18 (a) (b) (c) (d) (h) (g) (f)(e) Fig. 12. Trapped electron flux energy spectrograms, electron precipitating-to-trapped flux ratio energy spectrograms, and pitch-angle distributions are shown for eight examples of wave-particle interactions (a-e, h) and field-line curvature scattering (f,g). Their typical locations are roughly mapped to their equatorial footprints in the magnetosphere, depicted with various wave populations and their locations (center image courtesy of NASA GSFC /Mary Pat Hrybyk-Keith) et al., 2010; Ni et al., 2016; Nishimura et al., 2020). In particular, night-side chorus waves are typically quite intense and more 486 field-aligned, resulting in rapid filling of the loss cone at the low hundreds of keV (as seen in Figure 12h and Tsai et al., 2024); 487 however, waves on the dayside become oblique, resulting in a more di ffusive-like process involving high-order resonances where 488 precipitation is more intense closer to the loss cone edge and weaker further away (as seen in Figure 12a and Gan et al., 2023). 489 WISP precipitation, driven by VLF transmitters, is very di ffusive and characterized primarily by its energy dispersion as a function 490 of L-shell (as seen in Figure 12c and Shen et al., 2022a). Electron precipitation in the plasma sheet and isotropy boundaries are 491 isotropic and are represented by loss cones filled at all energies above the curvature scattering threshold (as seen in Figure 12(f,g) 492 and Artemyev et al., 2022a; Wilkins et al., 2023). In the plasmasphere, whistler-mode hiss waves are e ffective in weak but per- 493 sistent scattering of sub-relativistic electrons, providing weak flux levels within the loss-cone and depleting trapped fluxes at low 494 altitudes (as seen in Figure 12(e) and Mourenas et al., 2021). 495 7. Discussion 496 7.1. Lessons Learned 497 The ELFIN mission, despite being UCLA’s first CubeSat mission, has returned an unprecedented amount of science and, by some 498 metrics, compares favorably against other space weather missions. As of this writing, ELFIN’s “peer-reviewed publications (PRP) 499 per years-since-launch (YSL)” is 7.9 (see Table 1 in Spence et al., 2022)—more than double any other space weather CubeSat. 500 22 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx ELFIN achieved this while also being entirely-student run, with undergraduate students in leadership positions driving system 501 architecture and engineering design decisions. The ELFIN mission therefore makes an outsized educational impact, having given 502 around 350 students the ownership and responsibility typically bestowed upon those much further along in their careers. On average, 503 students typically join the team for 3 years, which gives more senior undergraduates plenty of time to transfer knowledge to the 504 more junior ones. Continuity of knowledge is additionally maintained through well-organized documentation and sta ffmentorship. 505 This prepares students for the future while simultaneously preparing the institution for future CubeSat-based science investigations. 506 Despite the promises of high science output by small, low-cost satellites, university-class CubeSat missions still seem to be 507 struggling to gain their footing in NASA’s portfolio. Only 10% of CubeSats successfully completed their missions and at least 508 77% failed before full mission completion for all university-class CubeSat missions from 1970-2018 (the 2018-2023 numbers do 509 not appreciably improve, see Figures 10-14 in Swartwout, 2023). Indeed, there were many points along ELFIN’s development and 510 operations timeline where achieving full mission success did not seem feasible. Several of these occurred during integration and 511 test, but the majority occurred during post-launch operations. Accordingly, we briefly highlight five important factors contributing 512 to ELFIN’s success; the first one is commonly repeated in this field, but the rest apply specifically to post-launch operations covered 513 in this paper. 514 •Functional hardware and rigorous system-level testing: This is the minimum requirement to make it past the infant mortality 515 threshold where so many CubeSat missions end. ELFIN’s schedule was facilitated by a fortuitous 1-year launch delay of 516 the prime mission which gave our team the necessary time to complete a full range of system-level tests. These included 517 representative range tests, component and system-level thermal vacuum cycles, and thorough instrument calibration. As a 518 result, ELFIN had no major hardware issues on orbit, allowing the team to focus on resolving operational challenges. 519 •Process-driven priorities: Due to a lack of student experience, the ELFIN team had focused too much on getting as much 520 data as possible in the beginning of the mission. The team was motivated by scientific results, but had no pre-planned means 521 to achieve long-term high-yield data throughput. The early declaration of mission success from the first storm data acquired 522 allowed the team to take a step back and reconsider its operations paradigm. By shifting the focus away from brute-force data 523 collections towards fixing the processes and underlying software tools that can enable e fficient operations, the team was able 524 to use its operations experiences to build a sustainable, future-proof, and scalable satellite operations paradigm that quickly 525 produced results. Good processes are tailored to each individual mission and flight architecture, and, for newer teams, as was 526 the case here, such processes were in fact easier to determine once in orbit. 527 •Post-launch development time: In orbit, the team deliberately tackled problems one at a time according to science priorities: 528 first calibrate electron data (primary science); then fix operational issues and ADCS; then calibrate ion and FGM data (sec- 529 ondary /tertiary science). Resolving each of these problems involved an interdisciplinary team of scientists, operators, and 530 software developers that worked closely together for months, and the end result was not just a successful mission, but an 531 operations-hardened team with a wealth of situation-specific knowledge ready for the next challenges in their careers, includ- 532 ing, for some, their next CubeSat mission. In a sense, this is the most e ffective type of capacity building. A lesson learned, 533 therefore, is that teams should plan to have adequate funding, schedule, and personnel dedicated to post-launch development 534 work. 535 •Infrastructure and motivation: Students are eager to work on something destined for space because there is a clear goal 536 with concrete work to be done. However, we found that students were less interested in operating something that was 537 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 23 already in space, and the team attrition peaked shortly after launch, further straining the mission. Since ELFIN’s entire 538 operational pipeline was designed and built at UCLA, the motivation was shifted to focus on ownership of the ground support 539 infrastructure, including but not limited to operations software, ground stations, management tools, and internal development 540 tools. We found that the students really enjoyed this because it taught them valuable industry skills that they were unlikely 541 to find even in industry internships. This created a positive feedback loop between developing optimized infrastructure for 542 ELFIN and daily satellite operations. This had many benefits beyond giving students ownership of something tangible, since 543 it boosted team e fficiency and played a big role in sustainable capacity building at the host institution for future missions. 544 •Open-access data and analysis tools: After nearly three years of hard work focusing on data calibration and building au- 545 tomated data processing pipelines, we were confident enough to release data publicly in July 2021. In addition to hosting 546 ELFIN data on public NASA Space Physics Data Facility (SPDF) and UCLA servers, we also maintained data analysis tools 547 (via a SPEDAS plugin) for scientists to analyze ELFIN data in the greater context of the Heliophysics System Observatory 548 (HSO). In addition, online quick-look summary plots were publicly available, allowing anyone to view the latest calibrated 549 ELFIN data contextualized by geomagnetic indices, ground station coverage, spacecraft conjunctions, and more, all within an 550 hour of data being downlinked. Assisted further by Autohban reports (mentioned in Section 4), any operational or scientific 551 issues were quickly resolved. Summary plots are available here ( https://plots.elfin.ucla.edu/summary.php ), data 552 retrieval of individual files is here:( https://data.elfin.ucla.edu ), and access to the latest version of SPEDAS is here: 553 (https://spedas.org/wiki/index.php ) (see Angelopoulos et al., 2019). 554 These lessons are most applicable to student-run missions like ELFIN, where students own the mission end-to-end. For example, 555 students learn to construct and maintain a thermal vacuum chamber, build roof-mounted satellite antenna towers, build and maintain 556 custom DevOps infrastructure, build and test cutting-edge scientific plasma instrumentation, and even calibrate these instruments 557 on-orbit while being responsible for daily communication with two satellites. These are powerful problem-solving experiences 558 that provide students with real-world, hands-on research and satellite technology development experience in an accessible and 559 cost-e ffective manner. We believe that this is the best way to do capacity building: with a focused science mission and a vertically 560 integrated team that aligns scientists, engineers, and students toward a common goal. Through several generations of students, 561 we have built up a skilled and supportive network of alums in industry and federal agencies who are willing to review, mentor, 562 and even collaborate. This not only reduces future technical risk, but also reduces the barriers to entry for the typically-stringent 563 fields of aerospace and heliophysics, further incentivizing students from diverse backgrounds to participate. At a fraction of the 564 cost of larger missions, ELFIN has impressed rigorous industry and academic skills upon hundreds of students while conducting a 565 wide-range of compelling space research and developing institutional knowledge and credibility for future flight opportunities. 566 7.2. Value of Electron Precipitation Data Sets 567 ELFIN, with its unique perspective within the entire pitch-angle range (including resolution inside the loss-cone), provides 568 scientists with fresh insights into magnetospheric processes from the inner radiation belt, through the plasmasphere, and all the 569 way into the plasma sheet. So far, ELFIN’s long-term monitoring (over three years) of energetic electron precipitation and locally 570 trapped fluxes has provided an extensive dataset that will continue to be the basis of many scientific investigations. In fact, several 571 studies have already shown the complementary value electron precipitation data sets provide when paired with a variety of di fferent 572 instruments. For example, Shen et al. (2022b) and Artemyev et al. (2024b) have demonstrated the use of simultaneous energetic 573 and thermal (1−30 keV) electron populations using conjunctions with MMS and DMSP, opening key questions regarding the 574 24 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx energy input of substorms in the ionosphere and the origins of sub-auroral polarization streams (SAPS). Zhang et al. (2023b) 575 also demonstrated the use of GPS-provided total electron content (TEC) in conjunction with electron precipitation for probing 576 ionospheric density structures and drift behavior. High-resolution magnetic field measurements have been used to localize energetic 577 electron precipitation relative to the primary magnetosphere-ionosphere current systems (Shen et al., 2023a,b). These studies 578 reveal the value of contextualized electron precipitation measurements and demonstrate that a future ELFIN-like mission would be 579 invaluable towards advancing the predictability of space weather. 580 Additionally, increasing the time and energy resolution of energetic electron measurements is principally important for study- 581 ing the most intense short-scale precipitation events (Zhang et al., 2022a,b). Phenomena at these timescales are associated with 582 waves, so combining future electron precipitation measurements with wave measurements—for example, a high-resolution DC 583 magnetometer for EMIC waves and an AC magnetometer for whistler-mode waves—would vastly expand our understanding of the 584 mechanisms behind wave-driven electron scattering. 585 Although ELFIN has already deorbitted, we may not have to wait long for the next in-situ particle precipitation measurements: 586 the Relativistic Electron Atmospheric Loss (REAL) CubeSat mission (Millan et al., 2018) has this capability and is slated for a 587 March 2024 launch. REAL is 3-axis stabilized with multiple look directions and an energy range with a lower energy floor and 588 should yield significantly higher time resolution captures of electron precipitation compared to ELFIN. A similar instrument is 589 expected to fly on CINEMA (NASA SMEX mission currently in phase A) as well, and draws upon the same benefits of a 3-axis 590 stabilized spacecraft. However, spinning satellites like ELFIN are still necessary because they can measure precipitating, trapped, 591 and backscattered electrons (i.e., full 360◦pitch-angle distribution) with the same detector. In addition to the applications covered 592 in Section 6, this is important because inter-calibration between multiple detectors /look directions that do not see the same fluxes 593 is more di fficult to validate. Higher time and angular resolution can be achieved by adding more detectors in the spin plane (inter- 594 calibration this way is far easier because the di fferent detectors will measure the same fluxes as a function of pitch-angle during 595 stable quiet periods) and increasing the angular sectors per spin. The feasibility of sampling at 32 sectors rather than 16 was 596 demonstrated on ELFIN briefly via a software update (one week of data per spacecraft was indeed collected at the higher sector 597 rate), but it was deemed unwarranted in the long-run, given the doubling in EPDE data volume it entailed, compared to the value of 598 ion collections, inner belt collections and additional SZ collections that would otherwise be sacrificed. 599 Together with other spacecraft and ground-based measurements, ELFIN has played a crucial role in advancing our understanding 600 of space weather. The novel electron precipitation data sets have revealed fresh insights in (and continue to remain valuable 601 for) investigating magnetospheric-ionospheric coupling and wave-particle physics. For just over four years, the ELFIN student 602 team successfully communicated with both ELFIN satellites on a daily basis: this experience has demonstrated that a well-suited 603 operational approach leads to e fficient and sustainable daily operations, facilitating successful, enduring scientific missions with 604 low cost and high science return. The aforementioned technical innovations resulted in novel electron precipitation data sets which 605 have revealed a multitude of new insights and continue to be useful in the study of magnetospheric-ionospheric coupling and 606 wave-particle physics. 607 Acknowledgments 608 We acknowledge support by NASA awards NNX14AN68G, 80NSSC23K1038, 80NSSC23K0108, 80NSSC19K0844, and 609 80NSSC22K1005, along with NSF grants AGS-1242918, AGS-2019950, and AGS-2021749. We are grateful to NASA’s CubeSat 610 Launch Initiative and Launch Services Program for ELFIN’s successful launch in the desired orbits. We acknowledge early support 611 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 25 of ELFIN by the AFOSR, under its University Nanosat Program, UNP-8 project, contract FA9453-12-D-0285, and by the Califor- 612 nia Space Grant program for student support during the project’s inception. Importantly, we acknowledge the critical contributions 613 and sacrifices made by several hundreds of UCLA students; many rose to the challenge at just the right time, and it is the sum 614 of all those years of e ffort that made ELFIN a success. Furthermore, ELFIN downlink support was generously provided by Stel- 615 larStation ( https://www.stellarstation.com/ ), NASA Wallops, Montana State University (Keiji Yoshimura, Arlo Johnson, 616 Tyler Holliday), and numerous amateur radio listeners from all over the world https://satnogs.org/ . Finally, we are grateful 617 for the advice and generous time contributions from our post-delivery reviewers, uno fficial mentors, and our biggest supporters: 618 Aerospace Corporation: Garrett Kinum, David Hinkley, and Bernie Blake; Apple: Pat Cruce; Terran Orbital: Chris Sha ffer; and 619 Cal State University Northridge: James Flynn. 620 Appendix A. Refactor 2.0 Concepts and Rules 621 Appendix A.1. Key Concepts 622 Intents and Allocations are defined in the main text and serve as neatly organized abstractions that are human-readable, state- 623 trackable, and flexible enough to accomplish all nominal and o ff-nominal in-flight tasks required of ELFIN. These intents and 624 allocations are created by the operator in the Planner software, but there is still the process of turning them into commands, sending 625 them to the spacecraft, and verifying each step along the way. 626 As shown in Figure A.13, once Allocations are created within the Planner, they are translated into commands via the Transla- 627 tor—a software module within the Planner—and exported to the database. Operators can then use the Commander to convert the 628 translated output into a Load File . The Commander is a separate software module that manages both real-time commanding and 629 Load Files: files that store series of commands and associate them with a specific pass. These Load Files are saved on the Main 630 Server and can be executed autonomously even in the event of communication loss between the ground station and the Mission 631 Operations Center. 632 With these abstractions in place, we now define the data and knowledge models that then allow for the specification of rules 633 which govern Intents and Allocations. We first begin with the Ground Truth Model : an idealized representation of state assuming 634 a perfect computer network with no risk of data loss. It splits the classification of Allocations into three categorizations: 635 •Pending refers to Allocations that do not yet exist aboard the spacecraft (i.e. they exist only in the Planner). 636 •Live refers to Allocations that have been written to the spacecraft and are therefore going to be executed. 637 •Stale refers to Allocations that that have been overwritten or are otherwise invalidated due to, for example, an elapsed 638 timestamp. 639 However, our communications link is not perfectly reliable as it is possible to drop uplink or downlink packets in our communica- 640 tions, due to RF nulls from spinning. Further, our infrastructure within a primarily educational institution—rather than a primarily 641 space mission facility—does not guarantee 100% uptime for both network access and power, meaning that our knowledge models 642 must be resilient against failures in both uplink and downlink: we cannot always assume commands will successfully make it onto 643 the spacecraft. In order to handle this, the Planner’s state tracking relies on the Planner Model , which slightly expands upon the 644 Ground Truth Model: 645 •Pending now refers to Allocations that have not yet been translated into a command (i.e. they are still within the Planner). 646 26 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx Fig. A.13. A block diagram of all ground software used to support ELFIN. •Translated refers to Allocations that have been translated but not yet transmitted (i.e. they have left the Planner and are 647 potentially in a Load File waiting to be uplinked during an upcoming pass). 648 •Sent refers to Allocations that have been sent to the spacecraft and may exist onboard, although they have not been verified 649 yet. 650 •Confirmed refers to Allocations that have been verified to be written aboard the spacecraft. 651 •Stale refers to Allocations that have been overwritten by another “confirmed” Allocation or are otherwise invalidated by an 652 elapsed timestamp. 653 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 27 Verifying commands is done by the Commander in real time upon sending /receiving each command. Each command contains both a 654 write and read bundled into the same frame and contains both an associated Intent ID and associated Allocation ID. If the readback 655 of the onboard Resources match expectations, the Allocations are marked Confirmed in real time. This is important because in 656 special cases (e.g., overwriting or wiping a preexisting intent), it is desirable to only uplink commands if previous commands have 657 been confirmed successful. An Intent state will reflect the weakest state of its Allocations, so that an Intent will only be confirmed 658 if all Allocations within it are also confirmed. These states are color-coded in the Planner GUI (see Figure 6) at both the Intent level 659 (for the overall summary view) and Allocation level (when using the wizard). 660 Theconstraint checker is the underlying software running within the Planner, that handles logic and adherence to Refactor 2.0 661 rules throughout all the wizards and planner actions. The states from the Planner Model are further grouped into ground truth states 662 which are used for constraint checking: 663 •Possibly live: “sent” and confirmed”. 664 •Possibly stale: “stale” and all but the most recent from “possibly live”. 665 •Future live: “translated”, “sent”, and “confirmed”. 666 •Future stale: “stale” and all but the most recent from “future live”. 667 The logical flowchart shown in Figure A.14 shows how the constraint checker enforces these rules and acts as a backend module 668 within the Planner which other modules can interface with. 669 Appendix A.2. Planner Rules 670 Leveraging the framework described above, the constraint checker can now enforce the two directives that govern safe operating: 671 1. Prevent any scheduling conflicts between activities. 672 2. Handle uncertainty in the safest and strictest way possible. 673 Prevent scheduling conflicts: Intents with overlapping scopes cannot coexist onboard the spacecraft. If a new Intent overlaps 674 with any existing Intents, the new Intent must include all the resources for which the overlapping Intents have non-stale Allocations 675 that are not wipes. This allows us to make the Intent Scope Assumption: if two Intents of the same type overlap, their scopes 676 are identical. Additionally, new Intents may not interfere with any other already-scheduled activity and time-allocation rules must 677 prevent overlap with all other non-stale Intents. 678 Handle uncertainty: Disallow overwriting active schedule entries and discourage situations in which a new Intent allocates a 679 non-stale resource. If a new Intent allocates a non-stale resource, it must allocate all other non-stale resources which share the 680 same Intent. We also enforce the ordering of Allocations such that any Allocation can only be replaced by a newer Allocation. 681 Stale Allocations are no longer actionable, and an Allocation can only be translated or transmitted if it is not future stale. Because 682 pending Intents have no explicit ordering when they exist within the planner, we enforce stricter rules for pending Allocations. 683 Thus, a resource may not be re-allocated while there exists a pending Allocation that uses it, and an Intent may not be created if it 684 overlaps with another pending Intent. 685 These lead to a few key assumptions. The In Order Assumption: Intents exist onboard the spacecraft in the same order in which 686 they were allocated on the ground (FIFO), barring any Intents which were never successfully written. Only the latest translation 687 output can be included in a load file, and if load files contain multiple translated Allocations for the same resource (i.e., overwriting 688 28 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx Fig. A.14. Logical flowchart demonstrating the type of decisions the constraint checker would make in order for operators to safely make Allocations. Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx 29 of resources), the older Allocations only appear in load files earlier than any Allocations which are newer than it. This required 689 upgrading the Commander to have real-time command verification and conditional commanding, opting not to send commands 690 until its prerequisite commands are also verified to be onboard. 691 We can also make the atomicity assumptions: Allocations are atomic, and Intents are pseudo-atomic. Intents cannot be fully 692 atomic—due to the byte-size limitation of AX.25 packets—and some Intents are too large to fit in a single radio packet. This requires 693 Allocations to only be transmitted along with the rest of the Allocations in their respective Intent. The discrepancy between the 694 atomicity of Intents and Allocations means special care must be taken to ensure that a mix of two Intents can never simultaneously 695 exist (no “Frankenstein Intents”). If an Intent has too many Allocations to fit in a single uplink frame, the first frame includes a wipe 696 of the entire resource, and the second frame is only transmitted after the wipe succeeds, relying on the conditional commanding 697 framework alluded to in the previous section. 698 These rules served to provide structure to the complete operational freedom of the original design that allowed for too much 699 uncertainty. Whenever an option presented itself, the Planner would delegate set choices to the operator in a safe manner, as dictated 700 by the constraint checker, rather than giving the operator free reign. For example, the resource-picking step in each Intent creation 701 wizard would present a list of all resources with color-coded statuses; the operator can then see all resources and deliberately pick 702 resources rather than allowing software to automatically pick any free resource. There was still operational freedom, since the 703 operator could pick a live conflicted resource if they so wished, but the constraint checker would force the selection of all other 704 associated resources to preserve the atomicity rule. When generating commands, the Commander would automatically insert wipes 705 as needed to ensure safe uplink of these Allocations. With thoughtful design, these choices were easy for the operator to make 706 because we chose to keep the software transparent while avoiding hidden complexity and nondeterministic behavior. 707 Appendix B. ELFIN Spin Control 708 Appendix B.1. Spin Control 709 Ground determination of spin rate is determined by finding the power spectrum on the 24-minute snippet of MRM data and 710 taking the peak frequency. This is what is used for science data and determining when operators need to schedule the spacecraft to 711 spin up or down. Spin control is performed using one of two modes: B-act or B-dot. 712 B-act relies on waiting until the magnetic field is largest in the spacecraft body X direction; by turning the Y-coil on at that time, 713 a torque can be generated in the Z direction to either spin the spacecraft up or down. This is a very simple algorithm that does 714 not require onboard spin knowledge. The only complication with ELFIN’s design is that turning on the Y-coil produces a strong 715 B field in the Y direction, so measurements cannot be used when the coil is powered. To mitigate this, B-act can be configured 716 to have variable duty cycle levels, where the coil remains on for a specified amount of time before turning o ffand waiting for a 717 specified number of magnetometer samples (during control law, the magnetometer is sampled at 56.25 samples per second) before 718 checking for the original B-act condition to be met again. Ground testing showed that the coil drivers were so fast that they could 719 not be detected within one sample of turning o ff. Because B-act was designed to be used when ELFIN was first deployed and barely 720 spinning, we began by torquing for 28 samples ( ∼0.5 seconds) and turning o fffor 4 samples (an 88% duty cycle). Both ELFINs 721 were brought to a target of 10 RPM before switching to B-dot. 722 B-dot uses a 7-point Finite Impulse Response (FIR) filter to take a digital derivative of the magnetic field, thus keeping the 723 algorithm una ffected by the flat pulses of the torquer coils. To determine duration of torque, the attitude controller uses half-periods 724 (periods between the zero crossings) of the Y-axis B-dot value. It then torques based on the sign of B-dot in the Y-axis. The duty 725 30 Ethan Tsai etal /Advances in Space Research xx (2024) xxx-xxx cycle here is also configurable, and was set to a default of 50% of the half period, meaning that the coils would turn on for a quarter 726 of a spin centered around the middle of the zero crossings (i.e., centered on the maximum or minimum X values). The advantage 727 of B-dot is that the coils do not have to turn o ffduring the ideal torque phase and the total torque provided is symmetric, leading to 728 marginally higher precision and e fficiency. 729 There were a few additional safeguards implemented as a result of ground testing: spike detection and H lim. H lim, short for 730 hysteresis limit, was implemented because the noise of the MRM (around 300 nT) meant that there were often consecutive zero 731 crossings close to each other. An H limvalue prevents the detection of a new zero-crossing after nsamples, which were often smaller 732 than the current spin rate (default 10 samples, or about 178 ms). The other issue was that the MRM would sometime have random 733 spikes in the data where a single isolated value would suddenly have a large o ffset. This was unnatural and occurred in only 1 734 axis at a time. The mitigation for this was to check the di fference between each measurement nandn−1. If the delta exceeded 735 a specified threshold, the value would be evaluated to be the average of n−1 and n+1. This resulted in all sampling having one 736 sample (or 18 ms) lag. A bigger delay was the 7-point FIR filter used in B-dot, resulting in a filter delay of 3.5 samples (or 62 ms) 737 and a total delay of 4.5 samples (80 ms). These delays were negligible at ELFIN’s spin rate and the spin control worked nearly as 738 intended on orbit. 739 The one major issue regarding ELFIN’s spin paradigm was a design flaw associated with the torquer coil drivers. When the 740 coil was in the OFF state, the coils were shorted to ground rather than left open. An eddy current would thus be generated in 741 the spin plane (i.e., in the Y-coil) to oppose the field with strength equal to the time-derivative of the external field. Because the 742 field is rotating, its derivative will cause an induced magnetic field rotating in the same direction (with the opposite sign), but its 743 time-profile will have a 90◦phase shift to the original field. The induced moment produces a torque along the spin axis (a despin) 744 and a minor torque o ff-spin axis (depending on the alignment of B field and spin plane). The total torque imparted is given as 745 follows: 746 ⃗τeddy=⃗My×⃗B= σN2A2µy ˆy×⃗B (B.1) whereσis the wire conductance, Nis the number of turns in the Y-coil, Ais the area of the Y-coil, θis the angle between the Y-coil 747 and the B field, and µyis the relative permeability of the spacecraft. Since the despin rate is fixed and measureable, we can compute 748 the effective relative permeability of each satellite (with primary contributions from the steel-cased batteries and mu-metal magnetic 749 shielding in the EPDI) which was experimentally found to be about µy=18. The rest of the values are known and can be applied 750 to calculate the torque, which is then integrated over the orbit. The resulting equivalent moment comes out to be O(10−4) Am2751 which is negligible compared to the residual dipole discussed earlier. However, the overall despin torque comes out to be O(10−8) 752 Nm which resulted in the 0.1 RPM /day loss observed on both ELFIN satellites. While this was larger than anticipated, scheduling 753 10 minute long spin-up maneuvers twice a week incurred only a trivial schedule and power cost and did not meaningfully impact 754 nominal operations. 755