The MAGIC of CINEMA: First in-ﬂight science results from a miniaturised anisotropic magnetoresistive magnetometer

. We present the ﬁrst in-ﬂight results from a novel miniaturised anisotropic magnetoresistive space magnetometer, MAGIC (MAGnetometer from Imperial College), aboard the ﬁrst CINEMA (Cubesat for Ions Neutrals Electrons and MAgnetic ﬁelds) spacecraft in low Earth orbit. An attitude- 5 independent calibration technique is detailed using the International Geomagnetic Reference Field (IGRF), which in the case of the outboard sensor is temperature dependent. We show that the sensors accurately measure the expected absolute ﬁeld to within 2% in attitude mode and 1% in science 10 mode. Using a simple method we are able to estimate the spacecraft’s attitude using the magnetometer only, thus characterising CINEMA’s spin, precession and nutation. Finally, we show that the outboard sensor is capable of detecting transient physical signals with amplitudes ∼ 20-60 nT. These in- 15 clude ﬁeld aligned currents at the auroral oval, qualitatively similar to previous observations, which agree in location with measurements from the DMSP and POES spacecraft. Thus we demonstrate and discuss the potential science capabilities of the MAGIC instrument onboard a Cubesat platform.


Introduction
Data from magnetometers on spacecraft are typically used for one, or both, of two purposes: for the determination of the spacecraft attitude; and for measurement of physical processes local to, or indeed far from, the spacecraft. No mea-25 surement is perfect and the measurement of magnetic fields is particularly challenging given their low values and the particularly small nature of the variations that must be detected for some applications; see e.g. Acuña (2002) for a historical description of space magnetometer techniques. All sensor and 30 spacecraft environments have different capabilities and every application of magnetometer data has different requirements in terms of cadence, accuracy, noise etc. thus the intended use cannot be isolated from the methods used to recover accurate magnetic field measurements, since one drives the other. 35 Attitude control knowledge often results in rather coarse requirements of just a few degrees (e.g. Natanson et al., 1990), corresponding to an absolute accuracy in a given field component ∼2000 nT or greater at low Earth orbit (LEO), equivalent to at least ∼4%. In contrast, for scientific ap-40 plications the requirements are more stringent and depend on the precise goal: for example the ESA Swarm mission aims for sub-nT absolute precision (Friis-Christensen et al., 2006). However, if the scientific requirement is to be able to detect transient signals in magnetometer data at LEO, such 45 as field-aligned currents at the auroral oval (e.g. the review of Baumjohann, 1982), then such absolute precision in the overall magnetic field is not required. It is therefore important to assess what it is possible to achieve with a magnetometer, given the quality of the sensor and the environment 50 it is in.
Cubesats offer the possibility of low-cost spacecraft in orbit around the Earth equipped with scientific instruments e.g. for space weather monitoring purposes (c.f. Li et al., 2013). The Cubesat specification, however, constrains both dimen-55 sions (a three-unit Cubesat is 10 cm × 10 cm × 30 cm with no protuberant parts at launch) and total mass ( 4 kg for 3U) (e.g. Selva and Krejci, 2012). Furthermore, the dimensions restrict the amount of available power from solar cells to 2 W per unit (e.g. Bouwmeester and Guo, 2010). In terms 60 of magnetic field measurements, typical fluxgate magnetometer instruments used for space plasma physics applications (e.g. Balogh et al., 1997) Table 1. Summary of the MAGIC data used in this paper including the orbital elements of CINEMA, MAGIC modes and geomagnetic indices. *The attitude mode data used in this paper was taken from housekeeping data, hence has lower time resolution than specified in Brown et al. (2014).
Cubesats since they exceed all of these constraints. Additionally, a full magnetic cleanliness program (e.g. Ludlam et al., 2008) is not possible with Cubesats, thus the raw data will be contaminated to some degree with fields of spacecraft origin. Therefore, in designing magnetometers (or indeed any scientific instrument) for Cubesat platforms there must be a trade-off in mass, power and/or precision levels which will 70 affect the instruments' capabilities.
Magnetometers flown on Cubesats thus far have typically been used for attitude purposes (e.g. Sarda et al., 2010). However, there may also be potential science applications for magnetometers on such spacecraft: Quakesat's single-75 axis search-coil AC magnetometer has detected lightninggenerated whistler mode waves (10-1000 Hz) and ELF bursts (10-150 Hz) simultaneously observed on the ground which were possibly due to earthquakes (Bleier and Dunson, 2005); and DICE's DC vector magnetometer has detected ∼200 nT 80 magnetic deflections due to field-aligned currents at the auroral oval during a marginally geomagnetically active period (Fish et al., 2014). The scientific capabilities that such lower quality sensors (necessitated by the constraints of Cubesats) offer are as yet not entirely clear. In this paper we assess one 85 such example from the first CINEMA (Cubesat for Ions Neutrals Electrons and MAgnetic fields) spacecraft.
CINEMA is a 3U Cubesat equipped with avionics and science instruments (Vega et al., 2009) launched into low Earth orbit (LEO) on 13 September 2012, with orbital elements shown in Table 1, as a secondary payload from a P-POD dispenser. Two additional near-identical CINEMA Cubesats were launched on 3 November 2013 which we do not discuss in this paper. The spacecraft's science instrumentation includes MAGIC (MAGnetometer from Im-95 perial College), two novel miniaturised vector DC magnetometers using anisotropic magnetoresistive (AMR) sensors (Brown et al., 2012(Brown et al., , 2014. One sensor, the inboard (IB), is contained within the spacecraft whereas the other, the outboard (OB), is on the end of a 1 m stacer boom in order to re-100 duce the effect of spacecraft fields on the measurements. The two sensors and their relative axes are illustrated in Figure 1. Brown et al. (2014) provide a summary of the modes of operation of the instrument. The requirements of the MAGIC instrument are twofold. Firstly, the sensors (in particular the 105 inboard) should provide measurements of Earth's magnetic field at a level of accuracy suitable for attitude-determination purposes (Vega et al., 2009). Secondly, the outboard sensor should be capable of detecting transient science signals in addition to Earth's field e.g. magnetic perturbations asso-110 ciated with magnetospheric current systems, important for space weather monitoring (c.f. Clausen et al., 2012). Unfortunately, there have been a number of problems with the spacecraft's systems hence only a limited amount of data has been retrieved from the first CINEMA spacecraft. In this 115 paper we present the first in-flight MAGIC results from the two longest time intervals of MAGIC data obtained for which the onboard clock was reliable. In section 2 we describe the attitude-independent calibration procedure used on the raw data, through use of the International Geomagnetic Ref-120 erence Field (IGRF). Following calibration, the attitude of the sensors is estimated using a simple magnetometer-only method as described in section 3. Finally, section 4 discusses the small amplitude (∼20-60 nT), transient (>21 mHz) science signals detected by MAGIC in science mode. These 125 are revealed to be field-aligned currents at the auroral oval, which are corroborated by measurements from the DMSP and POES spacecraft. We, therefore, assess the science capabilities of the MAGIC sensors flown on CINEMA through 2 Attitude-Independent Calibration

