Skip to content

Commit

Permalink
fixed bug in plotting code
Browse files Browse the repository at this point in the history
  • Loading branch information
TAJD committed Feb 14, 2024
1 parent b2a46f8 commit 4305def
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ venv
dev.py
/.pytest_cache
/__pycache__/
.pytest_cache
2 changes: 1 addition & 1 deletion src/UtilsMod.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _get_vmg(dat, twa_range):
if dat.shape[1] == 1: # if only one sails, it has both VMGs
up = np.argmax(dat[:, 0, 0] * np.cos(twa_range / 180 * np.pi))
dn = np.argmax(-dat[:, 0, 0] * np.cos(twa_range / 180 * np.pi))
return np.array([up, dn]), 0, 0
return np.array([up, dn]), np.array([0, 0])
else:
up = np.zeros(dat.shape[1])
dn = np.zeros(dat.shape[1])
Expand Down
7 changes: 0 additions & 7 deletions tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import io
import json
import os
import tempfile
import zipfile

import numpy as np
import pytest
from PIL import Image

from src.api import app


def test_ping_route():
client = app.test_client()
response = client.get("/ping")
Expand Down

0 comments on commit 4305def

Please sign in to comment.