How to store a bunch of pre-defined values in a library?


i'm writing sketch telescope alignment , tracking, , need store list of 50 brightest stars , metadata (name, coordinates , magnitude) somewhere.

i've made structure star looks this:

code: [select]
typedef struct {
  float time;
  float ra;
  float dec;
  float alt;
  float az;
  string name;
  float vmag;
} star;


and can declare individual stars enough:

code: [select]
star sirius   = {0.0, 1.76779309390854, -0.291751177018097, 0.0, 0.0, "sirius",   -1.46}

but adding 50 of these start of .ino file seems little clunky.

what best method storing data? can declare giant 2d array in header file?

quote
can declare giant 2d array in header file?
have tried ?  start small array.  if works try larger 1 size of available memory.


Arduino Forum > Using Arduino > Programming Questions > How to store a bunch of pre-defined values in a library?


arduino

Comments