Go-based FM stereo transmitter with RDS, Windows-first and cross-platform
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

357 line
22KB

  1. package rds
  2. import "math"
  3. // RDS encoder — port of PiFmRds, adapted for arbitrary sample rates.
  4. // At 228 kHz: uses exact {0,+1,0,-1} carrier (identical to PiFmRds).
  5. // At other rates: uses sin() carrier, with integer samples-per-bit when possible.
  6. // The biphase waveform from PiFmRds is resampled to the target rate.
  7. const (
  8. refRate = 228000.0 // PiFmRds native rate
  9. rdsBitRate = 1187.5
  10. refSPB = 192 // refRate / rdsBitRate
  11. bitsPerBlock = 26
  12. bitsPerGroup = 4 * bitsPerBlock
  13. refFilterSize = 576 // PiFmRds waveform length at 228k
  14. )
  15. const crcPoly = 0x1B9
  16. var offsetWords = map[byte]uint16{'A': 0x0FC, 'B': 0x198, 'C': 0x168, 'c': 0x350, 'D': 0x1B4}
  17. func crc10(data uint16) uint16 {
  18. var reg uint32 = uint32(data) << 10
  19. for i := 15; i >= 0; i-- {
  20. if reg&(1<<(uint(i)+10)) != 0 { reg ^= uint32(crcPoly) << uint(i) }
  21. }
  22. return uint16(reg & 0x3FF)
  23. }
  24. func encodeBlock(data uint16, offset byte) uint32 {
  25. return (uint32(data) << 10) | uint32(crc10(data)^offsetWords[offset])
  26. }
  27. func buildGroup0A(pi uint16, pty uint8, tp, ta bool, segIdx int, ps string) [4]uint16 {
  28. ps = normalizePS(ps); var bB uint16
  29. if tp { bB |= 1 << 10 }; bB |= uint16(pty&0x1F) << 5
  30. if ta { bB |= 1 << 4 }; bB |= 1 << 3; bB |= uint16(segIdx & 0x03)
  31. ci := segIdx * 2
  32. return [4]uint16{pi, bB, pi, (uint16(ps[ci]) << 8) | uint16(ps[ci+1])}
  33. }
  34. func buildGroup2A(pi uint16, pty uint8, tp bool, abFlag bool, segIdx int, rt string) [4]uint16 {
  35. rt = normalizeRT(rt); var bB uint16 = 2 << 12
  36. if tp { bB |= 1 << 10 }; bB |= uint16(pty&0x1F) << 5
  37. if abFlag { bB |= 1 << 4 }; bB |= uint16(segIdx & 0x0F)
  38. ci := segIdx * 4; c0, c1, c2, c3 := padRT(rt, ci)
  39. return [4]uint16{pi, bB, (uint16(c0) << 8) | uint16(c1), (uint16(c2) << 8) | uint16(c3)}
  40. }
  41. func padRT(rt string, off int) (byte, byte, byte, byte) {
  42. g := func(i int) byte { if i < len(rt) { return rt[i] }; return ' ' }
  43. return g(off), g(off+1), g(off+2), g(off+3)
  44. }
  45. type GroupScheduler struct { cfg RDSConfig; psIdx, rtIdx, phase int; rtABFlag bool }
  46. func newGroupScheduler(cfg RDSConfig) *GroupScheduler { return &GroupScheduler{cfg: cfg} }
  47. func (gs *GroupScheduler) NextGroup() [4]uint16 {
  48. if gs.phase < 4 {
  49. g := buildGroup0A(gs.cfg.PI, gs.cfg.PTY, gs.cfg.TP, gs.cfg.TA, gs.psIdx, gs.cfg.PS)
  50. gs.psIdx = (gs.psIdx + 1) % 4; gs.phase++; return g
  51. }
  52. g := buildGroup2A(gs.cfg.PI, gs.cfg.PTY, gs.cfg.TP, gs.rtABFlag, gs.rtIdx, gs.cfg.RT)
  53. gs.rtIdx++; rtSegs := rtSegmentCount(gs.cfg.RT)
  54. if gs.rtIdx >= rtSegs { gs.rtIdx = 0; gs.rtABFlag = !gs.rtABFlag }
  55. gs.phase++; if gs.phase >= 4+rtSegs { gs.phase = 0 }; return g
  56. }
  57. func rtSegmentCount(rt string) int {
  58. rt = normalizeRT(rt); n := (len(rt)+3)/4
  59. if n == 0 { n = 1 }; if n > 16 { n = 16 }; return n
  60. }
  61. // Encoder generates RDS subcarrier samples at any sample rate.
  62. // Uses the PiFmRds waveform resampled to the target rate.
  63. type Encoder struct {
  64. config RDSConfig
  65. scheduler *GroupScheduler
  66. sampleRate float64
  67. spb int // samples per bit at target rate
  68. waveform []float64 // resampled PiFmRds waveform
  69. wfLen int // length of resampled waveform
  70. ring []float64 // overlap-add ring buffer
  71. ringSize int
  72. bitBuffer [bitsPerGroup]int
  73. bitPos int
  74. prevOutput int
  75. curOutput int
  76. sampleCount int
  77. inSampleIdx int
  78. outSampleIdx int
  79. carrierPhase float64 // for sin() carrier at non-228k rates
  80. carrierStep float64
  81. SampleRate float64
  82. }
  83. func NewEncoder(cfg RDSConfig) (*Encoder, error) {
  84. if cfg.SampleRate <= 0 { cfg.SampleRate = refRate }
  85. cfg.PS = normalizePS(cfg.PS); cfg.RT = normalizeRT(cfg.RT)
  86. rate := cfg.SampleRate
  87. spb := int(math.Round(rate / rdsBitRate))
  88. ratio := rate / refRate
  89. // Resample PiFmRds waveform to target rate
  90. wfLen := int(math.Round(float64(refFilterSize) * ratio))
  91. waveform := make([]float64, wfLen)
  92. for i := range waveform {
  93. srcPos := float64(i) / ratio
  94. idx := int(srcPos)
  95. frac := srcPos - float64(idx)
  96. if idx+1 < refFilterSize {
  97. waveform[i] = refWaveform[idx]*(1-frac) + refWaveform[idx+1]*frac
  98. } else if idx < refFilterSize {
  99. waveform[i] = refWaveform[idx]
  100. }
  101. }
  102. ringSize := spb + wfLen
  103. enc := &Encoder{
  104. config: cfg,
  105. scheduler: newGroupScheduler(cfg),
  106. sampleRate: rate,
  107. spb: spb,
  108. waveform: waveform,
  109. wfLen: wfLen,
  110. ring: make([]float64, ringSize),
  111. ringSize: ringSize,
  112. bitPos: bitsPerGroup,
  113. sampleCount: spb,
  114. outSampleIdx: ringSize - 1,
  115. carrierStep: 57000.0 / rate,
  116. SampleRate: rate,
  117. }
  118. return enc, nil
  119. }
  120. func (e *Encoder) Reset() {
  121. e.scheduler = newGroupScheduler(e.config)
  122. e.bitPos = bitsPerGroup; e.sampleCount = e.spb
  123. e.prevOutput = 0; e.curOutput = 0
  124. e.inSampleIdx = 0; e.outSampleIdx = e.ringSize - 1
  125. e.carrierPhase = 0
  126. for i := range e.ring { e.ring[i] = 0 }
  127. }
  128. // NextSample returns the next RDS subcarrier sample at the configured rate.
  129. func (e *Encoder) NextSample() float64 {
  130. if e.sampleCount >= e.spb {
  131. if e.bitPos >= bitsPerGroup {
  132. e.getRDSGroup()
  133. e.bitPos = 0
  134. }
  135. // Differential encoding (PiFmRds-exact)
  136. curBit := e.bitBuffer[e.bitPos]
  137. e.prevOutput = e.curOutput
  138. e.curOutput = e.prevOutput ^ curBit
  139. inverting := (e.curOutput == 1)
  140. // Overlap-add waveform
  141. idx := e.inSampleIdx
  142. for j := 0; j < e.wfLen; j++ {
  143. val := e.waveform[j]
  144. if inverting { val = -val }
  145. e.ring[idx] += val
  146. idx++; if idx >= e.ringSize { idx = 0 }
  147. }
  148. e.inSampleIdx += e.spb
  149. if e.inSampleIdx >= e.ringSize { e.inSampleIdx -= e.ringSize }
  150. e.bitPos++
  151. e.sampleCount = 0
  152. }
  153. // Read envelope from ring buffer
  154. envelope := e.ring[e.outSampleIdx]
  155. e.ring[e.outSampleIdx] = 0
  156. e.outSampleIdx++; if e.outSampleIdx >= e.ringSize { e.outSampleIdx = 0 }
  157. // 57 kHz carrier
  158. carrier := math.Sin(2 * math.Pi * e.carrierPhase)
  159. e.carrierPhase += e.carrierStep
  160. if e.carrierPhase >= 1.0 { e.carrierPhase -= 1.0 }
  161. e.sampleCount++
  162. return envelope * carrier
  163. }
  164. // NextSample228k is an alias for backward compat
  165. func (e *Encoder) NextSample228k() float64 { return e.NextSample() }
  166. func (e *Encoder) Generate(n int) []float64 {
  167. out := make([]float64, n); for i := range out { out[i] = e.NextSample() }; return out
  168. }
  169. func (e *Encoder) Symbol() float64 {
  170. if e.bitPos >= bitsPerGroup { return -1 }
  171. sym := 1.0; if e.bitBuffer[e.bitPos] == 0 { sym = -1.0 }
  172. e.sampleCount++
  173. if e.sampleCount >= e.spb { e.sampleCount = 0; e.bitPos++
  174. if e.bitPos >= bitsPerGroup { e.getRDSGroup(); e.bitPos = 0 }
  175. }; return sym
  176. }
  177. func (e *Encoder) getRDSGroup() {
  178. group := e.scheduler.NextGroup(); pos := 0
  179. for blk, off := range [4]byte{'A', 'B', 'C', 'D'} {
  180. encoded := encodeBlock(group[blk], off)
  181. for bit := bitsPerBlock - 1; bit >= 0; bit-- {
  182. e.bitBuffer[pos] = int((encoded >> uint(bit)) & 1); pos++
  183. }
  184. }
  185. }
  186. // refWaveform — exact PiFmRds waveform_biphase (576 samples at 228 kHz)
  187. var refWaveform = [576]float64{
  188. 2.532651330219518743e-03, 2.555044910373570170e-03, 2.566671021257086772e-03, 2.567238549701184643e-03,
  189. 2.556496746672830885e-03, 2.534237165729987841e-03, 2.500295472534516759e-03, 2.454553115509106563e-03,
  190. 2.396938848057333059e-03, 2.327430093141364103e-03, 2.246054141429317842e-03, 2.152889174683249481e-03,
  191. 2.048065106558019741e-03, 1.931764233519830953e-03, 1.804221689169753116e-03, 1.665725695871127275e-03,
  192. 1.516617608227482320e-03, 1.357291743639731877e-03, 1.188194995883951532e-03, 1.009826228393920439e-03,
  193. 8.227354447016149448e-04, 6.275227342843667493e-04, 4.248369928834821877e-04, 2.153744171968115500e-04,
  194. -1.232252981576898894e-07, -2.208705497650993482e-04, -4.460407281680368592e-04, -6.747678807736505729e-04,
  195. -9.061496807071534867e-04, -1.139250166374730904e-03, -1.373102755669571148e-03, -1.606713454985107814e-03,
  196. -1.839064255174424622e-03, -2.069116705719896768e-03, -2.295815657515722953e-03, -2.518093163822523149e-03,
  197. -2.734872528130168675e-03, -2.945072486864876073e-03, -3.147611514104867864e-03, -3.341412234726898710e-03,
  198. -3.525405931697330516e-03, -3.698537132549940647e-03, -3.859768259460998226e-03, -4.008084326742814528e-03,
  199. -4.142497669033530158e-03, -4.262052682966127777e-03, -4.365830564655405997e-03, -4.452954024951411884e-03,
  200. -4.522591964073326663e-03, -4.573964086961633882e-03, -4.606345440470235343e-03, -4.619070853366329284e-03,
  201. -4.611539260015793187e-03, -4.583217888607013166e-03, -4.533646294807957243e-03, -4.462440221861094410e-03,
  202. -4.369295268298792508e-03, -4.253990344709691375e-03, -4.116390901303888447e-03, -3.956451908412099601e-03,
  203. -3.774220572511344761e-03, -3.569838770897127041e-03, -3.343545188717922216e-03, -3.095677142753055708e-03,
  204. -2.826672077047463587e-03, -2.537068716315400187e-03, -2.227507863888385838e-03, -1.898732831910291503e-03,
  205. -1.551589492469313079e-03, -1.187025939403796478e-03, -8.060917516227311674e-04, -4.099368499382796552e-04,
  206. 1.900593832358028364e-07, 4.229434598897815903e-04, 8.568834232677739271e-04, 1.300478433616307234e-03,
  207. 1.752108639186909398e-03, 2.210069531690153112e-03, 2.672576051828062533e-03, 3.137767118244720512e-03,
  208. 3.603710575596331869e-03, 4.068408555938784511e-03, 4.529803246113349099e-03, 4.985783052286746689e-03,
  209. 5.434189151275972511e-03, 5.872822416766181226e-03, 6.299450707012693891e-03, 6.711816499117106809e-03,
  210. 7.107644853482626354e-03, 7.484651690592414135e-03, 7.840552360821295350e-03, 8.173070486592225875e-03,
  211. 8.479947054827158270e-03, 8.758949736324453048e-03, 9.007882407426009638e-03, 9.224594848121719579e-03,
  212. 9.406992589581098657e-03, 9.553046883008396370e-03, 9.660804760689966145e-03, 9.728399159148424027e-03,
  213. 9.754059073439845171e-03, 9.736119710831808022e-03, 9.673032611387005070e-03, 9.563375702351037400e-03,
  214. 9.405863252709357331e-03, 9.199355693838612638e-03, 8.942869271836061465e-03, 8.635585496870153838e-03,
  215. 8.276860354756325477e-03, 7.866233245929400361e-03, 7.403435617058454557e-03, 6.888399250731210011e-03,
  216. 6.321264178928198696e-03, 5.702386186409919011e-03, 5.032343870653735625e-03, 4.311945225603512621e-03,
  217. 3.542233717233159249e-03, 2.724493819771388933e-03, 1.860255982396226328e-03, 9.513009972738021430e-04,
  218. -3.362590087872507610e-07, -9.923637372837323424e-04, -2.022229806201048148e-03, -3.087121544982383836e-03,
  219. -4.183963760744797630e-03, -5.309418750929982035e-03, -6.459886829603163697e-03, -7.631507634530486361e-03,
  220. -8.820162230001177273e-03, -1.002147601834123269e-02, -1.123082247097366773e-02, -1.244332768771695338e-02,
  221. -1.365387579078745396e-02, -1.485711515769077770e-02, -1.604746549484995649e-02, -1.721912575143924595e-02,
  222. -1.836608287047301891e-02, -1.948212137174597930e-02, -2.056083375874448449e-02, -2.159563173915068912e-02,
  223. -2.257975824605283968e-02, -2.350630024446240945e-02, -2.436820230522675906e-02, -2.515828092592677437e-02,
  224. -2.586923957586502801e-02, -2.649368443979239693e-02, -2.702414083259563338e-02, -2.745307025478293042e-02,
  225. -2.777288805626721910e-02, -2.797598167366384739e-02, -2.805472940409954943e-02, -2.800151967637884431e-02,
  226. -2.780877077828078359e-02, -2.746895099676937430e-02, -2.697459912600155829e-02, -2.631834529621684959e-02,
  227. -2.549293207489373297e-02, -2.449123578997222314e-02, -2.330628802347053594e-02, -2.193129722247495056e-02,
  228. -2.035967037326144244e-02, -1.858503468321714980e-02, -1.660125921427981280e-02, -1.440247641080375819e-02,
  229. -1.198310346409471074e-02, -9.337863455345842695e-03, -6.461806218342813941e-03, -3.350328863101498331e-03,
  230. 8.040984433930472399e-07, 3.595441083468180719e-03, 7.437024284502863521e-03, 1.152857108893870150e-02,
  231. 1.587265612925233688e-02, 2.047139402062919666e-02, 2.532642284173815955e-02, 3.043888841331177791e-02,
  232. 3.580942942793266526e-02, 4.143816348300550373e-02, 4.732467406731786369e-02, 5.346799854986208217e-02,
  233. 5.986661721770201311e-02, 6.651844340763700403e-02, 7.342081477423043068e-02, 8.057048573445227402e-02,
  234. 8.796362112672609368e-02, 9.559579111958180220e-02, 1.034619674024025021e-01, 1.115565206879204074e-01,
  235. 1.198732195531727329e-01, 1.284052306425759737e-01, 1.371451202536290992e-01, 1.460848573225170255e-01,
  236. 1.552158178235605868e-01, 1.645287905930657713e-01, 1.740139845846588318e-01, 1.836610375596755829e-01,
  237. 1.934590262126028026e-01, 2.033964777279658187e-01, 2.134613827614141035e-01, 2.236412098341045707e-01,
  238. 2.339229211258132823e-01, 2.442929896485369901e-01, 2.547374177786905780e-01, 2.652417571223665282e-01,
  239. 2.757911296845135252e-01, 2.863702503093192853e-01, 2.969634503555686478e-01, 3.075547025672780710e-01,
  240. 3.181276470965210823e-01, 3.286656186320493500e-01, 3.391516745840755798e-01, 3.495686242724773130e-01,
  241. 3.598990590626389707e-01, 3.701253833902611312e-01, 3.802298466136770361e-01, 3.901945756295767120e-01,
  242. 4.000016081911345056e-01, 4.096329268202659746e-01, 4.190704933607786176e-01, 4.282962839026540069e-01,
  243. 4.372923241989370990e-01, 4.460407253805190875e-01, 4.545237199298762798e-01, 4.627236978285061975e-01,
  244. 4.706232427973597865e-01, 4.782051685485750880e-01, 4.854525549661181105e-01, 4.923487841323866965e-01,
  245. 4.988775761175122669e-01, 5.050230244479789743e-01, 5.107696311712632831e-01, 5.161023414335079718e-01,
  246. 5.210065774877549183e-01, 5.254682720509856741e-01, 5.294739009291574705e-01, 5.330105148305670504e-01,
  247. 5.360657702892279719e-01, 5.386279596215074461e-01, 5.406860398410284763e-01, 5.422296604588032753e-01,
  248. 5.432491900977250987e-01, 5.437357418528805386e-01, 5.436811973316860724e-01, 5.430782293105560488e-01,
  249. 5.419203229476984296e-01, 5.402017954946758405e-01, 5.379178144525937899e-01, 5.350644141221254646e-01,
  250. 5.316385105000952516e-01, 5.276379144789866693e-01, 5.230613433094983833e-01, 5.179084302901690862e-01,
  251. 5.121797326520726168e-01, 5.058767376106826363e-01, 4.990018665611814508e-01, 4.915584773977406674e-01,
  252. 4.835508649416218607e-01, 4.749842594673260865e-01, 4.658648233204350508e-01, 4.561996456252422338e-01,
  253. 4.459967350847497403e-01, 4.352650108800791839e-01, 4.240142916808554152e-01, 4.122552827825399224e-01,
  254. 3.999995613968218566e-01, 3.872595600805870397e-01, 3.740485484506272384e-01, 3.603806130210642222e-01,
  255. 3.462706353977916263e-01, 3.317342687539049928e-01, 3.167879126713797899e-01, 3.014486863933045213e-01,
  256. 2.857344005404113818e-01, 2.696635273493745433e-01, 2.532551694939167986e-01, 2.365290275532226649e-01,
  257. 2.195053661954201318e-01, 2.022049791470396651e-01, 1.846491530223047517e-01, 1.668596300888892936e-01,
  258. 1.488585700493792463e-01, 1.306685109200720063e-01, 1.123123290909592703e-01, 9.381319865274144465e-02,
  259. 7.519455007851447159e-02, 5.648002834935082067e-02, 3.769345061436135680e-02, 1.885876347696378158e-02,
  260. 0.000000000000000000e+00, -1.885876347696378158e-02, -3.769345061436135680e-02, -5.648002834935082067e-02,
  261. -7.519455007851447159e-02, -9.381319865274144465e-02, -1.123123290909592703e-01, -1.306685109200720063e-01,
  262. -1.488585700493792463e-01, -1.668596300888892936e-01, -1.846491530223047517e-01, -2.022049791470396651e-01,
  263. -2.195053661954201318e-01, -2.365290275532226649e-01, -2.532551694939167986e-01, -2.696635273493745433e-01,
  264. -2.857344005404113818e-01, -3.014486863933045213e-01, -3.167879126713797899e-01, -3.317342687539049928e-01,
  265. -3.462706353977916263e-01, -3.603806130210642222e-01, -3.740485484506272384e-01, -3.872595600805870397e-01,
  266. -3.999995613968218566e-01, -4.122552827825399224e-01, -4.240142916808554152e-01, -4.352650108800791839e-01,
  267. -4.459967350847497403e-01, -4.561996456252422338e-01, -4.658648233204350508e-01, -4.749842594673260865e-01,
  268. -4.835508649416218607e-01, -4.915584773977406674e-01, -4.990018665611814508e-01, -5.058767376106826363e-01,
  269. -5.121797326520726168e-01, -5.179084302901690862e-01, -5.230613433094983833e-01, -5.276379144789866693e-01,
  270. -5.316385105000952516e-01, -5.350644141221254646e-01, -5.379178144525937899e-01, -5.402017954946758405e-01,
  271. -5.419203229476984296e-01, -5.430782293105560488e-01, -5.436811973316860724e-01, -5.437357418528805386e-01,
  272. -5.432491900977250987e-01, -5.422296604588032753e-01, -5.406860398410284763e-01, -5.386279596215074461e-01,
  273. -5.360657702892279719e-01, -5.330105148305670504e-01, -5.294739009291574705e-01, -5.254682720509856741e-01,
  274. -5.210065774877549183e-01, -5.161023414335079718e-01, -5.107696311712632831e-01, -5.050230244479789743e-01,
  275. -4.988775761175122669e-01, -4.923487841323866965e-01, -4.854525549661181105e-01, -4.782051685485750880e-01,
  276. -4.706232427973597865e-01, -4.627236978285061975e-01, -4.545237199298762798e-01, -4.460407253805190875e-01,
  277. -4.372923241989370990e-01, -4.282962839026540069e-01, -4.190704933607786176e-01, -4.096329268202659746e-01,
  278. -4.000016081911345056e-01, -3.901945756295767120e-01, -3.802298466136770361e-01, -3.701253833902611312e-01,
  279. -3.598990590626389707e-01, -3.495686242724773130e-01, -3.391516745840755798e-01, -3.286656186320493500e-01,
  280. -3.181276470965210823e-01, -3.075547025672780710e-01, -2.969634503555686478e-01, -2.863702503093192853e-01,
  281. -2.757911296845135252e-01, -2.652417571223665282e-01, -2.547374177786905780e-01, -2.442929896485369901e-01,
  282. -2.339229211258132823e-01, -2.236412098341045707e-01, -2.134613827614141035e-01, -2.033964777279658187e-01,
  283. -1.934590262126028026e-01, -1.836610375596755829e-01, -1.740139845846588318e-01, -1.645287905930657713e-01,
  284. -1.552158178235605868e-01, -1.460848573225170255e-01, -1.371451202536290992e-01, -1.284052306425759737e-01,
  285. -1.198732195531727329e-01, -1.115565206879204074e-01, -1.034619674024025021e-01, -9.559579111958180220e-02,
  286. -8.796362112672609368e-02, -8.057048573445227402e-02, -7.342081477423043068e-02, -6.651844340763700403e-02,
  287. -5.986661721770201311e-02, -5.346799854986208217e-02, -4.732467406731786369e-02, -4.143816348300550373e-02,
  288. -3.580942942793266526e-02, -3.043888841331177791e-02, -2.532642284173815955e-02, -2.047139402062919666e-02,
  289. -1.587265612925233688e-02, -1.152857108893870150e-02, -7.437024284502863521e-03, -3.595441083468180719e-03,
  290. -8.040984433930472399e-07, 3.350328863101498331e-03, 6.461806218342813941e-03, 9.337863455345842695e-03,
  291. 1.198310346409471074e-02, 1.440247641080375819e-02, 1.660125921427981280e-02, 1.858503468321714980e-02,
  292. 2.035967037326144244e-02, 2.193129722247495056e-02, 2.330628802347053594e-02, 2.449123578997222314e-02,
  293. 2.549293207489373297e-02, 2.631834529621684959e-02, 2.697459912600155829e-02, 2.746895099676937430e-02,
  294. 2.780877077828078359e-02, 2.800151967637884431e-02, 2.805472940409954943e-02, 2.797598167366384739e-02,
  295. 2.777288805626721910e-02, 2.745307025478293042e-02, 2.702414083259563338e-02, 2.649368443979239693e-02,
  296. 2.586923957586502801e-02, 2.515828092592677437e-02, 2.436820230522675906e-02, 2.350630024446240945e-02,
  297. 2.257975824605283968e-02, 2.159563173915068912e-02, 2.056083375874448449e-02, 1.948212137174597930e-02,
  298. 1.836608287047301891e-02, 1.721912575143924595e-02, 1.604746549484995649e-02, 1.485711515769077770e-02,
  299. 1.365387579078745396e-02, 1.244332768771695338e-02, 1.123082247097366773e-02, 1.002147601834123269e-02,
  300. 8.820162230001177273e-03, 7.631507634530486361e-03, 6.459886829603163697e-03, 5.309418750929982035e-03,
  301. 4.183963760744797630e-03, 3.087121544982383836e-03, 2.022229806201048148e-03, 9.923637372837323424e-04,
  302. 3.362590087872507610e-07, -9.513009972738021430e-04, -1.860255982396226328e-03, -2.724493819771388933e-03,
  303. -3.542233717233159249e-03, -4.311945225603512621e-03, -5.032343870653735625e-03, -5.702386186409919011e-03,
  304. -6.321264178928198696e-03, -6.888399250731210011e-03, -7.403435617058454557e-03, -7.866233245929400361e-03,
  305. -8.276860354756325477e-03, -8.635585496870153838e-03, -8.942869271836061465e-03, -9.199355693838612638e-03,
  306. -9.405863252709357331e-03, -9.563375702351037400e-03, -9.673032611387005070e-03, -9.736119710831808022e-03,
  307. -9.754059073439845171e-03, -9.728399159148424027e-03, -9.660804760689966145e-03, -9.553046883008396370e-03,
  308. -9.406992589581098657e-03, -9.224594848121719579e-03, -9.007882407426009638e-03, -8.758949736324453048e-03,
  309. -8.479947054827158270e-03, -8.173070486592225875e-03, -7.840552360821295350e-03, -7.484651690592414135e-03,
  310. -7.107644853482626354e-03, -6.711816499117106809e-03, -6.299450707012693891e-03, -5.872822416766181226e-03,
  311. -5.434189151275972511e-03, -4.985783052286746689e-03, -4.529803246113349099e-03, -4.068408555938784511e-03,
  312. -3.603710575596331869e-03, -3.137767118244720512e-03, -2.672576051828062533e-03, -2.210069531690153112e-03,
  313. -1.752108639186909398e-03, -1.300478433616307234e-03, -8.568834232677739271e-04, -4.229434598897815903e-04,
  314. -1.900593832358028364e-07, 4.099368499382796552e-04, 8.060917516227311674e-04, 1.187025939403796478e-03,
  315. 1.551589492469313079e-03, 1.898732831910291503e-03, 2.227507863888385838e-03, 2.537068716315400187e-03,
  316. 2.826672077047463587e-03, 3.095677142753055708e-03, 3.343545188717922216e-03, 3.569838770897127041e-03,
  317. 3.774220572511344761e-03, 3.956451908412099601e-03, 4.116390901303888447e-03, 4.253990344709691375e-03,
  318. 4.369295268298792508e-03, 4.462440221861094410e-03, 4.533646294807957243e-03, 4.583217888607013166e-03,
  319. 4.611539260015793187e-03, 4.619070853366329284e-03, 4.606345440470235343e-03, 4.573964086961633882e-03,
  320. 4.522591964073326663e-03, 4.452954024951411884e-03, 4.365830564655405997e-03, 4.262052682966127777e-03,
  321. 4.142497669033530158e-03, 4.008084326742814528e-03, 3.859768259460998226e-03, 3.698537132549940647e-03,
  322. 3.525405931697330516e-03, 3.341412234726898710e-03, 3.147611514104867864e-03, 2.945072486864876073e-03,
  323. 2.734872528130168675e-03, 2.518093163822523149e-03, 2.295815657515722953e-03, 2.069116705719896768e-03,
  324. 1.839064255174424622e-03, 1.606713454985107814e-03, 1.373102755669571148e-03, 1.139250166374730904e-03,
  325. 9.061496807071534867e-04, 6.747678807736505729e-04, 4.460407281680368592e-04, 2.208705497650993482e-04,
  326. 1.232252981576898894e-07, -2.153744171968115500e-04, -4.248369928834821877e-04, -6.275227342843667493e-04,
  327. -8.227354447016149448e-04, -1.009826228393920439e-03, -1.188194995883951532e-03, -1.357291743639731877e-03,
  328. -1.516617608227482320e-03, -1.665725695871127275e-03, -1.804221689169753116e-03, -1.931764233519830953e-03,
  329. -2.048065106558019741e-03, -2.152889174683249481e-03, -2.246054141429317842e-03, -2.327430093141364103e-03,
  330. -2.396938848057333059e-03, -2.454553115509106563e-03, -2.500295472534516759e-03, -2.534237165729987841e-03,
  331. -2.556496746672830885e-03, -2.567238549701184643e-03, -2.566671021257086772e-03, -2.555044910373570170e-03,
  332. }