UBCSailbot / sailbot_workspace

UBC Sailbot's monorepo
https://ubcsailbot.github.io/sailbot_workspace/main/
Apache License 2.0
4 stars 1 forks source link

Calculates current heading #286

Open jamenkaye opened 5 months ago

jamenkaye commented 5 months ago

Description

TODO:

Verification

Resources

Krithik1 commented 5 months ago
  1. Add a field in self to store the waypoint we are going towards
  2. Original Desired Heading (field in Sailbot class)

What get_desired_heading has to do?

  1. Update the current waypoint that we are trying to reach (separate function)
  2. Now if in both problem zones then publish old heading
  3. If not in the problem zones then calculate heading from curr position to current waypoint
jamenkaye commented 5 months ago

Just adding some of the other details we talked about today:

How do we update the target waypoint that we're trying to reach?

I'm saying "target waypoint" to mean the waypoint that we are currently trying to navigate towards, and "successive waypoint" to mean the next waypoint after the target waypoint.

How do we decide if we're in the problem zone of some given waypoint? It depends on:

Then I think you'd basically analyze (the true wind angle) - (the bearing of the sailboat from the waypoint). I would definitely suggest drawing this out, to make sure you account for the problem zone that extends downwind as well as upwind of the waypoint (the whole green-lantern shape)

Lmk if you have any more questions!! Happy coding! ⌨🖥👨‍💻📐