The Calibration Problem
The general calibration problem can be written as (e.g. Kepko et al., 1996) x cosφ x g x cos θ x g y sin θ y cosφ y g y sin θ y cos φ y g y cos θ y g z sin θ z cosφ z g x sin θ z cosφ z g z cos θ z where b consists of the measured magnetic field components 140 from the sensors and B sc are the real magnetic field vectors in orthogonal, spacecraft fixed coordinates. The gains g are the scale factors between the physical magnetic field values and the measured values; measurements are always in Volts but conventionally a preliminary scale factor (23,000 nT V −1 145 here corresponding to an instrument range of ±57,500 nT (c.f. Brown et al., 2014)) is applied so that the gains are of order unity and dimensionless. The angles θ and φ correspond to the orientation of each sensor component. Note that the sensor triad is approximately orthogonal by construction 150 i.e. θ ∼(90,90,0)°and φ ∼(0,90,0)°, but in-flight calibration can often determine orientation to better than 0.1°i.e. better than the triad can be constructed on the ground, hence non-orthogonality must be allowed for in the calibration process. Finally, the offsets O are systematic errors in the mea-155 sured fields either inherent to the sensor or due to spacecraft fields. The calibration parameters are, however, not constant over time and will drift depending on the quality of the sensor and the environment it inhabits e.g. the Cluster fluxgate magnetometers have been found to be remarkably stable with 160 long-term offset drifts of 0.2 nT per year and a temperature dependence of 0.2 nT°C −1 (Alconel et al., 2014).

