MST_CONVERTSAMPLES - Online Linux Manual PageSection : 3
Updated : 2013/10/01
Source : Libmseed API

NAMEmst_convertsamples - Convert data samples between numeric types

SYNOPSIS#include <libmseed.h> int mst_convertsamples ( MSTrace *mst, char type, flag truncate); int mstl_convertsamples ( MSTraceSeg *seg, char type, flag truncate);

DESCRIPTION mst_convertsamples and mst_convertsamples convert any data samples associated with an MSTrace or MSTraceSeg to a specified \fitype\fP. The routines can convert between 32-bit integers (type i), 32-bit floats (type f) and 64-bit doubles (type d). When converting float and double sample types to integer type a simple rounding is applied by adding 0.5 to the sample value before converting (truncating) to integer. This compensates for common machine representations of floating point values (e.g. "40.0" represented by "39.99999999"). If the truncate flag is true data samples will be truncated to integers even if loss of sample precision is detected. If the truncate flag is false (0) and loss of precision is detected an error is returned. Loss of precision is determined by testing that the difference between the floating point value and the (truncated) integer value is greater than 0.000001. ASCII data samples (type a) cannot be converted, if supplied or requested an error will be returned.

RETURN VALUESmst_convertsamples and mstl_convertsamples return 0 on success and -1 on error.

SEE ALSOms_intro(3).

AUTHORChad Trabant IRIS Data Management Center
0
Johanes Gumabo
Data Size   :   5,690 byte
man-m___stl_convertsamples.3Build   :   2024-12-29, 07:25   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   5 / 256,917
Visitor ID   :     :  
Visitor IP   :   3.23.92.50   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_escape_sequence|91|m___stl_convertsamples.3|16|\fitype\fP. |specified \fitype\fP. )