public GPost(int Ordinate, EarthPoint Point, OrdinateDirection Direction, PositionInSection Position, int SectionId, bool Crossing) { this.Ordinate = Ordinate; this.Point = Point; this.Direction = Direction; this.Position = Position; this.SectionId = SectionId; this.Crossing = Crossing; Tracks = new List <GTrack>(); }
protected override void FillWithBytes(byte[] Data) { this.Ordinate = BitConverter.ToInt32(Data.Take(3).Concat(new Byte[1]).ToArray(), 0); byte flags = Data[3]; this.Direction = DecodeDirection((flags >> 7) & 0x01); this.Position = (PositionInSection)(flags & 0x03); this.Point = new EarthPoint( BitConverter.ToInt32(Data, 4) * 10e-9 * 180 / Math.PI, BitConverter.ToInt32(Data, 8) * 10e-9 * 180 / Math.PI ); this.ChildrenStartAdress = SubInt(Data, 12, 3) + 1; }