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

Break apart track_made_good and true_heading #267

@tylerlum

Description

@tylerlum

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions