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

adding spatial extension #150

Merged
merged 6 commits into from
Jun 1, 2022

Conversation

jacobagilbert
Copy link
Member

@jacobagilbert jacobagilbert commented Aug 16, 2021

#147 cannot be reopened so I am recreating this here...

This extension is intended to augment the antenna and multirecording extensions by providing a canonical system for managing phase coherent metadata for spatial RF and audio applications. Currently this is primarily focused on how to associate line-of-bearing information with annotations or reference datasets. We felt this was something that was of sufficient general utility that upstreaming was a good idea.

Due to complicated coordinate reference systems, this extension includes a figure; not sure how we feel about that....but it is quite helpful for keeping the interaction between the cartesian definition of the antenna array geometry and the spherical nature of bearing/direction data.

There is a complicated and very large trade space of how this could have been implemented, what was chosen is heavily biased toward real-world meaningful information as used in navigation, astronomy, mapping, etc, which is the primary reason why degrees were chosen for units and AZ/EL is used to contain this information as opposed to the mathematical representation of phi/theta.

If someone is aware of an appropriate ISO/RFC for the common definition of 'azimuth' and 'elevation' that would be good to know; a quick search resulted in mostly paywalled ISO specs (ISO 19101-1, 19111, and 6709 seem like they may but paywalled).

You can view the markdown file and image directly on my branch here:
https://github.com/jacobagilbert/SigMF/blob/add_spatial_ext/extensions/spatial.sigmf-ext.md

@jacobagilbert
Copy link
Member Author

Updated this as the first pass had multidimensional arrays which can be problematic for parsing (e.g.: in libsigmf). Also removed the obnoxious multi-type bearing object which is similarly problematic for parsing.

@jacobagilbert jacobagilbert force-pushed the add_spatial_ext branch 2 times, most recently from bd9c43a to adeafb5 Compare December 11, 2021 15:32
Jacob Gilbert added 2 commits March 19, 2022 15:45
Signed-off-by: Jacob Gilbert <[email protected]>
Added a couple catures fields to support in-band calibration and to
enable collection of coherent but uncalibrated data

Signed-off-by: Jacob Gilbert <[email protected]>
@jacobagilbert jacobagilbert changed the base branch from master to sigmf-v1.x March 19, 2022 21:45
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
|name|required|type|units|description|
|----|--------|----|-----|-----------|
|`num_elements`|true|int|N/A|Defines the number of phase centers / channels collected in the Collection or multichannel Dataset.|
|`channel_num`|true|int|N/A|The channel number, shares index with `element_geometry`.|
Copy link
Contributor

Choose a reason for hiding this comment

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

Now, this field would not apply to multi-channel .sigmf-data files, agreed? I suggest a JSON object in a collection be the one and only place that num_elements and channel_num be indicated.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now, this field would not apply to multi-channel .sigmf-data files, agreed?

yep, this doesn't make much sense for multichannel datasets.

Some place needs to map each file to aperture arrays though, and in our work we have found that contextual information is of significant value to the individual files, so this is included here.

multichannel datasets were sort of shoehorned in to this when they came into existence (they were never really a roadmapped feature, they just sort of came about). hrmm will need to think more. same issue with conditional requirement as-is.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have added clarification specifically for the case of multi-channel datasets. Even with multichannel datasets there is no guarantee that all of the data required for the spatial extension is contained in one file (e.g.: Two four channel radios that are synchronized and aligned with each other providing 4 phase-coherent channels in two separate 4 channel files), so this is only redundant in the specific (not recommended) case where all data is within one sigmf file.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you went the Collections-based approach in my previous comment, would the need for this be OBE and simplify the structure? Honest question.

Copy link
Member Author

@jacobagilbert jacobagilbert May 12, 2022

Choose a reason for hiding this comment

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

See my other response to the line above, the following excerpt holds true here as well I think.

ultimately I think that the cost of a single redundant field is negligible especially considering it contains contextually useful information even in a standalone sense.

extensions/spatial.sigmf-ext.md Show resolved Hide resolved
|name|required|type|description|
|----|--------|----|-----------|
|`signal_azimuth`|false|double|Azimuth in degrees east of north associated with the specific annotation.|
|`signal_bearing`|false|`bearing`|Bearing associated with the specific annotation.|
Copy link
Contributor

Choose a reason for hiding this comment

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

For the case of a collection, which of the num_elements .sigmf-meta files should signal_{azimuth, bearing} go in?? Please don't say "all of them" :-D

Surely this doesn't belong in the .sigmf-collection file ...

Some things are just so much easier in multi-channel recordings ...

Copy link
Member Author

Choose a reason for hiding this comment

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

this is left to implementation. in general when using this, we reduce the multichannel data to a separate sigmf-meta file (or no data file at all).

Copy link
Member Author

@jacobagilbert jacobagilbert left a comment

Choose a reason for hiding this comment

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

Thanks for the thorough review. Im going to think more about the redundancy that multichannel datasets create. I've never had them used with this but there is some convenience there that probably shouldn't be ignored.

extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
|name|required|type|description|
|----|--------|----|-----------|
|`signal_azimuth`|false|double|Azimuth in degrees east of north associated with the specific annotation.|
|`signal_bearing`|false|`bearing`|Bearing associated with the specific annotation.|
Copy link
Member Author

