Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Break apart track_made_good and true_heading #267

Open
tylerlum opened this issue Dec 2, 2021 · 2 comments · May be fixed by #272
Open

Break apart track_made_good and true_heading #267

tylerlum opened this issue Dec 2, 2021 · 2 comments · May be fixed by #272
Assignees

Comments

@tylerlum
Copy link
Contributor

tylerlum commented Dec 2, 2021

Right now, our code treats track_made_good and true_heading as identical. However, this is not always the case. We need to make changes in the code to properly model and handle this difference.

track_made_good is purely the direction that the boat is moving, which is independent of our heading. This is calculated as some type of changing in GPS lat/lon position over time.

true_heading is the direction that the boat is pointing towards.

From discussion with the team, we believe that, in an environment with 0 ocean current, the sailboat track_made_good = true_heading is a reasonable approximation. The only time this changes is when we make a sharp turn, but once the boat picks up speed, the "sideways" movement is primarily gone.

Thus, almost all of the difference between track_made_good and true_heading is in the ocean current.

image

The place that needs the biggest change is in:

  1. MOCK_sensors.py: Before update position over time with SPEED and HEADING. Now update position over time with SPEED and TRACK_MADE_GOOD. Also, the speed of the boat should take into account the ocean current. Right now, the speed measurement ignores the ocean_current.
  2. utilities.py: Need to change measuredWindToGlobalWind and globalWindToMeasuredWind to use SPEED AND HEADING AND TRACK_MADE_GOOD (before just speed and heading).

When changing from boat-frame to world-frame, we need to be careful with the use of speed, heading, and track_made_good. heading sets the rotation of the boat coordinate frame wrt world-frame. track_made_good is used to break up the speed into components. Currently, these methods assume heading == track_made_good

@tylerlum
Copy link
Contributor Author

tylerlum commented Dec 4, 2021

  1. Converting between measured and global wind

image

@patrick-5546
Copy link
Member

patrick-5546 commented Dec 5, 2021

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants