Path: SpacecraftEstimation/AttitudeEstimation
% Test attitude determination with sun, earth and magnetometer. dT is the time step for the attitude determination system. You can numerically integrate with a smaller time step by setting nInt > 1. The initial attitude is unknown. This demo uses the sun earth and magnetic field as attitude sources. The earth provides roll and pitch while the sun provides yaw. The magnetic field provide orientation with respect to the local field lines. When using the UKF it is important to pick an appropriate plant noise matrix. If it is too high the filter may go unstable and produce large errors. With a gyro it is generally small. The terms for the delta quaternion and the bias are not the same (although they are in this demo). The choice of the UKF alpha parameter is also important. You will notice that it takes a few sun measurements for the filter to properly estimate the bias. -------------------------------------------------------------------------- See also SunMagAttDet, RVFromKepler, SunV1, FPSensors, RIGOut, BDipole -------------------------------------------------------------------------- % -------------------------------------------------------------------------- Copyright (c) 2017 Princeton Satellite Systems, Inc. All rights reserved. --------------------------------------------------------------------------