1
Vote

Taf.ToCode excludes RMK

description

The structure of Taf.ToCode() roughly matches that of TafDecoder._Decode(), except for the final Remark property. As a result, generating a report from a parsed TAF has the effect of stripping off any remarks that may have been included.
    protected override Taf _Decode(string source)
    {...
        if (ret.IsMissing == false)
        {...
            ret.Trends = new TrendInfoForTafListDecoder().Decode(ref pom);
          }
        }
        ret.Remark = new RemarkDecoder() { Required = false }.Decode(ref pom);
    public override string ToCode()
    {...
      if (IsMissing == false)
      {...
        foreach (var fItem in this.Trends) ...
      }

      return ret.ToString();
It looks like Taf.ToCode() should use this code from Metar.ToCode():
      if (!string.IsNullOrEmpty(this.Remark))
        ret.AppendPreSpaced("RMK " + this.Remark);

comments