Struct return in Library

Wrapping an array in an struct is not the best way to return an array from a function. If the array is statically sized in the struct, the caller should create the array, and pass a reference to it to the function that needs to populate it.

So, why are you wrapping the array in a struct?

If you must, define the struct in a header file, included in the library and the sketch.