Skip to contents

This function validates the attributes of a given SeaSondeRAPM object to ensure they meet the required specifications.

Usage

seasonder_validateAttributesSeaSondeRAPM(seasonde_apm_obj)

Arguments

seasonde_apm_obj

A SeaSondeRAPM object whose attributes are to be validated.

Value

TRUE if all attributes are valid. The function will stop execution and display an error message if any of the attributes are invalid.

Details

The function performs validation on the following attributes of the SeaSondeRAPM object:

  • quality_matrix

  • BEAR

  • Type

  • Creator

  • SiteName

  • SiteOrigin

  • FileName

  • CreateTimeStamp

  • ProcessingSteps

  • AmplitudeFactors

  • AntennaBearing

  • StationCode

  • BearingResolution

  • Smoothing

  • CommentLine

  • FileID

  • PhaseCorrections

It internally calls specific validation functions for each of these attributes. If any of the attributes are found to be invalid, the function will stop execution and display an error message.

Examples

# Create a test SeaSondeRAPM object by reading sample file
apm_file <- system.file("css_data/MeasPattern.txt", package = "SeaSondeR")
obj <- seasonder_readSeaSondeRAPMFile(apm_file)
#> seasonder_createSeaSondeRAPM:  APM object created successfully.
valid <- seasonder_validateAttributesSeaSondeRAPM(obj)