Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
julienthevenoz committed Feb 2, 2024
1 parent 17d68d2 commit 3e14fff
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions systemtests/plotter_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def adjust_arrays(self):
''' Method that trims the self.bag_* attributes to get rid of the datapoints where the drone is immobile on the ground and makes self.bag_times start at 0 [s]'''

print(f"rosbag initial length {(self.bag_times[-1]-self.bag_times[0]) }s")
print(f"rosbag initial length {(self.bag_times[-1]-self.bag_times[0]) * 10**-9}s")
#find the takeoff time and landing times
ground_level = self.bag_z[0]
airborne = False
Expand All @@ -147,15 +146,11 @@ def adjust_arrays(self):
for z_coord in self.bag_z:
if not(airborne) and z_coord > ground_level + ground_level*(0.1): #when altitude of the drone is 10% higher than the ground level, it started takeoff
takeoff_index = i
takeoff_time = self.bag_times[takeoff_index]
airborne = True
print(f"takeoff time is {self.bag_times[takeoff_index]}s")
print(f"takeof time is {(takeoff_time-self.bag_times[0]) * 10**-9}")
if airborne and z_coord <= ground_level + ground_level*(0.1): #find when it lands again
landing_index = i
landing_time = self.bag_times[landing_index]
print(f"landing time is {self.bag_times[landing_index]}s")
print(f"landing time is {(landing_time-self.bag_times[0]) * 10**-9}")
break
i+=1

Expand Down

0 comments on commit 3e14fff

Please sign in to comment.