Exemplo n.º 1
0
        /// <summary>
        /// Makes and exact copy of the adc message
        /// </summary>
        /// <returns>
        /// The copy.
        /// </returns>
        /// <param name='adc'>
        /// The adc message to copy
        /// </param>
        public static AdcMessage DeepCopy(AdcMessage adc)
        {
            AdcMessage ans = new AdcMessage();

            ans.time     = adc.time;
            ans.altitude = adc.altitude;
            ans.tas      = adc.tas - 29; //Offset degut a error en la tensio.

            ans.barometer   = Field2.DeepCopy(adc.barometer);
            ans.thermometer = Field2.DeepCopy(adc.thermometer);
            ans.pitot       = Field2.DeepCopy(adc.pitot);

            return(ans);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Makes an exact copy of imu
        /// </summary>
        /// <returns>
        /// The copy.
        /// </returns>
        /// <param name='imu'>
        /// The imu message to be copied
        /// </param>
        public static ImuEulerMessage DeepCopy(ImuEulerMessage imu)
        {
            ImuEulerMessage ans = new ImuEulerMessage();

            ans.time   = imu.time;
            ans.accelX = Field2.DeepCopy(imu.accelX);
            ans.accelY = Field2.DeepCopy(imu.accelY);
            ans.accelZ = Field2.DeepCopy(imu.accelZ);
            ans.roll   = Field2.DeepCopy(imu.roll);
            ans.pitch  = Field2.DeepCopy(imu.pitch);
            ans.yaw    = Field2.DeepCopy(imu.yaw);

            return(ans);
        }