RDI ADCP heading range is 0-360 degrees, but the Nortek ADV heading range is -180 to +180 degrees. It would be convenient if all headings were reported in the range 0-360.
I think the ADV heading range of -180 to +180 will only occur when _check_declination is executed and 'declination' is found. This is because nortek_orient2euler will be called on line 108 of rotate/base.py and it uses np.rad2deg where rad2deg(x) is 180 * x / pi. nortek_orient2euler is defined on line 180 of rotate/base.py.
But, the ADV heading should have the range 0-360 degrees if the 'if' statement on line 120 of rotate/base.py is executed:
if 'heading' in odata and \
not advo.props.get('declination_in_heading', False):
if cs == 'earth' and not rotation_done_flag:
# Rotate to instrument coordinate-system before adjusting
# for declination.
advo.rotate2('inst', inplace=True)
odata['heading'] += advo.props['declination']
odata['heading'] %= 360
RDI ADCP heading range is 0-360 degrees, but the Nortek ADV heading range is -180 to +180 degrees. It would be convenient if all headings were reported in the range 0-360.
I think the ADV heading range of -180 to +180 will only occur when _check_declination is executed and 'declination' is found. This is because nortek_orient2euler will be called on line 108 of rotate/base.py and it uses np.rad2deg where rad2deg(x) is 180 * x / pi. nortek_orient2euler is defined on line 180 of rotate/base.py.
But, the ADV heading should have the range 0-360 degrees if the 'if' statement on line 120 of rotate/base.py is executed: if 'heading' in odata and \ not advo.props.get('declination_in_heading', False):
advo.props['declination_in_heading'] = True