public MavLink4Net.Messages.IMessage Deserialize(System.IO.BinaryReader reader)
 {
     MavLink4Net.Messages.Common.SimStateMessage message = new MavLink4Net.Messages.Common.SimStateMessage();
     message.Q1         = reader.ReadSingle();
     message.Q2         = reader.ReadSingle();
     message.Q3         = reader.ReadSingle();
     message.Q4         = reader.ReadSingle();
     message.Roll       = reader.ReadSingle();
     message.Pitch      = reader.ReadSingle();
     message.Yaw        = reader.ReadSingle();
     message.Xacc       = reader.ReadSingle();
     message.Yacc       = reader.ReadSingle();
     message.Zacc       = reader.ReadSingle();
     message.Xgyro      = reader.ReadSingle();
     message.Ygyro      = reader.ReadSingle();
     message.Zgyro      = reader.ReadSingle();
     message.Lat        = reader.ReadSingle();
     message.Lon        = reader.ReadSingle();
     message.Alt        = reader.ReadSingle();
     message.StdDevHorz = reader.ReadSingle();
     message.StdDevVert = reader.ReadSingle();
     message.Vn         = reader.ReadSingle();
     message.Ve         = reader.ReadSingle();
     message.Vd         = reader.ReadSingle();
     return(message);
 }
 public void Serialize(System.IO.BinaryWriter writer, MavLink4Net.Messages.IMessage message)
 {
     MavLink4Net.Messages.Common.SimStateMessage tMessage = message as MavLink4Net.Messages.Common.SimStateMessage;
     writer.Write(tMessage.Q1);
     writer.Write(tMessage.Q2);
     writer.Write(tMessage.Q3);
     writer.Write(tMessage.Q4);
     writer.Write(tMessage.Roll);
     writer.Write(tMessage.Pitch);
     writer.Write(tMessage.Yaw);
     writer.Write(tMessage.Xacc);
     writer.Write(tMessage.Yacc);
     writer.Write(tMessage.Zacc);
     writer.Write(tMessage.Xgyro);
     writer.Write(tMessage.Ygyro);
     writer.Write(tMessage.Zgyro);
     writer.Write(tMessage.Lat);
     writer.Write(tMessage.Lon);
     writer.Write(tMessage.Alt);
     writer.Write(tMessage.StdDevHorz);
     writer.Write(tMessage.StdDevVert);
     writer.Write(tMessage.Vn);
     writer.Write(tMessage.Ve);
     writer.Write(tMessage.Vd);
 }