public void Serialize(System.IO.BinaryWriter writer, MavLink4Net.Messages.IMessage message) { MavLink4Net.Messages.Common.GpsInputMessage tMessage = message as MavLink4Net.Messages.Common.GpsInputMessage; writer.Write(tMessage.TimeUsec); writer.Write(tMessage.TimeWeekMs); writer.Write(tMessage.Lat); writer.Write(tMessage.Lon); writer.Write(tMessage.Alt); writer.Write(tMessage.Hdop); writer.Write(tMessage.Vdop); writer.Write(tMessage.Vn); writer.Write(tMessage.Ve); writer.Write(tMessage.Vd); writer.Write(tMessage.SpeedAccuracy); writer.Write(tMessage.HorizAccuracy); writer.Write(tMessage.VertAccuracy); writer.Write(((ushort)(tMessage.IgnoreFlags))); writer.Write(tMessage.TimeWeek); writer.Write(tMessage.GpsId); writer.Write(tMessage.FixType); writer.Write(tMessage.SatellitesVisible); }
public MavLink4Net.Messages.IMessage Deserialize(System.IO.BinaryReader reader) { MavLink4Net.Messages.Common.GpsInputMessage message = new MavLink4Net.Messages.Common.GpsInputMessage(); message.TimeUsec = reader.ReadUInt64(); message.TimeWeekMs = reader.ReadUInt32(); message.Lat = reader.ReadInt32(); message.Lon = reader.ReadInt32(); message.Alt = reader.ReadSingle(); message.Hdop = reader.ReadSingle(); message.Vdop = reader.ReadSingle(); message.Vn = reader.ReadSingle(); message.Ve = reader.ReadSingle(); message.Vd = reader.ReadSingle(); message.SpeedAccuracy = reader.ReadSingle(); message.HorizAccuracy = reader.ReadSingle(); message.VertAccuracy = reader.ReadSingle(); message.IgnoreFlags = ((MavLink4Net.Messages.Common.GpsInputIgnoreFlags)(reader.ReadUInt16())); message.TimeWeek = reader.ReadUInt16(); message.GpsId = reader.ReadByte(); message.FixType = reader.ReadByte(); message.SatellitesVisible = reader.ReadByte(); return(message); }