TerraScan trajectory binary files
Imported trajectories are stored as binary files with TRJ extension. These files contain a header followed by a number of trajectory position records.
The structure of the file header is:
typedef struct {
char Recog[8] ; // TSCANTRJ
int Version ; // File version 20010715
int HdrSize ; // sizeof(TrajHdr)
int PosCnt ; // Number of position records
int PosSize ; // Size of position records
char Desc[78] ; // Description
BYTE SysIdv ; // System identifier (for lever arms)
BYTE Quality ; // Quality for whole trajectory (1-5)
double BegTime ; // First time stamp
double EndTime ; // Last time stamp
int OrigNbr ; // Original number (before any splitting)
int Number ; // Line number (in laser points)
char VrtVideo[400] ; // Vertical facing video
double VrtBeg ; // Start time of VrtVideo[]
double VrtEnd ; // End time of VrtVideo[]
char FwdVideo[400] ; // Forward facing video
double FwdBeg ; // Start time of FwdVideo[]
double FwdEnd ; // End time of FwdVideo[]
char WaveFile[400] ; // Waveform data file
char Group[16] ; // Group (session description)
} TrajHdr ;
The structure of the trajectory position records is:
typedef struct {
double Time ; // Time stamp
Dp3d Xyz ; // Position
double Head ; // Heading (degrees)
double Roll ; // Roll (degrees)
double Pitch ; // Pitch (degrees)
BYTE QtyXy ; // Quality for xy, 0=not set
BYTE QtyZ ; // Quality for z, 0=not set
BYTE QtyH ; // Quality for headingy, 0=not set
BYTE QtyRp ; // Quality for roll/pitch, 0=not set
short Mark ; // Run time flag
short Flag ; // Run time flag
} TrajPos ;
where Dp3d structure is:
typedef struct {
double x ;
double y ;
double z ;
} Dp3d ;
and where xy and z quality values translate to meters as:
QualityInMeters = pow(QtyXy,1.5) * 0.001 m
(1=0.0010m, 2=0.0028m, 3=0.0052m, 4=0.0080m,... 255=4.072m)
and where heading, and roll/pitch quality values translate to degrees as:
QualityInDegrees = pow(QtyH,1.5) * 0.0001 deg
(1=0.00010, 2=0.00028, 3=0.00052, 4=0.00080,... 255=0.4072 deg