/// <summary> /// Creates a new instance of the trajectories class /// </summary> /// <param name="Callsign">Vehicle Target Identification</param> /// <param name="Time">First time. Used in export KML so, we can know which time is the first point (we will also search for last point time later)</param> /// <param name="lat">Latitude of first point</param> /// <param name="lon">Longitude of first point</param> /// <param name="emitter">Indicates if the vehicle is a surface vehicle (car) if it is an aircraft (plane) or undetermined (Undetermined)</param> /// <param name="TargetAddress">Target address of the message</param> /// <param name="DetectionMode">Indicates the type of detection mode (ADS-B, MLAT or SMR)</param> /// <param name="CAT">Category of the message</param> /// <param name="SAC">SAC of the message</param> /// <param name="SIC">SIC of the message</param> /// <param name="Track_number">Message track number</param> public Trajectories(string Callsign, int Time, double lat, double lon, string emitter, string TargetAddress, string DetectionMode, string CAT, string SAC, string SIC, string Track_number) { PointLatLng p = new PointLatLng(lat, lon); this.ListPoints.Add(p); PointWithTime pt = new PointWithTime(p, Time); this.ListTimePoints.Add(pt); this.CAT = CAT; this.Target_Identification = Callsign; this.SAC = SAC; this.SIC = SIC; this.Target_Address = TargetAddress; this.First_time_of_day = Time; if (emitter == "car") { this.type = "Surface vehicle"; } else if (emitter == "plane") { this.type = "Aircraft"; } else { this.type = emitter; } this.DetectionMode = DetectionMode; this.Track_number = Track_number; this.ListPoints.Add(p); }
/// <summary> /// Adds a new point whith time to the trajectory /// </summary> /// <param name="lat">Latitude of the point</param> /// <param name="lon">Longitude of the point</param> /// <param name="time">Time of the point</param> public void AddTimePoint(double lat, double lon, int time) { PointLatLng p = new PointLatLng(lat, lon); PointWithTime TimePoint = new PointWithTime(p, time); ListTimePoints.Add(TimePoint); }