public void Serialize(System.IO.BinaryWriter writer, MavLink4Net.Messages.IMessage message)
 {
     MavLink4Net.Messages.Common.Gps2RawMessage tMessage = message as MavLink4Net.Messages.Common.Gps2RawMessage;
     writer.Write(tMessage.TimeUsec);
     writer.Write(tMessage.Lat);
     writer.Write(tMessage.Lon);
     writer.Write(tMessage.Alt);
     writer.Write(tMessage.DgpsAge);
     writer.Write(tMessage.Eph);
     writer.Write(tMessage.Epv);
     writer.Write(tMessage.Vel);
     writer.Write(tMessage.Cog);
     writer.Write(((byte)(tMessage.FixType)));
     writer.Write(tMessage.SatellitesVisible);
     writer.Write(tMessage.DgpsNumch);
 }
 public MavLink4Net.Messages.IMessage Deserialize(System.IO.BinaryReader reader)
 {
     MavLink4Net.Messages.Common.Gps2RawMessage message = new MavLink4Net.Messages.Common.Gps2RawMessage();
     message.TimeUsec          = reader.ReadUInt64();
     message.Lat               = reader.ReadInt32();
     message.Lon               = reader.ReadInt32();
     message.Alt               = reader.ReadInt32();
     message.DgpsAge           = reader.ReadUInt32();
     message.Eph               = reader.ReadUInt16();
     message.Epv               = reader.ReadUInt16();
     message.Vel               = reader.ReadUInt16();
     message.Cog               = reader.ReadUInt16();
     message.FixType           = ((MavLink4Net.Messages.Common.GpsFixType)(reader.ReadByte()));
     message.SatellitesVisible = reader.ReadByte();
     message.DgpsNumch         = reader.ReadByte();
     return(message);
 }