/// <summary> /// /// </summary> /// <param name="payload"></param> protected override void unpack(BinaryBitReader reader) { ReadLocation(reader); if (this.Version >= ProtocolVersion.v4__WeatherExtension) { if (reader.ReadBoolean()) { RequestLat = reader.ReadFloat(true, 7, 13); RequestLon = reader.ReadFloat(true, 8, 13); PointKey = (byte)reader.ReadUInt(4); } } }
/// <summary> /// /// </summary> /// <param name="reader"></param> protected void ReadLocation(BinaryBitReader reader) { if (Version >= ProtocolVersion.v2__LocationFix) { Lat = reader.ReadFloat(true, 7, 13); Lon = reader.ReadFloat(true, 8, 13); } else { Lat = reader.ReadFloat(true, 7, 9); Lon = reader.ReadFloat(true, 8, 9); } bool hasAlt = reader.ReadBoolean(); if (hasAlt) { Alt = (int)reader.ReadUInt(14); } }