Skip to content

vdat_inspect() patch-vr2ar-vrl#22

Merged
mhpob merged 5 commits intomhpob:mainfrom
benjaminhlina:vdat_inspect-patch-vr2ar-vrl
Aug 25, 2025
Merged

vdat_inspect() patch-vr2ar-vrl#22
mhpob merged 5 commits intomhpob:mainfrom
benjaminhlina:vdat_inspect-patch-vr2ar-vrl

Conversation

@benjaminhlina
Copy link
Collaborator

@benjaminhlina benjaminhlina commented Aug 20, 2025

This fixes #18 by changing the order of sequences. Below is the new order of opperations.

  1. section_headers is created as the index location of each header in metadata
  2. metadata then has these section headers removed and this object is now called metadata_1 - if you don't like this name we can change this easily. I know you were hoping to probably not create more than a few objects in this but I'm unsure how to to do this without creating a new object and referring back to the original.
  3. section_headers are then created based on their index location from metadata at the length of metadata_1 using seq_along().
  4. After this point I have changed metadata to metadata_1 so it returns the proper object.

This clears tests for vdat_inspect() while there are other tests for other functions that do not clear but I am sure you're aware of those. Thank you for implementing wine. I can write up a workflow/vignette if you'd like on it and create another PR.

…ill use the section_headers index location created earlier from metadata and subset metadata based on those index locations then it will populate based on the seq_along(metadata_1) which is now the correct length as it has the section headers removed. This means that the number of section headers for each section matches the number of variables in each section
@benjaminhlina benjaminhlina requested a review from mhpob August 20, 2025 21:55
@benjaminhlina benjaminhlina changed the title Vdat inspect patch vr2ar vrl vdat_inspect() patch vr2ar vrl Aug 20, 2025
@benjaminhlina benjaminhlina changed the title vdat_inspect() patch vr2ar vrl vdat_inspect() patch-vr2ar vrl Aug 20, 2025
@benjaminhlina benjaminhlina changed the title vdat_inspect() patch-vr2ar vrl vdat_inspect() patch-vr2ar-vrl Aug 20, 2025
@mhpob mhpob self-assigned this Aug 22, 2025
@mhpob
Copy link
Owner

mhpob commented Aug 25, 2025

Thanks for taking a stab at this! The section headers were misaligned in the final output as the headers were identified based on the full metadata, but then findInterval was used on a subset. I made some changes to fix this.

I also noticed that in some other files, subheaders are designated by dashes (see below). I'm going to merge this now to make it work for some files and open a separate issue to address that.

==============================================================================
                                     VRL                                      
==============================================================================
File:      VR2AR_546310_20190613_1.vrl
Original:  VR2AR_546310_20190613_1.vrl
Container: VR2AR VRL file (com.vemco.file.vrl.0207.ff02.ff02/5.0.1)
Created:   2019-06-13T13:30:54
Data UUID: ffee6ee7-450a-db42-b54c-334b672fddf5
Rx Model:  VR2AR-69
Rx Serial: 546310

==============================================================================
                                    Device                                    
==============================================================================
69kHz Channel:
- Decoding Map:      MAP-113
- Blanking Interval: 260 ms

Block Types:
- ping_log.ulf [0005]
- eeprom.ulf [1000]
- app_info.ulf [1001]
- detection_log.ulf [1002]
- health_info.ulf [1003]
- identity_info.ulf [1004]

@mhpob mhpob merged commit 8ecd9e3 into mhpob:main Aug 25, 2025
1 of 7 checks passed
@benjaminhlina
Copy link
Collaborator Author

Thanks! I wasn't sure exactly how you'd want this solved but makes sense that they were misaligned considering I was trying to fix this using two different length objects. Having the indicies be pulled out right away makes a lot of sense and saved as their own object. Then just applying that to the original metadata with removing section headers at the very end of that call makes sense to me.

Yea I noticed that as well but wasn't sure how you wanted to handle that. I can take a look at it that issue more in depth. In the mean time I'm going to delete this branch.

@benjaminhlina benjaminhlina deleted the vdat_inspect-patch-vr2ar-vrl branch August 25, 2025 17:43
@mhpob
Copy link
Owner

mhpob commented Aug 25, 2025

Cross reference to above comment: #24

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.

vdat_inspect() does not parse data.frame correctly with vdat-12.9.1-20250203-976858-release

2 participants

Comments