private void updateTrajectoryText(int tid)
 {
     TrajectoryDbDataSet.trajectoriesRow traj = tds.trajectories.FindByt_id(tid);
     tidblock.Text             = traj.t_id.ToString();
     starttimeblock.Text       = traj.start_time.ToString("HH:mm:ss.fff");
     lengthblock.Text          = traj.length.ToString("0.000");
     averagevelocityblock.Text = traj.average_velocity.ToString("0.000");
 }
        // When starting a new trajectory, call this.  It should add a new row to the trajectories dataset with junk data that will be updated once trajectory is over
        public void addTrajectory()
        {
            if (Globals.ds == null)
            {
                Globals.ds = new TrajectoryDbDataSet();
            }

            try
            {
                this.startTime = DateTime.Now;
                this.t_key = Globals.ds.trajectories.AddtrajectoriesRow((byte)trackedSkeleton, startTime, startTime, 0, "N", 0,0);

                //Store this trajectory's row primary key
                this.t_id = t_key.t_id;
            }
            catch
            {
                return;
            }
        }