1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-31 09:05:14 +01:00

ENC signal stations

This commit is contained in:
Martin Tůma 2023-01-11 23:03:54 +01:00
parent 78e3c78197
commit 9ff7ecea97
4 changed files with 47 additions and 17 deletions

View File

@ -10,6 +10,7 @@
#define CATMOR 40
#define CATTRK 54
#define CATREA 56
#define CATSIT 61
#define CATSCF 65
#define CATWAT 69
#define CATWRK 71
@ -24,6 +25,7 @@
#define WATLEV 187
#define I_CATACH 17000
#define I_CATSIT 17002
#define I_RESTRN 17004
#define I_CATHAF 17008
#define I_RDOCAL 17017

View File

@ -51,22 +51,24 @@ static QMap<uint,uint> orderMapInit()
map.insert(TYPE(UWTROC), 26);
map.insert(TYPE(WATTUR), 27);
map.insert(TYPE(PILBOP), 28);
map.insert(TYPE(I_RDOCAL), 29);
map.insert(TYPE(I_TRNBSN), 30);
map.insert(TYPE(HRBFAC), 31);
map.insert(TYPE(I_HRBFAC), 31);
map.insert(TYPE(PILPNT), 32);
map.insert(TYPE(ACHBRT), 33);
map.insert(TYPE(I_ACHBRT), 33);
map.insert(TYPE(CRANES), 34);
map.insert(TYPE(I_CRANES), 34);
map.insert(TYPE(I_WTWGAG), 35);
map.insert(TYPE(PYLONS), 36);
map.insert(TYPE(LNDMRK), 37);
map.insert(TYPE(SILTNK), 38);
map.insert(TYPE(LNDELV), 39);
map.insert(TYPE(SMCFAC), 40);
map.insert(TYPE(BUISGL), 41);
map.insert(TYPE(SISTAT), 29);
map.insert(TYPE(I_SISTAT), 29);
map.insert(TYPE(I_RDOCAL), 30);
map.insert(TYPE(I_TRNBSN), 31);
map.insert(TYPE(HRBFAC), 32);
map.insert(TYPE(I_HRBFAC), 32);
map.insert(TYPE(PILPNT), 33);
map.insert(TYPE(ACHBRT), 34);
map.insert(TYPE(I_ACHBRT), 34);
map.insert(TYPE(CRANES), 35);
map.insert(TYPE(I_CRANES), 35);
map.insert(TYPE(I_WTWGAG), 36);
map.insert(TYPE(PYLONS), 37);
map.insert(TYPE(LNDMRK), 38);
map.insert(TYPE(SILTNK), 39);
map.insert(TYPE(LNDELV), 40);
map.insert(TYPE(SMCFAC), 41);
map.insert(TYPE(BUISGL), 42);
map.insert(TYPE(I_DISMAR), 0xFFFFFFFE);
map.insert(TYPE(SOUNDG), 0xFFFFFFFF);
@ -220,6 +222,22 @@ static QString hUnits(uint type)
}
}
static QString sistat(uint type)
{
switch (type) {
case 1:
return "SS (Port Control)";
case 3:
return "SS (INT)";
case 6:
return "SS (Lock)";
case 8:
return "SS (Bridge)";
default:
return "SS";
}
}
MapData::Point::Point(uint type, const Coordinates &c, const QString &label,
const QVector<QByteArray> &params) : _type(type), _pos(c), _label(label)
{
@ -233,6 +251,10 @@ MapData::Point::Point(uint type, const Coordinates &c, const QString &label,
if (!params.at(1).isEmpty())
_label = QString("VHF ") + QString::fromLatin1(params.at(1));
_param = QVariant(params.at(0).toDouble());
} else if (type>>16 == I_SISTAT || type>>16 == SISTAT) {
if (_label.isEmpty())
_label = sistat(type && 0xFF);
_type = TYPE(SISTAT);
}
}
@ -509,7 +531,9 @@ MapData::Attr MapData::pointAttr(const ISO8211::Record &r, uint OBJL)
|| (OBJL == BUAARE && key == CATBUA)
|| (OBJL == SMCFAC && key == CATSCF)
|| (OBJL == BUISGL && key == FUNCTN)
|| (OBJL == WATTUR && key == CATWAT))
|| (OBJL == WATTUR && key == CATWAT)
|| (OBJL == SISTAT && key == CATSIT)
|| (OBJL == I_SISTAT && key == I_CATSIT))
subtype = av.at(1).toByteArray().toUInt();
else if (OBJL == I_DISMAR && key == CATDIS)
subtype |= av.at(1).toByteArray().toUInt();

View File

@ -71,6 +71,7 @@
#define RIVERS 114
#define ROADWY 116
#define SLCONS 122
#define SISTAT 123
#define SILTNK 125
#define SLOTOP 126
#define SMCFAC 128
@ -90,6 +91,7 @@
#define I_ACHARE 17001
#define I_DISMAR 17004
#define I_RESARE 17005
#define I_SISTAT 17007
#define I_BERTHS 17010
#define I_BRIDGE 17011
#define I_CBLOHD 17012

View File

@ -245,6 +245,7 @@ void Style::pointStyle()
_points[SUBTYPE(I_DISMAR, 2)].setTextFontSize(Small);
_points[SUBTYPE(I_DISMAR, 2)].setHaloColor(QColor());
_points[SUBTYPE(I_DISMAR, 3)] = _points[SUBTYPE(I_DISMAR, 2)];
_points[SUBTYPE(I_DISMAR, 4)] = _points[SUBTYPE(I_DISMAR, 2)];
_points[TYPE(CGUSTA)] = Point(QImage(":/marine/coast-guard.png"));
_points[TYPE(RDOSTA)] = Point(QImage(":/marine/radio.png"));
_points[TYPE(RADSTA)] = Point(QImage(":/marine/radar.png"));
@ -259,6 +260,7 @@ void Style::pointStyle()
_points[SUBTYPE(WATTUR, 3)] = Point(QImage(":/marine/overfalls.png"));
_points[SUBTYPE(WATTUR, 4)] = Point(QImage(":/marine/overfalls.png"));
_points[TYPE(PILBOP)] = Point(QImage(":/marine/boarding-place.png"));
_points[TYPE(SISTAT)] = Point(QImage(":/marine/pylon.png"));
_points[SUBTYPE(SMCFAC, 7)] = Point(QImage(":/POI/restaurant-11.png"));
_points[SUBTYPE(SMCFAC, 11)] = Point(QImage(":/POI/pharmacy-11.png"));