mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-17 13:51:47 -05:00
AIS feature: use course if heading is not available for ship image orientation in Map feature
This commit is contained in:
parent
103f6f6181
commit
268318e02c
@ -538,8 +538,11 @@ void AISGUI::updateVessels(AISMessage *ais)
|
||||
if (!destination.isEmpty()) {
|
||||
text.append(QString("Destination: %1").arg(destination));
|
||||
}
|
||||
if (!courseV.isNull()) {
|
||||
text.append(QString("Course: %1%2").arg(courseV.toFloat()).arg(QChar(0xb0)));
|
||||
if (!courseV.isNull())
|
||||
{
|
||||
float course = courseV.toFloat();
|
||||
text.append(QString("Course: %1%2").arg(course).arg(QChar(0xb0)));
|
||||
swgMapItem->setImageRotation(course);
|
||||
}
|
||||
if (!speedV.isNull()) {
|
||||
text.append(QString("Speed: %1 knts").arg(speedV.toFloat()));
|
||||
@ -548,7 +551,7 @@ void AISGUI::updateVessels(AISMessage *ais)
|
||||
{
|
||||
float heading = headingV.toFloat();
|
||||
text.append(QString("Heading: %1%2").arg(heading).arg(QChar(0xb0)));
|
||||
swgMapItem->setImageRotation(heading);
|
||||
swgMapItem->setImageRotation(heading); // heading takes precedence over course
|
||||
}
|
||||
if (!shipType.isEmpty()) {
|
||||
text.append(QString("Ship type: %1").arg(shipType));
|
||||
|
Loading…
Reference in New Issue
Block a user