Merge pull request #1 in JPSS/jpssnagg from bugfix/NAGG-6-incorporate-patch-from-cspp-sdr-adding to master
* commit 'ea0c72bea0a888ea3d1ecac28c450dd1bbdc2e58':
Revised the patch to support multiple platforms because unlike the N_GEO_Ref attribute, which according to the JPSS Common Data Format Control Book Volume V is used only where the geolocation information for a particular data product is packaged separately, all data products including GEO products should have a Platform_Short_Name attribute: 1. Removed get_platform_short_name(), which I believe was a clone of get_geofile_refs(), and instead called get_platform_value() directly. 2. Added the 4 character buffer to the granule_t structure that is created for each granule and allocated the memory to store the spacecraft code as part of that structure. 3. Removed unused variables I, j, pos and duplicate_geo_file from get_platform_value() and renamed the function’s 2nd parameter. 4. Moved #define PLATFORM_NAME_SIZE 4 from nagg_get_granules.c to nagg.h as NAGG_PSN_size for use also in nagg_select_granules.c/compose_output_fname(). 5. Added a call to get_platform_value() to get_geo_granules() to get the platform name for GEO granules as well as data product granules. It’s simplest to put the value from the attribute into the granule_t structure for every granule. One test failed to add the platform name to the output file name because compose_output_fname() pulled the platform name from a GEO granule. 6. Removed the char *spcrft parameter added to compose_output_fname(). The function now gets the platform name from the structure for the first selected granule passed to it. 7. Made the Spacecraft ID in the output filename lower case. The listed Identifiers under Applicable Values in the Control Book Volume I are lower case, and they have been lower case in all of the files I have seen.
Commit patch provided by Scott Mindock, CSPP SDR.