Exemplo n.º 1
0
 public void Serialize(System.IO.BinaryWriter writer, MavLink4Net.Messages.IMessage message)
 {
     MavLink4Net.Messages.Common.HilGpsMessage tMessage = message as MavLink4Net.Messages.Common.HilGpsMessage;
     writer.Write(tMessage.TimeUsec);
     writer.Write(tMessage.Lat);
     writer.Write(tMessage.Lon);
     writer.Write(tMessage.Alt);
     writer.Write(tMessage.Eph);
     writer.Write(tMessage.Epv);
     writer.Write(tMessage.Vel);
     writer.Write(tMessage.Vn);
     writer.Write(tMessage.Ve);
     writer.Write(tMessage.Vd);
     writer.Write(tMessage.Cog);
     writer.Write(tMessage.FixType);
     writer.Write(tMessage.SatellitesVisible);
 }
Exemplo n.º 2
0
 public MavLink4Net.Messages.IMessage Deserialize(System.IO.BinaryReader reader)
 {
     MavLink4Net.Messages.Common.HilGpsMessage message = new MavLink4Net.Messages.Common.HilGpsMessage();
     message.TimeUsec          = reader.ReadUInt64();
     message.Lat               = reader.ReadInt32();
     message.Lon               = reader.ReadInt32();
     message.Alt               = reader.ReadInt32();
     message.Eph               = reader.ReadUInt16();
     message.Epv               = reader.ReadUInt16();
     message.Vel               = reader.ReadUInt16();
     message.Vn                = reader.ReadInt16();
     message.Ve                = reader.ReadInt16();
     message.Vd                = reader.ReadInt16();
     message.Cog               = reader.ReadUInt16();
     message.FixType           = reader.ReadByte();
     message.SatellitesVisible = reader.ReadByte();
     return(message);
 }