Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State determination #19

Merged
merged 29 commits into from
Sep 25, 2024
Merged

State determination #19

merged 29 commits into from
Sep 25, 2024

Conversation

harshil21
Copy link
Member

@harshil21 harshil21 commented Sep 22, 2024

Implements state determination and transition.

Additional changes:

  • IMUDataProcessor class now calculates speed, max_speed, and zeros out the altitude at init
  • Deploys airbrakes after Motor burnout.
  • Added LandedState
  • Removes run_main_local file since we can now run the main file in mock mode.
  • Adds 2 csv files

@harshil21 harshil21 added the enhancement New feature or request label Sep 22, 2024
@harshil21 harshil21 marked this pull request as ready for review September 22, 2024 07:15
Copy link
Member Author

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confidence is slowly increasing that our system will indeed work. A full scale integration test (simulation) should iron out the last remaining bugs / quirks.

Comment on lines +191 to +192
if len(self._data_points) < 2:
return 0.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still like us to reconsider fetching a set amount of data packets in get_imu_data_packets(), so that this condition is never hit and things are a little more consistent overall.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would we implement that in a way that ensured we didn't have a build up of data?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can tell it, "give me at least 10 packets of data, but if you have more, give it all"

@harshil21 harshil21 requested a review from Aman-Anas September 22, 2024 07:40
Base automatically changed from fix-ctrl-c to main September 24, 2024 23:03
"_speed",
"_zeroed_altitude",
"upside_down",
)

def __init__(self, data_points: Sequence[EstimatedDataPacket], upside_down: bool = False):
Copy link
Member

@JacksonElia JacksonElia Sep 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove data_points from init, just set it equal to an empty queue (or whatever it is)

Comment on lines +191 to +192
if len(self._data_points) < 2:
return 0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would we implement that in a way that ensured we didn't have a build up of data?

"""
# We need at least two data points to calculate the speed:
if len(self._data_points) < 2:
return 0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should return the speed from the last loop, not 0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in #22

@JacksonElia JacksonElia merged commit 4809728 into main Sep 25, 2024
2 checks passed
@JacksonElia JacksonElia deleted the state-determination branch September 25, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants