Skip to content

Commit 9e135fe

Browse files
author
chad-iris
committed
Fix packing with high samples rates. Mark as 2.18 release
1 parent 53f71ed commit 9e135fe

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2016.286: 2.18
2+
- Remove limitation on sample rate before calling ms_genfactmult()
3+
in the normal path of packing records. Previously generating the
4+
factor and multiplier was not attempted for rates higher than
5+
32,767.
6+
17
2016.281: 2.18rc4
28
- ms_genfactmult() now support a much larger range of integer
39
sample rates and periods.

libmseed.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ extern "C" {
3232

3333
#include "lmplatform.h"
3434

35-
#define LIBMSEED_VERSION "2.18rc4"
36-
#define LIBMSEED_RELEASE "2016.281"
35+
#define LIBMSEED_VERSION "2.18"
36+
#define LIBMSEED_RELEASE "2016.286"
3737

3838
#define MINRECLEN 128 /* Minimum Mini-SEED record length, 2^7 bytes */
3939
/* Note: the SEED specification minimum is 256 */

msrutils.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* ORFEUS/EC-Project MEREDIAN
88
* IRIS Data Management Center
99
*
10-
* modified: 2015.213
10+
* modified: 2016.286
1111
***************************************************************************/
1212

1313
#include <stdio.h>
@@ -287,17 +287,13 @@ msr_normalize_header (MSRecord *msr, flag verbose)
287287
ms_strncpopen (msr->fsdh->channel, msr->channel, 3);
288288
ms_hptime2btime (hptimems, &(msr->fsdh->start_time));
289289

290-
/* When the sampling rate is <= 32767 Hertz determine the factor
291-
* and multipler through rational approximation. For higher rates
292-
* set the factor and multiplier to 0. */
293-
if (msr->samprate <= 32767.0)
294-
{
295-
ms_genfactmult (msr->samprate, &(msr->fsdh->samprate_fact), &(msr->fsdh->samprate_mult));
296-
}
297-
else
290+
/* Determine the factor and multipler for sample rate */
291+
if (ms_genfactmult (msr->samprate,
292+
&(msr->fsdh->samprate_fact),
293+
&(msr->fsdh->samprate_mult)))
298294
{
299295
if (verbose > 1)
300-
ms_log (1, "Sampling rate too high to approximate factor & multiplier: %g\n",
296+
ms_log (1, "Sampling rate out of range, cannot generate factor & multiplier: %g\n",
301297
msr->samprate);
302298
msr->fsdh->samprate_fact = 0;
303299
msr->fsdh->samprate_mult = 0;
@@ -311,7 +307,7 @@ msr_normalize_header (MSRecord *msr, flag verbose)
311307
msr->fsdh->blockette_offset = 0;
312308
}
313309

314-
/* Traverse blockette chain and perform necessary updates*/
310+
/* Traverse blockette chain and perform necessary updates */
315311
cur_blkt = msr->blkts;
316312

317313
if (cur_blkt && verbose > 2)

0 commit comments

Comments
 (0)