Move planet_id to the end of the struct.  Somehow having the planet_id at the top of the struct was causing corruption.
Retrieve sector information from sqlite in getsector