Import RMS
Use the Database > Import > RMS menu option (RMS GX) to import RMS blocked-binary data into a Geosoft database.
Import RMS dialog options
RMS data file |
Input data file name. Script Parameter: RMS.DATA |
Import template file name (.I2 assumed). Script Parameter: RMS.TEMPLATE |
|
Optional line name (single line only) |
Optional Line name, blank for no line. Script Parameter: RMS.LINE |
Optional flight number |
Optional flight number. Script Parameter: RMS.FLIGHT |
Optional flight data (YYYY/MM/DD) |
Optional date. Script Parameter: RMS.DATE |
Application Notes
The RMS import uses the blocked binary file template (extension .I2). See IMPORTBB.I2 for a documented sample template.
RMS binary data has two formats:
1. Raw survey data
This data is a copy of the RMS data stored on tape. Tape data must be copied to a disk file before it can be read by the RMS import GX. Raw survey data is stored in a 'blocked' fashion in which each data block contains a number of data 'records' and is padded with blank bytes past the end of the last data record and up the end of a block.
2. Backup format data
Backup format data is similar to raw format except that each data block begins with a three byte prefix "RMS", and data blocks will not have extra bytes added after the last record in a block. The template example at the end of this document shows a sample RMS backup format template
------------------------------------------------------------------------
[file header] "FileHeader" bytes long
[data block] "BlockSize" bytes long
[data block]
etc... repeated any number of times
Each [data block] has the following structure:
[block header] "BlockHeader" bytes long
[data record] "RecordSize" bytes long
[data record]
etc... repeated "RecordsPerBlock" times
Each [data record] has the following structure:
[main record data] holds once-per-record data
[sub-record data] starts at "SubRecord start" offset in the
[data record].
[sub-record data] each sub-record holds "Subrecord length" bytes.
etc... repeated "SubRecord number" times
Data is extracted from the [main record data] and [sub-record data]
and placed in the database.
Comment lines may precede the template definition, which begins with
the line [IMPORT BINARY]. Lines that follow this contain keywords
and parameter settings as follows:
File structure:
Keyword Parameters Description
------- ---------- -----------
FileHeader bytes (optional) the number of bytes of header
information to skip at the start for the
file. If not specified, the first data
block is assumed to start at the begining
of the file.
BlockSize bytes (required) the number of bytes per block.
BlockHeader bytes (optional) the number of bytes of header
information to skip at the start for each
block. If not specified, the first data
record is assumed to start at the
begining of the block.
RecordSize bytes (required) the number of bytes in each
data record.
RecordsPerBlock number (required) the number of data records in
each block. Data records need not fill a
data block. Information past the end of
the last record in a block and befor the
end of the block is ignored.
Optional line data parameters:
LineNumber start,length,read_format,scale,base
(optional) location, size and format of
the line number in a [data record].
See "Data Parameters" below. If a line
already exists in the database, the version
number will be incremented until a unique
line is created.
Flight start,length,read_format,scale,base,dummy
(optional) location, size and format of
the flight number in a [data record].
See "Data Parameters" below.
Date start,length,read_format,scale,base,dummy
(optional) location, size and format of
the flight date in a [data record].
See "Data Parameters" below.
Followed by main channel definitions. This pair of lines is repeated
for each channel in the [main record data].
Data start,length,read_format,scale,base,dummy
(optional) location, size and format of
a data channel to be imported.
See "Data Parameters" below.
Chan name,type,channel_format,width,decimals
(required after each "Data" line)
the channel name and channel chracteristics
for the preceding "Data".
See "Channel Parameters" below.
Repeated sub-records. If the record contains more highly sampled
sub-records, this line identifies the start, length and number of
sub-records in the data record:
SubRecord start,length,number
start the offset of the start of the first sub-
record from the start of a record.
length the number of bytes in each sub-record.
number the number of sub-records.
Followed by sub-record channel definitions. This pair of lines is repeated
for each channel in the [sub-record data]. The format is identical to the
[main record data] definitions except that the start location of each data
item is with respect to the start of each sub-record.
Data start,length,read_format,scale,base,dummy
Chan name,type,channel_format,width,decimals
Data Parametrers required by each "Linenumber", "Flight", "Date" or
"Data" line:
start the byte offset of the data item relative to the start of
the [main data record] or each [sub-record data].
length the size of the item in bytes.
read_format the input data format:
NORMAL normally formatted number ("213", "-1.62") or
a literal ASCII string.
EXP exponentially formatted number (-1.62e+00)
TIME time "HH:MM:SS.ss"
TIME_1 time "HH.MMSSss"
TIME_2 time "HHMMSS"
DATE date "YYYY/MM/DD"
DATE_1 date "DD/MM/YY"
DATE_2 date "MM/DD/YY"
DATE_3 date "YYMM DD"
GEO geographic "DEG.MM.SS.ssss"
HEX hex
SHORT binary signed 16-bit integer (LSB first)
SHORTI same as SHORT, but bits inverted.
LONG binary signed 32-bit integer (LSB first)
LONGI same as LONG, but bits inverted
FLOAT binary 32-bit IEEE floating point (LSB first)
DOUBLE binary 64-bit IEEE floating point (LSB first)
scale a multiplying factor that is applied to the in-coming
numeric data before it is placed in a database channel.
The default is 1.
base a base value that is added to the data after applying
the scale. The default is 0.
dummy the value in the data that is used to indicate missing
Channel Parameters required by each "Chan" line:
name The name of a database channel in which to place the data.
If the channel does not already exist, it will be created
using the parameters that follow. Names may not begin
with any of the "0123456789+-*/%|" characters.
type the channel data type:
BYTE signed one-byte data.
SHORT signed 16-bit integer.
USHORT unsigned 16-bit integer.
LONG signed 32-bit integer.
FLOAT 32-bit floating point number.
DOUBLE 64-bit floating point number.
ASCII ASCII text of size "width".
channel_format format used to display channel elements:
NORMAL normally formatted number ("213", "-1.62").
EXP exponentially formatted number (-1.62e+00)
TIME time "HH:MM:SS.ss"
DATE date "YYYY/MM/DD"
GEO geographic "DEG.MM.SS.ssss"
width Width of the channel display field.
decimals Number of decimals to display.
========================================================================
The following example will read an RMS backup formatted binary file. The
data is structured as follows:
Name offset length format Description
--- ------ ------ ------ -----------
block prefix 0 3 ASCII "RmS" string starts each
RMS backup format file.
-----------------------------------------------------------------------
main data record 3 189 There are 20 records per
block. Each record
represents 1 second of data.
block number 0 8 ASCII RMS block number, which is
repeated in each data
record.
ile name 8 8 ASCII Formated "ABCmmddx", where
"mmdd" is the month and day,
and "x" is the flight number
day. We will use "mmddx"
as the flight number.
clock 16 19 ASCII "YYMM DD HH:MM:SS.ss"
ine number 35 5 ASCII
nav preamble 40 1 ASCII the letter "N".
GPS time 41 8 ASCII seconds
UTM X 49 10 ASCII
UTM Y 59 10 ASCII
------------------------------------------------------------------------
Sub-record 69 12 There will be 10 sub-records
containing mag and altimeter
data, which is sampled 10
times a second.
mag preamble 0 1 ASCII the letter "M"
mag data 1 8 ASCII
analogue preamble 9 1 ASCII the letter "A"
adar altimeter 10 2 SHORTI inverted bit 16-bit integer
scaled between -10.0 and
+9.999695. (scale factor
9.999695/32767 = 0.00030518)
------------------------------------------------------------------------
end of record 189 1 ASCII the character "*" is at
the end of each main record.
------------------------------------------------------------------------
Total record length: 190 bytes
Block size: 3803 bytes ( 3 + 20*190 )
Following is a template that will read the Time, X, Y, Mag and Altimeter
data from this file:
------------------------------------------------------------------------
IMPORT BINARY]
FILEHEADER 0 / no file header
BLOCKSIZE 3803 / 3 + 190*20
BLOCKHEADER 3 / "RmS" block preample
RECORDSIZE 190
RECORDSPERBLOCK 20
LINENUMBER 35,5,normal
FLIGHT 11,5,normal / the "mmddx" part of the flight name
DATE 16,7,date_3 / the "YYMM DD" part of the clock
DATA 24,11,TIME / the "HH:MM:SS.ss" part of the time
CHAN TIME,float,time,12,1
DATA 49,10,normal
CHAN X,double,normal,14,2
DATA 59,10,normal
CHAN Y,double,normal,14,2
SUBRECORD 69,12,10
DATA 1,8,normal
CHAN MAG,float,NORMAL,10,1
DATA 10,2,SHORTI,0.000305166
CHAN ALT,FLOAT
Setting the Projection
If the "Specify coordinate system on import" setting is set to "Yes" in the General Settings, and if no coordinate system is defined in the current X and Y channels, the "Georeference Database Channels" dialog is called so that the projection can be set on the X and Y.
Got a question? Visit the Seequent forums or Seequent support
© 2024 Seequent, The Bentley Subsurface Company
Privacy | Terms of Use