Method
While an initial determination of calibration parameters is usually performed on the ground before launch, unfortu-165 nately this was not done for either the inboard or outboard MAGIC sensors that were flown on CINEMA-1. Therefore the only calibration was determined in-flight, as detailed here. AMR sensors cannot achieve the ultra-high precision and stability of higher quality magnetometers such as flux-170 gates, indeed LEO spacecraft often utilise multiple sensors of different measurement types and capabilities in order to achieve the required precision (e.g. Olsen et al., 2003). Consequently, we aim for a calibration of sufficient quality that spin tone and spacecraft-generated fields do not significantly 175 affect the requirements of the MAGIC instrument i.e. the ability to determine spacecraft attitude and detect transient physical signals.
Most space plasma scientific spacecraft are spin stabilised and spectral methods are applied to determine calibration pa-180 rameters (Kepko et al., 1996), even when the physical field is not known, since incorrect determination of the calibration parameters results in residual spin tones in the despun data. However, in LEO the magnetic field changes rapidly due to the spacecraft motion (∼50-90 nT s −1 in 185 CINEMA's orbit), hence the assumption in this method of a constant field over a spin period does not apply. Furthermore since the spacecraft's attitude is to be determined from the magnetometer data (see section 3), we must as a first instance use an attitude-independent method of calibra-190 tion (e.g. Foster and Elkaim, 2008;Springmann and Cutler, 2012). Such methods rely on knowledge of the magnitude of the expected geomagnetic field at the spacecraft location.
We determine the spacecraft position at each time from a two-line element (TLE) set using the SGP4 orbit propagator 195 (Hoots et al., 2004;Vallado et al., 2006). The average time difference from the TLE epoch (the time at which the orbital parameters are referenced) ∆t T LE is noted in Table 1. The use of the propagator thus requires the onboard clock be well calibrated, a factor which limited the number of obtained data 200 intervals from MAGIC which could be used. From the spacecraft positions we calculate the expected field from IGRF B. This model of Earth's inherent magnetic field is accurate to around 5 nT at LEO on average (Maus et al., 2005). However, since IGRF does not include contributions to the mag-205 netic field from magnetospheric current systems, calibration parameters should strictly be determined during geomagnetically quiet times. This was the case for the two intervals used in this paper, as shown in Table 1.
All MAGIC datapoints out of the range of the instrument 210 and large amplitude spikes were removed before calibration. The attitude-independent calibration procedure used is an iterative procedure. First an initial guess of the (assumed constant) offsets, gains and angles are made. Equation 1 is then inverted at each time t i yielding estimates of the calibrated 215 magnetic field vectors in spacecraft fixed coordinates B i sc . The square difference in field magnitude from IGRF is then calculated as where N is the number of datapoints. This algorithm is then 220 iterated in order to minimise ǫ, using the Nelder and Mead (1965) method to obtain successive estimates for the calibration parameters. This is repeated until stable solutions (≤ 0.01%) are obtained, typically taking ∼1,500 iterations.

Attitude Mode
Raw attitude mode data from the inboard MAGIC sensor is shown in the second panel of Figure 2, with a comparison of the measured field magnitude (grey) and IGRF given in the third panel. We despiked the 10-16 s cadence data by removing any datapoints which differed from the previous by more than 10,000 nT. While the uncalibrated data showed similar variations to IGRF over long timescales, there are shorter timescale oscillatory variations in the data due to the undetermined calibration parameters. Furthermore, MAGIC gen-235 erally overestimated the field strength in the raw data. We applied the attitude-independent calibration procedure to the data, with the determined calibration parameters displayed in the first row of Table 2.
In order to reliably extract calibration parameters from attitude independent procedures, the data must have good coverage of the attitude sphere, given by the components of calibrated data normalised by the field magnitude (Foster and Elkaim, 2008). We estimate the data coverage by binning the attitude sphere into 192 equal area bins (cylin-245 drincal projection), finding that 69% of these contained datapoints. Furthermore we use a χ 2 test for complete spatial randomness to quantify clustering of the data on the attitude sphere, finding χ 2 ∼ 4χ 2 .025 where χ 2 .025 corresponds to the upper limit of the 95% confidence interval for a Poisson dis-250 tribution hypothesis. We therefore deduce that, while there was some clustering, there was fair coverage of the attitude sphere over this interval.
The resulting calibrated magnetic field strength is shown in blue in Figure 2 (third panel), with the percentage error 255 displayed in the fourth panel. The root mean squared deviation (RMSD) from IGRF of the calibrated attitude mode data was 1.95% over this interval. These differences are likely due to drifting or time-varying offsets and gains not captured by our constant calibration procedure, since the differ-260 ences (fourth panel) are oscillatory and close to the periods (and harmonics thereof) of the oscillations seen in the raw data (second panel). Nonetheless, the level of accuracy in the absolute field is sufficient for attitude determination, as we demonstrate in section 3. The despun attitude mode data is 265 shown in the bottom panel of Figure 2.

Science Mode
Science mode data from the outboard MAGIC sensor is shown in Figure 3, in the same format as before. Again, before calibration we removed data points out of range and de-270 spiked the 128±4 ms resolution data using a threshold difference of 500 nT. It is immediately clear that from oscillations in |b| that the offsets were larger for this interval than for the attitude mode data. Furthermore, while the inboard sensor over-estimated the geomagnetic field, the outboard generally 275 underestimated it. We applied the attitude-independent calibration procedure only on the first datapoint of each packet (5 s cadence) since these are the datapoints for which times are given (all other times were interpolated), resulting in the parameters listed in the second row of Table 2. Indeed the de-280 termined offsets and gains agree with our initial hypothesis in comparison to the attitude mode data. The offsets (which include DC fields of spacecraft origin) for this early development sensor are much larger (by at least a factor of 2) than those determined on the ground for subsequent further-285 developed AMR sensors (Brown et al., 2014), whereas the gains are within the expected range.
The constant calibration parameters for the science mode data yield a RMSD from IGRF of 3.07%. While this error is in part oscillatary, as with the attitude mode data, the field 290 strength is significantly overestimated at the start of the interval and underestimated at the end. It is known that AMRs have a high dependency on temperature compared to fluxgates (Brown et al., 2014), therefore a thermistor was packaged with the outboard sensor so that temperature effects 295 could be taken into account. The top panel of Figure 4 indeed shows that the temperature of the sensor varied a lot over this interval, rising from around 70°C at the start to just under 100°C at the end, with some small oscillations also at similar periods to those seen in the magnetometer data. The 300 large temperature variations are likely due to the sensor's low thermal inertia since it was not potted as well as the fact that CINEMA had been in direct sunlight for ∼3 days prior to this interval.
While the temperature dependence of all the calibration 305 parameters for a sensor would ideally be determined on the ground before launch, Brown et al. (2014) showed that the offsets and gains of MAGIC AMR sensors have an approximately linear relationship with temperature and Fish et al.
(2014) used a linear temperature relationship in their AMR 310 ground calibration. Therefore, we subsequently applied a temperature dependent calibration to the science mode data to account for the large temperature drift during this interval. This was achieved by modifying the attitude independent procedure, requiring a linear relationship of the offsets 315 and gains with the temperature measured by the thermistor at each time e.g.   The temperature calibration removes the over (under) es-330 timation of the field at the start (end) of the interval and also reduces the amplitude of oscillating deviations, as shown in red on the third and fourth panels of Figure 3. This calibration results in a RMSD from IGRF of 1.23%, indicated by the red area (Figure 3 fourth panel), which is just over 1.5× 335 more accurate than the inboard sensor in attitude mode. In this paper we perform no further calibration on the science mode data, therefore we treat this RMSD as the absolute accuracy of the outboard MAGIC sensor in science mode. The data covered 85% of the attitude sphere (not shown) with 340 less clustering than before (χ 2 ∼ 2χ 2 0.025 ), thus the calibration parameters are likely reliable. Again we present the despun science mode data, using the method described in section 3, in the final panel of Figure 3.

345
Following the attitude-independent calibration of MAGIC, we wish to use the magnetometer data to estimate the spacecraft/sensor attitude at each data point.

Method
Upon deployment the spacecraft would have been randomly 350 tumbling in its orbit. Whilst an attitude control system was developed for CINEMA utilising magnetorquers (Vega et al., 2009), unfortunately one of the torque coils was not operational meaning that CINEMA did not successfully detumble. A common method of spacecraft attitude determination 355 is through comparing measurements of vector quantities in spacecraft fixed coordinates to reference vectors, such as IGRF in the case of magnetic fields. To uniquely determine the attitude at any time thus requires (at least) two independent vector measurements (e.g. Wertz, 1978). Had CINEMA 360 successfully detumbled, the sun sensor would have provided a second vector in addition to the magnetic field (Vega et al., 2009). However, since this was not available we must therefore estimate the spacecraft attitude using the magnetometer data only.

365
To represent rotations we use unit quaternions q = cos Θ 2 , sin Θ 2ŵ , whereŵ is the axis of rotation about which a rotation of Θ is applied. The rotation from the (calibrated) measured field B sc in orthogonal, spacecraft fixed coordinates to IGRF B in the GEI frame at time t i is given by which corresponds to firstly a rotation from the observed to expected field, followed by some arbitrary rotation about the expected field by Φ. Inverting Equation 3 and taking the time derivative (indicated here by dots) gives that is changes in the measured magnetic field can be due to changes in the spacecraft's attitude i.e. rotation or due to the real field changing i.e. spacecraft motion. In LEO the latter is significant, at ∼50-90 nT s −1 for CINEMA. It is clear from the data that CINEMA was spinning slowly 385 e.g. in the attitude mode data (second panel of Figure 2) there were ∼10 oscillations of the magnetic field over an entire orbit. Given the cadence of the magnetometer data, the attitude of the spacecraft should thus have only changed by a few degrees at most between each datapoint. We therefore im-390 plement a simple method of attitude estimation here, choosing the attitude quaternion q i (Φ) which best fitted the next data point i.e. the one which minimised the angle between q i (Φ) 0, B i+1 sc q * i (Φ) and B i+1 . This method thus results in attitude estimates at each datapoint, accurate to a few de-395 grees (c.f. Natanson et al., 1990). Figure 5 shows the estimated attitude of CINEMA using the described method, represented as the three Euler angles

Attitude Mode
revealing that the spacecraft was spinning about the IB x-axis at ∼12 min period, along with substantial nutation/precession at ∼8 min period. This is consistent with the raw data (second panel in Figure 2), whereby the y and z 405 axes contained the largest oscillations at the spin period with similar amplitudes whereas the x axis showed much smaller oscillations at a shorter period. Despun attitude mode data is displayed in the bottom panel of Figure 2. This nominal spin axis is along the boom direction (see 410 IB axes in Figure 1). CINEMA's moment of inertia tensor should be largest about the boom axis if it successfully deployed. Therefore, one would expect the spacecraft to spin predominantly about this axis given the initial tumbling out of the P-POD and that the one of the torque coils was not op-415 erational. Since the magnetometer data shows the spacecraft was indeed spinning about the boom axis, we take this as evidence, corroborated by spacecraft onboard systems, that the boom did indeed successfully deploy.

420
Before determining the attitude for the science mode data, we applied a low-pass filter using the Morlet wavelet with a cutoff of 21 mHz to remove high frequency signals and noise. The cutoff was chosen such that spin tones, as shown in Figure 6, remained. We transform the left-handed sensor 425 axes of the outboard into the same right-handed system as the inboard (see Figure 1) and subsequently apply the attitude determination procedure every 5 s to the filtered data. The expected relative orientations of the sensor axes have been corroborated by gradiometer mode data (not shown),

430
whereby data from both sensors are recorded simultaneously (Brown et al., 2014). The results showed that in the year between the attitude and science mode data in this paper, CINEMA's attitude had substantially changed. This is clear from the power spectra of 435 B sc in Figure 6, where there are three different tones (corresponding to spin, precession and nutation) present in all three components. This is unlike the attitude mode data where only two tones were present, one of which was largely confined to a single axis. The result is that the Euler angles (not shown) 440 are far more complicated than those displayed in Figure 5.
The despun science mode data is displayed in the bottom panel of Figure 3. We show power spectra of these compo-  Figure 6. Power spectral densities of the components of the calibrated science mode data (19 Nov 2013) in both the orthogonal spacecraft fixed frame (lighter) and despun GEI frame where IGRF has been subtracted from the latter. x,y and z components are given by blue, green and red respectively. The noise level at 1 Hz in the despun data is indicated by the black dotted line. nents (where IGRF has been subtracted) in Figure 6, revealing that all three spin tones have been greatly reduced. While 445 errors in the calibration parameters lead to oscillations in the despun data at the spin frequencies, frequencies above the low-pass filter cutoff (in particular in the band-pass region highlighted in Figure 6) are suitable for science applications as we demonstrate in the next section.

Field Aligned Currents (FACs)
While we have shown that attitude information can be extracted by comparing the MAGIC data with IGRF, the requirements of the instrument additionally included the ability to detect transient physical signals in the time series, due to 455 either spatially or temporally confined phenomena. We transformed the despun MAGIC science mode data in a fieldaligned system (ν, φ, µ), where µ is aligned with IGRF, ν is perpendicular to IGRF pointing radially outwards, and φ is the usual azimuthal direction; subsequently band-pass fil-460 tering the data to reveal transients. A lower cutoff of 21 mHz was used to remove spin tones due to errors in calibration and the upper cutoff was set at 1.8 Hz in order to reduce noise and remove quasi-periodic spikes in the data of spacecraft origin. The two perpendicular components of the magnetic field 465 are shown in Figure 7, revealing transient signals of ∼20-60 nT in amplitude particularly at the start of the interval when CINEMA was at high magnetic latitudes in the southern hemisphere. Through the Ampère-Maxwell law j = ∇ × B/µ 0 , the field-aligned currents (FACs) associated 470 with these magnetic perturbations can be estimated using the method of Lühr et al. (1996), namely where v ⊥ is the spacecraft orbital speed perpendicular to IGRF andn = µ × v/ |µ × v| is a unit vector perpendicu-475 lar to both IGRF and the orbital velocity. This method can lead to a factor 2 under-estimation of the current density due to the finite extent of the (assumed infinite) current sheets (Lühr et al., 1996). The calculated FACs are displayed in the second panels of Figure 7, showing currents of up to a few 480 µA m −2 . We highlight (grey areas) the times of the two periods of FACs between 16:35-16:50 UT when CINEMA was traversing the polar cap, where the S = log 10 j 2 parameter (not shown) of Heilig and Lühr (2013) was used to identify the boundaries. The FACs are qualitatively similar and of 485 similar amplitude to those determined from CHAMP magnetic field data at the auroral oval (Xiong et al., 2014).
To check whether these field aligned currents are consistent with the location of the auroral oval, we use Total Energy Detector (TED) data from the NOAA Polar Orbiting 490 Environmental Satellites (POES) (Evans and Greer, 2004) and SSJ/5 Precipitating Particle Sensor data from the Defense Meteorological Satellite Program (DMSP) spacecraft.  Figure 7 are also highlighted. The locations of these FACs are in fairly good agreement with the position of the auroral oval as evidenced from the precipitating particle data, thus we are confident that 505 MAGIC did indeed detect field-aligned currents at the auroral oval.
A further period of FACs was detected by MAGIC between 17:04:40-17:12:20 UT with amplitudes of typically ∼0.5 µA m −2 . During this time CINEMA was near the mag-510 netic equator and only a few degrees eastward of the dawn day-night terminator on the ground. Given this location, we suggest that these could be due to equatorial plasma bubbles, the FAC signatures of which have been detected by CHAMP (Park et al., 2009) revealing similar amplitudes to those pre-515 sented here. Unfortunately there is no independent measurement to confirm this interpretation.

Discussion
In the calibration of the MAGIC data, as presented in section 2, we have used an attitude-independent method (e.g. Foster and Elkaim, 2008). In the case of attitude mode this has assumed constant calibration parameters, whereas for science mode we have added a linear temperature dependence (c.f. Brown et al., 2014). Springmann and Cutler (2012) also employed attitude-independent calibration to a 525 commercial off-the-shelf PNI Sensor Corportation Micro-Mag3 vector magnetometer flown on the RAX-1 Cubesat in LEO. They found residuals with IGRF of ∼900 nT, larger than those reported here for MAGIC. However, they subsequently allowed for time-varying biases by modelling 530 (through the Biot-Savart law) telemetered spacecraft currents, reducing the RMSD to 174 nT. Such a procedure could be implemented to MAGIC in future flight opportunities as the next step in calibration. Furthermore, following attitude estimation it may be possible to apply attitude-dependent cal-535 ibration e.g. taking into account the induced currents in solar panels due to their illumination.
Our method of attitude estimation (section 3) can be applied to CINEMA only because its tumbling motion is suitably slow. Had CINEMA successfully detumbled and spun-540 up, then the method described here would not have been required since sun sensor data could have been combined with that from MAGIC to uniquely define the spacecraft attitude (Vega et al., 2009). On the other hand, more sophisticated methods of magnetometer-only attitude determination do ex-545 ist (Natanson et al., 1990;Searcy and Pernicka, 2012). These methods would necessitate further modelling than is possible for CINEMA, since they require measures of the spacecraft inertia tensor and any external torques (such as gravity gradients and drags) acting upon it. It is possible that such attitude 550 modelling could be implemented in the future to better constrain spacecraft attitude.
At present, the determination of physical signals in the MAGIC data (section 4)   the magnetometer only. The main limiting factor is the period of CINEMA's rotation, precession and nutation. The cutoff in our filtering is chosen such that the low-pass filter will retain these frequencies whereas the band-pass will reduce them. This serves as a limitation in the timescales (corresponding 560 to equivalent length scales here of ∼4-360 km) of physical signals which can currently be achieved and could in fact be affecting the determined physical signals and corresponding FACs presented here to some degree. It is possible that a further developed attitude model may reduce these effects.

565
Both the magnetometer-only calibration and attitude estimation methods used here rely on the real physical magnetic field being, on average, well represented by the International Geomagnetic Reference Field (IGRF) (c.f. Maus et al., 2005). While this is certainly the case in low Earth orbit, it is 570 of course not true in general. Nonetheless, AMR sensors similar to MAGIC could be used in other environments, though the methods used to recover accurate magnetic field measurements would have to be tailored to the unique environment and requirements of the instrument.

Conclusions
We have presented the first in-flight science results from MAGIC (MAGnetometer from Imperial College), a novel miniaturised vector DC magnetometer using anisotropic magnetoresitive (AMR) sensors, aboard CINEMA (Cubesat 580 for Ions Neutrals Electrons and MAgnetic fields) spacecraft in low Earth orbit. We have detailed our attitude-independent (and temperature dependent in the case of science mode) calibration procedures, which result in root mean squared deviations in field magnitude from IGRF of 1.95% and 1.23% 585 respectively for the inboard (in attitude mode) and outboard (science mode) sensors respectively. Such levels of accuracy in the overall magnetic field are certainly sufficient for attitude estimation (c.f. Natanson et al., 1990). Indeed, through the use of magnetometer data only we estimate CINEMA's 590 attitude to within a few degrees using a simple method, thus characterising the spacecraft's spin, nutation and precession and successfully satisfying the first requirement of the MAGIC instrument.
Furthermore, we have presented evidence that MAGIC 595 is capable of detecting transient physical signals (∼20-60 nT) in addition to simply IGRF, thereby accomplishing the other requirement. These signals were an order of magnitude smaller than those detected by the science AMR on the DICE Cubesat during a marginally geomagnetically ac-600 tive period (Fish et al., 2014), indeed MAGIC has an order of magnitude superior resolution and noise floor than the DICE SciMag instrument. The determined field-aligned currents observed by MAGIC (∼0.5-2 µA m −2 ) show qualitative agreement with previous observations from the CHAMP 605 spacecraft (Park et al., 2009;Xiong et al., 2014) and those detected at the auroral oval are consistent in location with other available datasets, namely DMSP and POES. Therefore, to our knowledge, MAGIC is the highest sensitivity vector DC magnetometer flown on a Cubesat to date for which 610 conducting scientific studies is feasible. While AMR sensors cannot achieve the absolute precision of magnetic field measurements at LEO such as Swarm (Friis-Christensen et al., 2006), certain scientific applications do not require such high levels of precision for which sensors similar to MAGIC could 615 play a role. Indeed we have demonstrated that simple methods applied to only the magnetometer data can yield useful scientific results such as the locations of field-aligned currents, even during geomagnetically quiet times. The relatively low cost of Cubesats offers the possibility in the fu-620 ture of employing a constellation of spacecraft with MAGIC sensors e.g. for the purposes of space weather monitoring.