示例#1
0
        Gyro(FlightControlSystem fcs, XmlElement element)
            : base(fcs, element)
        {
            sensorOrientation = new SensorOrientation(element);
            Propagate         = fcs.GetExec().GetPropagate();

            Debug(0);
        }
示例#2
0
        public Accelerometer(FlightControlSystem fcs, XmlElement element)
            : base(fcs, element)
        {
            sensorOrientation = new SensorOrientation(element);
            Propagate         = fcs.GetExec().GetPropagate();
            Accelerations     = fcs.GetExec().Accelerations;
            MassBalance       = fcs.GetExec().MassBalance;

            XmlElement location_element = element.FindElement("location");

            if (location_element != null)
            {
                vLocation = FormatHelper.TripletConvertTo(location_element, "IN");
            }
            else
            {
                log.Error("No location given for accelerometer. ");
                throw new Exception("Malformed accelerometer specification");
            }

            vRadius = MassBalance.StructuralToBody(vLocation);

            Debug(0);
        }