Replace repeated LEFT OUTER JOIN (SELECT callsign, MAX(lastupload) ...) derived-table joins with simpler LEFT JOIN lotw_users lotw across Distances_model, Logbook_model, Logbookadvanced_model, and Worked_all_britain_model. Also remove an unnecessary DISTINCT/inner station_profile join from an optimized Logbook_model subquery. These changes simplify SQL emitted by the CI query builder, improve compatibility and readability, and may improve performance; note that using direct joins can change which lastupload row is returned if multiple lotw_users rows exist for a callsign.
Refactored the distances filter form for better layout and usability, added a reset button, and enhanced the display of statistics with metric cards. Implemented session-based caching in Distances_model to reduce repeated calculations and speed up responses. Updated JavaScript to auto-load charts, show loading spinners, and improve error handling and dynamic UI updates.
Replaces direct joins to lotw_users with subqueries that select the latest (MAX) lastupload per callsign in Distances_model, Logbook_model, and Logbookadvanced_model. This ensures only the most recent LoTW upload per callsign is joined, improving data accuracy and preventing duplicate join results.
I propose change "round" to "ceil" (Round fractions up).
Because I work on an export plugin in EDI file (IARU REGTEST1), the rounding is systematically higher:
"For the amateur bands up to 10 GHz inclusive, points will be scored on the basis of one point per
kilometer, i.e. the calculated distance in kilometers will be truncated to an integer value and 1 km
will be added. " (excerpt from VHF_Handbook_V9.01)
This commit has some further changes to text throughout the application. There are also some small fixes for text formatting. E.g. making sure that the small "helper" text under certain form fields is all consistent in terms of colour, font, etc.