TO DO: CheckPoint 105 Sprint 108 Bug 113 Fix 125 Feat 140 Test 101 [Sprint 106 (2019-01-29)] [Fix 124 (2019-05-26)] The following minor inconveniences/annoyances must be fixed: - Main page: - Settings button should be disabled until data are loaded - CharSettings page: - Auto setting should trigger ValidMap to contain the default value - Control Type defaults to Absolute - Control Coordinates handling should change: - Based on what's showing in the Control Type checkbox: - Absolute: coordinates must be unadorned - Relative: coordinates that are not prefaced with + or - will be default be prefaced with '+' - VSettings Page: - Save button should be disabled after saving - GSettings Page: - Save button should be disabled after saving [Feat 136 (2019-04-04)] Build in support for the [Hold] button (including coming out of Settings). * May need to change the button type, to TToggle, or something. Button has two modes: Hold, and Hold Off - First click: Enages Hold button Hold button changes to Release All button Second button appears: Release One - Second click: Changes to Hold Off; second button disappears [Feat 107] Introduce value persistence, where a value will be persisted, in the event of NILs, for a configurable number of iterations. Introduce a parameter Persist x - x: Number of iterations to persist the value [Feat 149 (2019-05-15)] Add a new global directive AutoWriteIni {value} - value = {Auto|integer} - Controls how often the .ini is automatically rewritten, in minutes; or whenever new data are input [Feat 131 (2019-03-02)] Have RELOADs preserve last values for differentials [Feat 134 (2019-03-25)] Mark output files if error correction has been used. Perhaps a suffix; ie ...-ec.txt Also mark output image files ie; ..-EC.txt Modify searchvalid routine to return an extra value if error checking used. Control this behaviour with a global directive SHOWEC [Default off] [Feat 137 (2019-04-12)] Add support for GoodPath/BadPath. Data Structures and Routines will have to change: - OSMRootType - InitOSM() - XferOSM() - GSettings - LoadOSMProfile() - SaveOSMProfile() [Sprint 108 (2019-02-27)] [Feat 126 (2019-02-07)] Rewrite the ini-parsing routine - Break it up into sections by type (global, value, character) - Break it into mutliple routines [Feat 127 (2019-02-07)] Rewrite the ini-write routine - Break it up into sections by type (global, value, character) - Break it into mutliple routines [Feat 132 (2019-03-05)] Recode the front-panel info display Paging All fields displayed [Feat 122 (2019-02-04)] Update the menu bar to handle the new functions [Feat 105] Cache filenames of images waiting to be processed. Process them in chrono order. [Checkpoint 104] At this point: - The software should be fully tested in all fuctionality - The software should be installed and successfully capturing backup data. VERSION: 2.99b [Checkpoint 105 (2019-04-04)] Installation on Production: - First copy wxocr.ini from Production Server and modify. - Get program working with it. - Take some time to adjust. - Install on Production Server. - Copy over wxocr.ini from Development Server and modify. - Launch At this point: - Production data should be capturing successfully. VERSION: 3.00b VERSION: 3.00 [Fix 108] Get Web Xfer working again with new directive Report [Web,File] - Use own POST routine, with timeout and retry DONE: 2016-10-01: Fix current-group display so all fields display in Adjust mode. V 2.60 2016-08-28: Code Cleanup 2016-08-27: Specify how sun treated (as n minutes) TreatSun n - Add TreatSun 5 to .ini - Add SaveGood and SaveBad directives Specify whether to save or not save items - Source pictures - Good output - Bad output - Comment-out the Output File Prefixes from the .ini file - Change Copy 1 to Copy BP-C Fix listbox problem by looking up which entries actually have segments Get rid of deprecated file prefixes in .ini file Allow a specific source to be named in the Copy tag 2016-08-25: Get rid of hardwired quit time altogether; let cron look after it Let output be specified as customized Output1='%Date@%Time,"%Obs-C",%BP-C,%Te-C,%RH-C,+%DP-C,nil,nil,%Hx-C,%Pr-C,WC-C, %WC-C,%WS-C,%WB-C,%CB-C,%Sun' Output2='%Date@%Time,"",%Te-I,%BP-I,%BPTr-I,%DP-I,%RH-I,nil,nil,nil,nil,%Hx-I,nil,nil,nil,nil' Unhard-wire element references from code (use lookups and a syntax) Syntax: Pf-I where Pf=prefix (BP,Te,DP,RH,Hx,WC,WS,WB,Pr,SS) and I=1st initial of location name Built-in symbols including %Date%,%Time%,%sDate%,%sTime% Add +CalcDewPoint(Te-C,RH-C), +CalcHumidex(Te-C,DP-C), +CalcWindChill(Te-C,WS-C), +CalcWindChill(Te-C,WS-C) directives Let functions be specified - Calculate Hx, DP, WC, Compassbearing 2016-08-22: Introduce 'Isolate Red Channel' and 'Isolate Green Channel' checkboxes, ColourJpg var Call from one of the checkboxes: transferColour and Draw() Introduce AltProcess directive - Alternative processing for the final determination lit/not lit Improve light/dark discriminator Global DefaultThreshold if CharThresh = 0 then use DefaultThreshold Only define a threshold for those characters that need one Brightness = CharControl-CharBrightness if Brightness < Threshold then char is dark Deprecate SegThresh and Thresh directives Introduce CharThresh directive - Ability to seed Last_Diff to 0 or current precip value - Add a menubar FILE EDIT EXTRA OBS Go! Adjust OFF Light Rain Reload Params Seed Precip Rain - with zero Heavy Rain Exit from current val Light Snow Snow Heavy Snow Fog Thunderstorm Hail Freezing Rain Drizzle - Re-think during adjustment mode; maybe give raw pic plus overlay of only the whole specified group (value) and char - Put it in HighlightCurrentGroup (and add routines for char) - Carve out a separate image-refreshing routine [Fix 102] Bring the Humidex calculation into conformity with EC (only at src temp. > 20, and Hx > 20) [mcOCR 101] Bring the wind chill index into conformity with EC reporting standards (only for temps below 10C and wind speeds above 4.8 km/h.) Completed Items: [Feat 100] Add ability to specify a precip amount for next report. - Text field. - Automatically reverts to 0.0 once reported. 2017-06-17: [Bug 100] Get extra-sky buttons sorted out and properly functional. Test passed 2017-06-17. 2017-07-15 [Fix 101] Eliminate Buffers - useless anyway, really [Bug 103] Fix memory leak [Fix 102] Store data to local disk files - Use shell script to xfer them to Production 2017-07-17 [Bug 106] Current Sky repeats Extra-Sky when CurrentSky = otherwise empty [Bug 102] * When target folder not available on server system, program fails with "file not found" * Modify the .ini and save to a local-disk file * Shell script to copy the information whenever the path is available * Do not delete original image file before recognition is complete and successful. * Save any image unsuccessfully processed. * Do NOT lose data! 2017-07-23 [Fix 106] Ensure that all buttons have the same colour. [Fix 104] Bring the Humidex calculation into conformity with EC (only at src temp. > 20, and Hx > 20) [Fix 105] Bring the wind chill index into conformity with EC reporting standards (only for temps below 10C and wind speeds above 4.8 km/h.) 2017-08-05 [Feat 102] When sky observation is '', make it 'No Observation' Test Passed 2017-08-05. [Feat 101] Add per-character contrast for Dimmest use CharThresh values Calculate corrected contrast value Take lowest of them Corrects for areas where the screen, brightened, is still darker than for other areas where the screen is dimmed (pixel lit). Done. Test passed 2017-08-05. 2017-11-10: [Bug 107] Wind Chill Index value is not being forwarded [Fix 107] Change default noobservation to "Not Observed" 2017-11-15: [Bug 108] WindChillIndex() is not returning reliable figures. Fixed and verified against EC's own calculator. Test Passed 2017-11-15 2019-02-04: [Sprint 101 (2019-01-29)] [Feat 103] Introducing the OCR Settings Model (OSM): All elements are logically ordered: Designed to be self-contained. OCR Definitions as of 2019-01-29: * TestMode: Boolean * Comments: AnsiString * InputPath: AnsiString * Comments: AnsiString * ReportURL: AnsiString * Comments: AnsiString * OutputPath: AnsiString * Comments: AnsiString * SkyPath: AnsiString * Comments: AnsiString * WGetResultPath: AnsiString * Comments: AnsiString * DefaultThresh: Byte * Comments: AnsiString * LogDebugLevel: Byte * Comments: AnsiString * LogAnnounce: Boolean * Comments: AnsiString * SaveGood: Boolean * Comments: AnsiString * SaveBad: Boolean * Comments: AnsiString * TreatSun: Byte * Comments: AnsiString * LocationsCnt (RO): Byte * OSMLocations: * Comments: AnsiString * Name: ShortString * Comments: AnsiString * OutputFileName: AnsiString * Comments: AnsiString * Output Definition: AnsiString * Comments: AnsiString * TrackCnt (RO): Byte * TrackDef: AnsiString * Comments: AnsiString * Values Cnt (RO): Byte * OSMValues: * Comments: AnsiString * Formula: ShortString * Comments: AnsiString * Name: ShortString * Comments: AnsiString * PersistIterations: Byte * Comments: AnsiString * PersistCount: Internal: Byte * ConversionType: ShortString * Comments: AnsiString * MinValid: SmallInt * Comments: AnsiString * MaxValid: SmallInt * Comments: AnsiString * Mul10: Boolean * Comments: AnsiString * XO, YO: SmallInt * Comments: AnsiString * Diff_On: Boolean * Comments: AnsiString * CopyFrom: ShortString * Comments: AnsiString * RoundMe: Boolean * Comments: AnsiString * CalPreAdd, CalPreSub: Double * Comments: AnsiString * CalPreMul, CalPreDiv: Double * Comments: AnsiString * CallAdd, CalSub: Double * Comments: AnsiString * CalMul, CalDiv: Double * Comments: AnsiString * CalPostAdd, CalPostSub: Double * Comments: AnsiString * CalPostMul, CalPostDiv: Double * Comments: AnsiString * AutoCalc: Boolean * Comments: AnsiString * CharsCnt (RO): Byte * IValue: Longint (Int) * SValue: ShortString (Int) * XO, YO: SmallInt (Int) Chars: * Comments: AnsiString * ValidCnt (RO): Byte * Comments: AnsiString * ValidMaps: * Value: Byte * Output: Char * Slant: Boolean * Comments: AnsiString * AutoXY1, AutoXY2 : SmallInt * Comments: AnsiString * SegCnt (RO): Byte Segments: * Comments: AnsiString * SegValue: Byte * X1, Y1: SmallInt * Comments: AnsiString * X2, Y2: SmallInt * Comments: AnsiString * SegThresh: Byte * Comments: AnsiString * SegThresh2 (RO): Byte; * Ctrl: * X1, Y1: SmallInt * XY1Comments: AnsiString * IsCtrl (RO): Boolean * X2, Y2 (RO): SmallInt * Size (Int): LongInt PBThr: Byte Comments: AnsiString * Thresh: byte * Comments: AnsiString * Weighted: Boolean * Comments: AnsiString * OX, OY (Int): SmallInt * AutoDefinition: Boolean * Comments: AnsiString * Alignment: Char ('H' or 'V') * Comments: AnsiString * X1, Y1: SmallInt * XY1Comments: AnsiString * X2, Y2: SmallInt * XY2Comments: AnsiString * OX1, OY1: SmallInt Use this structure to encode the settings information read in at runtime, and to allow any changes to be made to the settings. This will allow the settings file automatically to be rewritten during runtime. It will also allow a GUI manager for the settings. * [Feat 108 (2019-01-29)] Define the OSM model. Completed 2019-02-02. * [Feat 109 (2019-01-29)] Modify the read-settings routine to parse into the OSM concurrently. Completed 2019-02-02. * Feat 110 (2019-01-29)] Depends on: Feat 121 Code a routine to write out the OSM settings, to a separate file Don't mark this as done until it's perfect. Completed 2019-02-04. * [Feat 121 (2019-02-04)] Add some new declarations to the wxocr.ini file, and repurpose existing: * LThresh: Specifies a default threshhold for the location * VThresh: Specifies a default threshold for the value * GSlant: Global Slant definition * GNoSlant: Global NoSlant definition * LSlant: Locational Slant definition * LNoSlant: Value NoSlant definition * VSlant: Locational Slant definition * VNoSlant: Value NoSlant definition * Slant: Character Slant definition * NoSlant: Character NoSlant definition Completed 2019-02-04. 2019-02-24: [Sprint 107 (2019-01-31)] * [Feat 122 (2019-02-04)] * Change the name of the TestMode variable, to AdjustMode Completed 2019-02-04. * [Feat 123 (2019-02-04)] * Add writing and subsequent parsing of LastValue parameter for Differential values. * [Feat 119 (2019-01-31)] Start using the OSM for all operations. - This will involve a lot of code rewriting - Backup every procedure changed - Go methodically in program execution order Mostly Completed 2019-02-05 * [Feat 120 (2019-01-31)] Change output routine to rewrite the source wxocr.ini file. * [Feat 124 (2019-02-05)] Modify SaveAux() to save new auxiliary data * [Feat 125 (2019-02-05)] Modify LoadAux() to load new aux data * [CheckPoint 100 (2019-02-05)] At this point, the system should be loading/saving OSM data only. * [Fix 109 (2019-02-05)] Go through and delete all the old routines, leaving only OSM code * [Fix 110 (2019-02-06)] Add some new declarations to the Value stanza: * Sky: Append the current sky observations * ExtraSky: Append the extra sky observations * MPrecip: Assign manual precipitation measurements * Sunshine: Grab the sunshine value * Add new Value internal variable: Measure: Boolean. Set TRUE when character declared * Add support to read and write routines * [Feat 106] Allow unit conversions: - In the opening stanza of a value declaration: convert CtoF (CF) FtoC (FC) IntoMB (IB) MBtoIn (BI) MphtoKmh (MK) KmhtoMph (KM) IntoMm (IM) MmtoIn (MI) IntoCm (IC) CmtoIn (CI) * [Fix 112 (2019-02-19)] Change to relying on RValue rather than IValue. See if you can eliminate IValue. Change Diff_Last, Diff_Now to Double Handle Mul10 stuff right before writing to output * [Fix 113 (2009-02-24)] Segment Scanner is repeatedly adding the first pixel. That explains so much! Fixed and tested, 2019-02-24. * [CheckPoint 100 (2019-02-05)] At this point, the system should now be operating solely on the OSM, and taking readings normally 2019-02-19: In Progress 2019-02-24: Completed. * [Bug 110] Second sky condition concatenated to condition string without space Add a space after the comma. (!) Check that this will not break MCH! 2019-02-26: * [Sprint 102 (2019-01-29)] * [Fix 111 (2019-02-15)] Rename the Adjust button to Settings. Completed 2019-02-17. * [Feat 130 (2019-02-20)] Add a Hold button. Holds all processes until clicked again. * [Feat 129 (2019-02-19)] Add a new .ini Directive: Mul100 Allows values to be multiplied by 100, allowing for two decimal points. * [Feat 128 (2019-02-15)] Deprecate the location Track declaration Use from value declarations only * [Feat 104] Make many more settings accessible from the panel Just pop up a new window, non-modal Perhaps reduce adjustors to just one, selectable through a menu. Try a pop-up adjustor, with coordinates, so that the screen is viewable. Perhaps have to hide the settings form(s). Or multiple selectors, one adjustor. - Condense the readings display - Three selectors, with additional controls * [Feat 111 (2019-01-29)] Implement Settings Page with Global Settings manager Global Position Adjustor * [Checkpoint 102 (2019-02-26)] At this point, the system should be able to adjust global positions and control global definitions Sprint Completed 2019-02-26 2019-02-27: * [Sprint 103 (2019-01-29)] * [Feat 114 (2019-01-29)] Implement Location Settings * [Feat 112 (2019-01-29)] Implement Output Definitions Editor page * [Killed 2019-02-15: Feat 113 (2019-01-29)] Implement Tracking manager page Sprint Implemented 2019-02-27 2019-02-28: * [Checkpoint 103] Test in place with gypsy settings, images Install mcOCR on gypsy, grabbing backup readings. Test some of the conversion functions. 2019-03-05: * [Sprint 104 (2019-01-29)] * [Feat 115 (2019-01-29)] Implement Value Settings 2019-02-28: In Progress Completed 2019-03-05 * [Feat 130 (2019-02-27)] Implement Value Position Adjustor 2019-03-01: In Progress Completed 2019-03-04 * [Bug 111 (2019-03-02)] OOR Pixel value in ScanOSMControl Believe caused by adding to X,Y values in Control area. used local variables instead and seems to clear up problem Resolved 2019-03-02 * [Bug 112 (2019-03-02)] RELOAD directive is needlessly rewriting wxocr.ini Taking it out, for now. Resolved 2019-03-02. * [Bug 113 (2019-03-04)] OX,OY variables in char definition are blocking OX,OY in VPos Resolved 2019-03-04 by renaming the offset variables XO,YO Sprint completed 2019-03-05 [(Killed 2019-03-05) Bug 109] Not always possible to advance/retard adjustment settings for legit values. 2019-03-19: [Shelved 2019-03-19 (precluded) Bug 104] Fix problem with test mode on/off/on/off Can't reproduce this from the simple description. Will require further investigation [Shelved 2019-03-19 (precluded) Fix 103] Get rid of AltProcess stuff 2019-04-04: [(Shelved 2019-04-04) Feat 103] Find way of adding/sizing/contrasting elements right onscreen - It could be done, if you were to add a config-file semi-parser. It could look for telltale signs (Value, Character, Position, etc.) & rewrite specific parameters such as positions, Thresh values. Definitely worth looking into. 2019-05-28: [Sprint 105 (2019-01-29)] * [Feat 116 (2019-01-29)] Implement Character Settings 2019-03-06: In Progress 2019-04-04: Completed * [Feat 133 (2019-03-06)] Implement Character Position Adjustor 2019-03-06: In Progress 2019-03-21: Completed * [Feat 118 (2019-01-29)] Implement ValidMap Editor page 2019-03-08: In Progress 2019-03-11: Completed * [Feat 117 (2019-01-29)] Implement Segments Editor page 2019-03-12: In Progress 2019-03-18: Completed and Tested in full * [Fix 114 (2019-03-05)] Retrofit control-area calculations before calling GlobalPositioner * [Fix 115 (2019-03-05)] Retrofit a TImage to GlobalPositioner Adjust routines, including window display method * [Bug 113 (2019-03-17)] Wind chill index calculation looks broken. Calculated value D not being passed along. Fixed 2019-03-17. * [Feat 133 (2019-03-21)] Add a new flag to control records: isRel. Indicates whether Control is configured in relative or absolute terms. - IsCtrl flag now becomes an indicator that a control area has been defined. - Add support for it wherever it's needed in the application. For example, Load/SaveOSMProfile() Implemented 2019-03-21. - Don't forget changes to CharSettings - Don't forget changes to Positioner setups Implemented 2019-04-04. * [Feat 135 (2019-04-02)] Add a new global variable, DefaultValidMap, to hold the default any-character validation map string; one line. Held in a file, DefaultValidMap.txt Implemented 2019-04-02. MUST REMEMBER TO DEPLOY! * [Fix 116 (2019-04-04)] *** Ensure that all settings pages are working correctly. Segments Characters Values Locations Global * [Fix 118 (2019-04-06)] Make all pages follow a one-tiered changes system. Except possibly for Segments. * [Fix 120 (2019-04-12)] The data-retention, backup, and change-management have been belatedly defined. Ensure that all pages conform. Ensure further that all pages have the correct taborders set, and all onscreen elements are linked to events: * GSettings * LSettings * VSettings * CSettings * SSettings * [Feat 139 (2019-04-15)] Add support for MeasureLock variable; keeps further changes from happening. Will affect: - InitOSMValue() - XFerOSMValue() - LoadOSMProfile(): Locked if explictly referenced; else imputed - SaveOSMProfile(): Use the absolute Locked value * [Feat 138 (2019-04-12)] Add support for the Measure variable/directive and MeasureComments. Data Structures and Routines will have to change: - InitOSMValue() - XFerOSMValue() - LoadOSMProfile() - SaveOSMProfile() * [Fix 121 (2019-05-03)] Ensure that all pages: For pages: SegEdit2, CharSettings, VSettings, * CharPositioner Save does not work. * Believe fixed by setting Changes to FALSE * LocationsManager Back button does not work. * Believe fixed by trapping no-changes in button service routine * GlobalPositioner still needs adjustment. * Done * Edit Characters button in VSettings never becomes enabled * Believe fixed by turning the button on and off when the Measure checkbox is selected * Control Type and Control coordinates in CharSettings become disabled when Auto H selected. * Believe fixed by disabling calls to the routines where they're disabled. * Segments not updating with selection of Auto H in CharSettings * Believe fixed by adding recalcalation of segments when changes made * Had to create a procedure Gather to gather field values * Had to add extra code to create and restore a character value to recalculate from Character positioner offers nothing when working with a new character. Change VPositioner and CPositioner to have values assigned before calling * CPositioner needs value; so, OValue and theChar are it. Need to be set in advance. * For saving, simply insert the character into the right slot in the parent. VPositioner needs all values; so just pass ORoot and the valueNumber and LocationNumber. For saving, insert the value into the slot in the parent. Handle no values properly; Hand off properly; Parse things properly; Save properly. * [Feat 141 (2019-05-15)] Add a Save Config button. This will rewrite the .ini * [Fix 119 (2019-04-06)] Enable rewriting the ini file (to a separate file at first. Check very carefully.) * [Fix 122 (2019-05-21)] How the [Save] buttons work: End-of-Line Pages: Only save local data Set parent changes flag Exit page immediately (when appropriate) All Settings: Save to the local stack Set Global Changes flag Global Settings: Main Save Ramifications: Values will be auto-saved when accessing a child page. Will have to create a Save() routine in each settings page. Will have to be declared in the interface. Each Save() routine will set the global changes flag in GSettings, where the final save/dump will occur Save() routines will call the upstream Save() routines as well, up to Location All end-of-line pages will have to be adjusted to set the parent changes flags. Also, Save will mean Save and Exit Implemented for all pages: *GSettings, *GlobalPositioner, *LocationsManager, *VSettings, *VPos, *CharSettings, *VMEdit, *CharPositioner, *SegEdit2 Test Results: * VPos not auto exiting on Save Believe fixed. * Control Size field being reset to 12 on CharSettings. Believe fixed. * CharPositioner not exiting on save. Believe fixed. * CharSettings Save button not becoming active on CharPositioner.Save Believe fixed. * Changed data are disappearing in the save chain. Believe fixed through satisyfing Fix 123. * CharPositioner getting garbage data on second entry Proving tough to fix. Think I've got it now. * Changed data still not propagating to the actual dataset, despite saves Believe fixed by back-propagating from CharSettings. * [Fix 123 (2019-05-24)] * All settings pages must take care to preserve all on-screen values before selecting another element to edit, or before going off-page * Confirmed: *GSettings, *LocationsManager, *VSettings, *CharSettings * [Test 101 (2019-05-14)] Test the add-value function; create a BP-A * Convert IntoMb * Copy the value to Balt * Sizing data not being saved in CharPositioner * Final data not being saved * Issues with Conversion handling Test the conversion functions. * IntoMb * FtoC * Test all Settings and Positioners pages. Only minor issues remaining * SegCnt not being properly updated. Believe fixed by explicitly setting SegCnt before calling autocalc * Control coordinates being output for decimal point, meaning IsCtrl is not being properly set * Segment 0 coordinates being output for decimal point, meaning SegCnt is not being properly set Fix both by: * Setting IsCtrl properly in CharSettings * Correcting SegCnt for decimal points in CharSettings * Testing in WriteOSMProfile() for decimal, and outputting only the ValidMap Test that all data values are output. * WriteOSMProfile() leaving Mul10, Measure and Character markers for unmeasurable data Fixed by filtering them out on write * [Fix 125 (2019-05-27)] Make all math arguments double precision. Will have to adjust value declaration, other things Done. [Checkpoint 103 (2019-04-02)] At this point: * The app should be fully configurable via the settings screens. * All of the character positioners should work without flaw * The settings screens should likewise 'just work.' * Unit conversions should be at least partly tested. - Development version installed for backup data capture (Reminder to deploy all sub-files) - Backup data capture should now encompass both locations, and include all sensed and interpolated data. - Development version installed for primary data parallel capture and adjustment VERSION: 2.97b