Skip to content
Snippets Groups Projects
Unverified Commit a04cba7b authored by David Hoese's avatar David Hoese
Browse files

Fix wind direction in negative quadrant

parent 610561b5
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,7 @@ def handle_influxdb_result(result, symbols, interval):
# remove wind components
if influx_symbs[-1] == 'wind_north' and 'wind_direction' in frame.columns:
frame['wind_direction'] = np.rad2deg(np.arctan2(frame['wind_east'], frame['wind_north']))
frame['wind_direction'] = frame['wind_direction'].where(frame['wind_direction'] > 0, frame['wind_direction'] + 360.)
frame = frame.iloc[:, :-2]
frame.columns = req_syms[:-2]
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment