This project is read-only.


Visibility in fractional statute miles


The following TAF test case produces format exceptions ("Input string was not in a correct format"):
KBOS 302027Z 3020/3124 27010KT 6SM SCT025 BKN250
     FM302300 24007KT 6SM BKN090
     FM310300 22006KT 3SM OVC015
     FM310700 22007KT 1 1/2SM BR OVC015
     FM311000 23008KT 1/2SM FG OVC003
     FM311200 23008KT 3/4SM BR OVC001
     FM311500 22009KT 6SM BKN090=
Specifically, after matching the visibility strings against the regular expression, the wrong groups are used to extract the values.
          @"^((CAVOK)|(\d{4})|(((M)?|(\d+) )(\d+)(/(\d\d?))?SM))";
            new Racional(
              grp[7].Success ? grp[7].GetIntValue() : 0,
              (grp[9].Success) ? grp[9].GetIntValue() : 1),
Group 9 is "/2", which cannot be converted to an integer. What's needed is just "2", which is group 10.


file attachments

Closed Sep 6, 2013 at 9:17 PM by Engin1980
Fixed in code, will be in next release.


Engin1980 wrote Sep 6, 2013 at 9:16 PM

You are right! Thank you!

wrote Sep 6, 2013 at 9:17 PM