Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/revise sonar image comment #13

Conversation

amarburg
Copy link
Collaborator

Rewrote the SonarImage.msg comment for clarity.
I believe it's much clearer, though it's also much more verbose.

# acquisition cycle is defined by the sonar driver. It is taken to be
# a best estimate of the time when the sonar data is valid, which will
# the timing information available from the sonar hardware.
# The relationship between the header timestamp and the sonar data
Copy link

@lindzey lindzey Nov 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes it less clear.

There is no other place to "specify otherwise" -- this timestamp is what all downstream processing should use, and it will all assume that it is the time that the data is valid.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll take another crack it...

@lindzey
Copy link

lindzey commented Nov 23, 2021

I think that these suggested edits reveal a significant philosophical difference in how we think of this message =)

The re-written comment suggests that the message should support both 2D and 3D imaging sonars, which I disagree with. I think that the data from those instruments will need different processing approaches and thus aren't interchangeable. e.g. what are you going to do with the sonar viewer that subscribes to data that turns out to be 3D?

I think some of the confusion came in the elevation angles variable -- that wasn't meant to describe the elevation of multple fans in an array, but rather to describe the elevation of individual beams in the fan. This is necessary for some of the fancier multi-beam sonars that also include water column data.

@amarburg
Copy link
Collaborator Author

Maybe not a philosophical difference as much as mis-remembering the agreed on scope. I'll dial out the discussion of 2D sonars ...

Removed language on 2D sonars
Revised language on azimuth and elevation angles
Revised lanauge on header timestamp.
@amarburg
Copy link
Collaborator Author

Updated based on above comments...

#
# len(azimuth_angles) must equal len(elevation_angles)
#
# For each beam, the sonar collects a time sequence of acoustic returns.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to imply that the data is in TWTT, when we're assuming that the conversion has already been done. Instead, the SoS field is more of a FYI ...

# acquisition cycle is defined by the sonar driver. It is taken to be
# a best estimate of the time when the sonar data is valid, which will
# the timing information available from the sonar hardware.
# The relationship between the header timestamp is the best
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not thrilled with this -- though neither the old nor the new is grammatically correct =)

How about:
"""
The header timestamp gives the best estimate of the time for which the data is valid.

The exact relationship between timestamp and the sonar's data acquisition cycle is determined by the sonar driver.
"""

# ahead with positive to starboard or up, depending on the orientation
# of the sensor
# Azimuth for center of each beam in radians
# Unless otherwise specified, zero azimuth is assumed to
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like "unless otherwise specified" comments, because there's nowhere to programmatically specify additional info.

Zero azimuth will be along the sensor's X-axis, by definition, which is usually straight ahead from the sensor.

float32[] azimuth_angles

# Elevation for each "row" of beams in radians. If left empty, the
# source is assumed to be a 1D sonar with an elevation of { 0.0 }.
# Elevation for each "row" of beams in radians.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still have embedded 1D/2D assumptions here.

@lindzey
Copy link

lindzey commented Nov 23, 2021

@amarburg -- OK, done with the next pass =)

@amarburg
Copy link
Collaborator Author

@lindzey -- I gave it another pass...

@lauralindzey lauralindzey merged commit 8a053bd into apl-ocean-engineering:main Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants