MS_GENFACTMULT - Online Linux Manual PageSection : 3
Updated : 2016/10/07
Source : Libmseed API

NAMEms_genfactmult - Generate SEED sample rate factor and multiplier

SYNOPSIS#include <libmseed.h> int ms_genfactmult ( double samprate, int16_t *factor", int16_t *multiplier ); int ms_ratapprox ( double real, int *num, int *den", int maxval, double precision );

DESCRIPTIONms_genfactmult generates an appropriate SEED sample rate factor and multiplier pair from a double precision sample rate. If samprate is positive it is expected to represent a rate in samples/second, if negative is is expected to represent a period in seconds/sample. Non-integer sample rates and periods are supported between 32767.0 and 1/32767.0. An error will be returned for non-integer rates and periods outside this range. Integer sample rates and periods are supported between 1 and the maximum possible value (32767 * 32767). Values from 1 to 32767 are represented directly. Values larger than 32767 are factored and represented exactly when possible and approximated otherwise, with the discrepency becoming larger as the values reach the maximum possible value. The factor and multiplier are int16_t because that is the integer size needed for the fixed section of the SEED data header. ms_ratapprox finds an approximate rational number for a real through continued fraction expansion. Given a double precision real the routine tries to find a rational in numerator (num) and denominator (den) form whose absolute values are not larger than maxval while trying to reach a specified precision.

RETURN VALUESms_genfactmult returns 0 on success and -1 when value is outside of the supported range or error. ms_ratapprox returns the number of iterations performed.

AUTHORChad Trabant IRIS Data Management Center
0
Johanes Gumabo
Data Size   :   5,533 byte
man-ms_genfactmult.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 236,502
Visitor ID   :     :  
Visitor IP   :   3.145.61.142   :  
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.05
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.