The first commit is refactoring existing code only, with the goal of providing
a common API for loading sites from sites.txt, usable by multiple tools (currently rffit only).
The second commit adds the optional ST_SITES_TXT environment variable. This was needed in addition to the existing ST_DATADIR, because the latter is used by sattools for other things too. ST_SITES_TXT is especially useful when using a sites.txt maintained by the satnogs-tabulation-helper (--> the sites.txt using COSPAR ids and SatNOGS Station IDs can co-exist separately now).
The third commit is a bug fix (rffit: only call get_site(rsite_id) if rsite_id is non-zero).
The forth commit adds error/warning messages if site is missing/duplicate from sites.txt. Previously a missing site / wrongly configured sites.txt was a common source of frustration for me. Typical symptom previously: invalid station name & frequency prediction all over the place. Now: graceful error handling with messages.
This PR is aimed at improving sites.txt handling.
The first commit is refactoring existing code only, with the goal of providing a common API for loading sites from sites.txt, usable by multiple tools (currently rffit only).
The second commit adds the optional ST_SITES_TXT environment variable. This was needed in addition to the existing ST_DATADIR, because the latter is used by sattools for other things too. ST_SITES_TXT is especially useful when using a sites.txt maintained by the satnogs-tabulation-helper (--> the sites.txt using COSPAR ids and SatNOGS Station IDs can co-exist separately now).
The third commit is a bug fix (rffit: only call get_site(rsite_id) if rsite_id is non-zero).
The forth commit adds error/warning messages if site is missing/duplicate from sites.txt. Previously a missing site / wrongly configured sites.txt was a common source of frustration for me. Typical symptom previously: invalid station name & frequency prediction all over the place. Now: graceful error handling with messages.