Creates a generator polynomial for a Reed-Solomon coding with message
length of k and codelength of n. n must be greater
than k and their difference must be even. The generator polynomial
is returned on g as a polynomial over the Galois Field GF(2^m)
where n is equal to 2^m-1
. If m is not integer
the next highest integer value is used and a generator for a shorten
Reed-Solomon code is returned.
The elements of g represent the coefficients of the polynomial in descending order. If the length of g is lg, then the generator polynomial is given by
g(0) * x^(lg-1) + g(1) * x^(lg-2) + ... + g(lg-1) * x + g(lg).
If p is defined then it is used as the primitive polynomial of the Galois Field GF(2^m). The default primitive polynomial will be used if p is equal to [].
The variables b and s determine the form of the generator polynomial in the following manner.
g = (x - A^(b*s)) * (x - A^((b+1)*s)) * ... * (x - A^((b+2*t-1)*s)).
where t is (n-k)/2
, and A is the primitive element
of the Galois Field. Therefore b is the first consecutive root of the
generator polynomial and s is the primitive element to generate the
polynomial roots.
If requested the variable t, which gives the error correction capability of the Reed-Solomon code.
See also: gf, rsenc, rsdec.
Package: communications