Choose a reason for hiding this comment

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

this is left to implementation. in general when using this, we reduce the multichannel data to a separate sigmf-meta file (or no data file at all).

extensions/spatial.sigmf-ext.md Show resolved Hide resolved
|name|required|type|units|description|
|----|--------|----|-----|-----------|
|`num_elements`|true|int|N/A|Defines the number of phase centers / channels collected in the Collection or multichannel Dataset.|
|`channel_num`|true|int|N/A|The channel number, shares index with `element_geometry`.|
Copy link
Member Author

Choose a reason for hiding this comment

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

Now, this field would not apply to multi-channel .sigmf-data files, agreed?

yep, this doesn't make much sense for multichannel datasets.

Some place needs to map each file to aperture arrays though, and in our work we have found that contextual information is of significant value to the individual files, so this is included here.

multichannel datasets were sort of shoehorned in to this when they came into existence (they were never really a roadmapped feature, they just sort of came about). hrmm will need to think more. same issue with conditional requirement as-is.

@jacobagilbert
Copy link
Member Author

I should also probably mention that this is a formerly private extension that has been in active, stable use for some time. The proposal being made in this PR is not really "lets discuss this on a conceptual level", but rather "is this of sufficient common value to the world to upstream". Some tweaks can possibly be supported, specifically for currently unused features (multichannel datasets for example), but breaking changes will not be made.

@gmabey
Copy link
Contributor

gmabey commented Apr 13, 2022

I should also probably mention that this is a formerly private extension that has been in active, stable use for some time. The proposal being made in this PR is not really "lets discuss this on a conceptual level", but rather "is this of sufficient common value to the world to upstream". Some tweaks can possibly be supported, specifically for currently unused features (multichannel datasets for example), but breaking changes will not be made.

Hmm -- unless 1) it forever remains a private extensions (which I think is allowed, although surely not what you were planning), 2) the public version of this which incorporates input from the community be a fork with a new name, or 3) a backwards-incompatible version 2.0 of the extension is the first one publicly released.

Again, all of these have significant drawbacks to your work, but they are hypothetically plausible, no?

Like, you did want feedback, right?

@gmabey
Copy link
Contributor

gmabey commented Apr 13, 2022

Hmm -- unless

Oops I now see that I did not read your comment nearly as carefully as I should have.

Let me say instead that I do feel that the extension is valuable, and hopefully will be eventually accepted as a standard extension.

@jacobagilbert
Copy link
Member Author

Yes, I do want feedback, and value what you provided. What will happen to that feedback is dependent on whether it breaks existing usage though, just want to be upfront about that.

I can certainly continue to keep and maintain this privately (as I do with other extensions), but figured I would put this forward since a number of people have brought up discussion about this over the past few years.

both multidimensional arrays and overloaded types (`bearing`) object are
obnoxious for parsing so these are removed. language surrounding
multichannel objects has also been updated.

Signed-off-by: Jacob Gilbert <[email protected]>
Copy link
Contributor

@bhilburn bhilburn left a comment

Choose a reason for hiding this comment

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

I love the direction of this and think it will be a super useful extension. Most of my comments are relatively minor, but one could be substantial - hopefully it's not too disruptive.

Also, the image is beautiful 👍🏼

extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
@jacobagilbert
Copy link
Member Author

jacobagilbert commented May 23, 2022

@gmabey @bhilburn how do you feel about the input I have provided here. A couple fields were tweaked, there is still some debate about how collections and multichannel datasets interact with this extension, but I think I have addressed that.

Copy link
Contributor

@bhilburn bhilburn left a comment

Choose a reason for hiding this comment

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

Two minor comments in this, pinging in Element chat for discussion re: element / channel indices. Pending resolution of that discussion, good to merge, IMO.

extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
Copy link
Contributor

@gmabey gmabey left a comment

Choose a reason for hiding this comment

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

I don't have any more comments/complaints

@jacobagilbert
Copy link
Member Author

I don't have any more comments/complaints

Ok, thanks for your input - the changes ended up being fairly subtle but you caught some important stuff with the collections vs multichannel datasets that would have made for awkward implementations.

@jacobagilbert jacobagilbert force-pushed the add_spatial_ext branch 2 times, most recently from dd2a785 to fee80a3 Compare May 23, 2022 17:37
Copy link
Contributor

@bhilburn bhilburn left a comment

Choose a reason for hiding this comment

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

Overall, I like the updated design, @jacobagilbert. I found a couple of small items that I think will be easy to fix and/or add. LGTM once those comments are addressed 👍🏼

extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Show resolved Hide resolved
extensions/spatial.sigmf-ext.md Outdated Show resolved Hide resolved
@jacobagilbert jacobagilbert force-pushed the add_spatial_ext branch 2 times, most recently from de7f240 to 32c620f Compare June 1, 2022 17:34
@jacobagilbert
Copy link
Member Author

All discussion resolved, long overdue... merging.

@jacobagilbert jacobagilbert merged commit 81b7e69 into sigmf:sigmf-v1.x Jun 1, 2022
gmabey pushed a commit to gmabey/SigMF that referenced this pull request Jun 3, 2022
adding spatial extension

Signed-off-by: Jacob Gilbert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants