readV2: Read a CESMD V2 acceleration record (multi-channel V2 or...

View source: R/readV2.R

readV2R Documentation

Read a CESMD V2 acceleration record (multi-channel V2 or single-channel V2c).

Description

Two CESMD variants:

  • Multi-channel V2 (.v2): blocks marked ⁠^Corrected accelerogram⁠, ⁠8f10.6⁠ body, ends at next ⁠points of veloc data⁠. 1+ blocks.

  • Single-channel V2c (.V2c): line 1 = ⁠Corrected acceleration⁠, ⁠1E15.6⁠ body (1 col/row). Marker ⁠acceleration pts⁠ carries NPTS. samples/sec (last occurrence – DECIMATE > RESAMPLE) carries dt. Body ends at End-of-data or EOF. OCID from ⁠Sta Chan ...:⁠ line.

Usage

readV2(file)

Arguments

file

Path to the .v2 / .V2c file.

Value

LONG data.table(t, OCID, s).

Examples

file <- tempfile(fileext = ".V2c")
writeLines(c(
  "Corrected acceleration",
  "Sta Chan 1: HNZ",
  "100 samples/sec",
  "4 acceleration pts approx 0.04 secs",
  "1", "2", "3", "4",
  "End-of-data"
), file)
readV2(file)


gmsp documentation built on July 18, 2026, 5:07 p.m.