Skip to content

Should getWindAt return twd in radians or degrees? And potential related problems with concurrency. #12

@kingkong-cmd

Description

@kingkong-cmd

Hi,

I've been playing around with this a bit, but got a bit confused about the getWindAt() function. It says in "docs" that twd should be in radians, but then I see this code where you use math.radians(twd) on the twd returned from getWindAt(). math.radians() converts degrees to radians, no?

Secondly, even if i change getWindAt to return twd in degrees, the twd in the Isopoint in the results are really small (like e-37) which makes me think there might be something wrong with the concurrency where it recursively does math.radians(twd) until it becomes really small in the end.

Any chance you are willing to take a look?

LINE  247 in routing.py
try:
    (twd, tws) = self.grib.getWindAt(t, p.pos[0], p.pos[1])
except Exception as e:
    raise RoutingNoWindException() from e

for twa in range(-180, 180, 5):
    twa = math.radians(twa)
    twd = math.radians(twd)
    brg = utils.reduce360(twd + twa)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions