Correct FT4 mode designation for ADIF v3.1.0 and later

FT4 -> <mode:4>MFSK <submode:3>FT4

When reading ADIF records <mode:3>FT4 is acceptable as well.
This commit is contained in:
Bill Somerville 2019-05-22 02:23:04 +01:00
parent 350391d66e
commit 6507fedec3
2 changed files with 14 additions and 2 deletions

View File

@ -332,10 +332,15 @@ namespace
// will parse a record // will parse a record
{ {
auto const& entity = prefixes->lookup (call); auto const& entity = prefixes->lookup (call);
auto mode = extractField (record, "MODE").toUpper ();
if (!mode.size () || "MFSK" == mode)
{
mode = extractField (record, "SUBMODE").toUpper ();
}
worked.emplace (call.toUpper () worked.emplace (call.toUpper ()
, extractField (record, "GRIDSQUARE").left (4).toUpper () // not interested in 6-digit grids , extractField (record, "GRIDSQUARE").left (4).toUpper () // not interested in 6-digit grids
, extractField (record, "BAND").toUpper () , extractField (record, "BAND").toUpper ()
, extractField (record, "MODE").toUpper () , mode
, entity.entity_name , entity.entity_name
, entity.continent , entity.continent
, entity.CQ_zone , entity.CQ_zone

View File

@ -69,7 +69,14 @@ QByteArray LogBook::QSOToADIF (QString const& hisCall, QString const& hisGrid, Q
QString t; QString t;
t = "<call:" + QString::number(hisCall.length()) + ">" + hisCall; t = "<call:" + QString::number(hisCall.length()) + ">" + hisCall;
t += " <gridsquare:" + QString::number(hisGrid.length()) + ">" + hisGrid; t += " <gridsquare:" + QString::number(hisGrid.length()) + ">" + hisGrid;
t += " <mode:" + QString::number(mode.length()) + ">" + mode; if (mode != "FT4")
{
t += " <mode:" + QString::number(mode.length()) + ">" + mode;
}
else
{
t += " <mode:4>MFSK <submode:" + QString::number(mode.length()) + ">" + mode;
}
t += " <rst_sent:" + QString::number(rptSent.length()) + ">" + rptSent; t += " <rst_sent:" + QString::number(rptSent.length()) + ">" + rptSent;
t += " <rst_rcvd:" + QString::number(rptRcvd.length()) + ">" + rptRcvd; t += " <rst_rcvd:" + QString::number(rptRcvd.length()) + ">" + rptRcvd;
t += " <qso_date:8>" + dateTimeOn.date().toString("yyyyMMdd"); t += " <qso_date:8>" + dateTimeOn.date().toString("yyyyMMdd");