mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-08 08:07:54 -04:00
Add type and onSurface fields
This commit is contained in:
parent
67dec1dd83
commit
5eeae7c231
@ -9967,6 +9967,12 @@ margin-bottom: 20px;
|
|||||||
};
|
};
|
||||||
defs.MapAircraftState = {
|
defs.MapAircraftState = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
|
"aircraftType" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"onSurface" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"airspeed" : {
|
"airspeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float",
|
"format" : "float",
|
||||||
@ -9980,7 +9986,7 @@ margin-bottom: 20px;
|
|||||||
"groundspeed" : {
|
"groundspeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float",
|
"format" : "float",
|
||||||
"description" : "Groundspeed in knots"
|
"description" : "Ground speed in knots"
|
||||||
},
|
},
|
||||||
"mach" : {
|
"mach" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -9999,7 +10005,7 @@ margin-bottom: 20px;
|
|||||||
"verticalSpeed" : {
|
"verticalSpeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float",
|
"format" : "float",
|
||||||
"description" : "feet/s"
|
"description" : "feet/m"
|
||||||
},
|
},
|
||||||
"heading" : {
|
"heading" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -10024,17 +10030,20 @@ margin-bottom: 20px;
|
|||||||
"format" : "float"
|
"format" : "float"
|
||||||
},
|
},
|
||||||
"autopilot" : {
|
"autopilot" : {
|
||||||
"type" : "integer"
|
"type" : "integer",
|
||||||
|
"description" : "-1 unknown, 0 off, 1 on"
|
||||||
},
|
},
|
||||||
"verticalMode" : {
|
"verticalMode" : {
|
||||||
"type" : "integer"
|
"type" : "integer",
|
||||||
|
"description" : "0 unknown, 1 VNAV, ALT HOLD, APP (G/S)"
|
||||||
},
|
},
|
||||||
"lateralMode" : {
|
"lateralMode" : {
|
||||||
"type" : "integer"
|
"type" : "integer",
|
||||||
|
"description" : "0 unknown, 1 LNAV, APP (LOC)"
|
||||||
},
|
},
|
||||||
"tcasMode" : {
|
"tcasMode" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "0 Off, 1 TA, 2 TA/RA"
|
"description" : "-1 unknown, 0 Off, 1 TA, 2 TA/RA"
|
||||||
},
|
},
|
||||||
"windSpeed" : {
|
"windSpeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -59561,7 +59570,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2025-01-03T12:42:45.813+01:00
|
Generated 2025-01-05T11:23:33.367+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -227,6 +227,10 @@ MapCoordinate:
|
|||||||
MapAircraftState:
|
MapAircraftState:
|
||||||
description: "Aircraft state for PFD/ND"
|
description: "Aircraft state for PFD/ND"
|
||||||
properties:
|
properties:
|
||||||
|
aircraftType:
|
||||||
|
type: string
|
||||||
|
onSurface:
|
||||||
|
type: integer
|
||||||
airspeed:
|
airspeed:
|
||||||
description: "Indicated airspeed in knots"
|
description: "Indicated airspeed in knots"
|
||||||
type: number
|
type: number
|
||||||
@ -236,7 +240,7 @@ MapAircraftState:
|
|||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
groundspeed:
|
groundspeed:
|
||||||
description: "Groundspeed in knots"
|
description: "Ground speed in knots"
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
mach:
|
mach:
|
||||||
@ -251,7 +255,7 @@ MapAircraftState:
|
|||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
verticalSpeed:
|
verticalSpeed:
|
||||||
description: "feet/s"
|
description: "feet/m"
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
heading:
|
heading:
|
||||||
@ -272,13 +276,16 @@ MapAircraftState:
|
|||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
autopilot:
|
autopilot:
|
||||||
|
description: "-1 unknown, 0 off, 1 on"
|
||||||
type: integer
|
type: integer
|
||||||
verticalMode:
|
verticalMode:
|
||||||
|
description: "0 unknown, 1 VNAV, ALT HOLD, APP (G/S)"
|
||||||
type: integer
|
type: integer
|
||||||
lateralMode:
|
lateralMode:
|
||||||
|
description: "0 unknown, 1 LNAV, APP (LOC)"
|
||||||
type: integer
|
type: integer
|
||||||
tcasMode:
|
tcasMode:
|
||||||
description: "0 Off, 1 TA, 2 TA/RA"
|
description: "-1 unknown, 0 Off, 1 TA, 2 TA/RA"
|
||||||
type: integer
|
type: integer
|
||||||
windSpeed:
|
windSpeed:
|
||||||
type: number
|
type: number
|
||||||
|
@ -227,6 +227,10 @@ MapCoordinate:
|
|||||||
MapAircraftState:
|
MapAircraftState:
|
||||||
description: "Aircraft state for PFD/ND"
|
description: "Aircraft state for PFD/ND"
|
||||||
properties:
|
properties:
|
||||||
|
aircraftType:
|
||||||
|
type: string
|
||||||
|
onSurface:
|
||||||
|
type: integer
|
||||||
airspeed:
|
airspeed:
|
||||||
description: "Indicated airspeed in knots"
|
description: "Indicated airspeed in knots"
|
||||||
type: number
|
type: number
|
||||||
@ -236,7 +240,7 @@ MapAircraftState:
|
|||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
groundspeed:
|
groundspeed:
|
||||||
description: "Groundspeed in knots"
|
description: "Ground speed in knots"
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
mach:
|
mach:
|
||||||
@ -251,7 +255,7 @@ MapAircraftState:
|
|||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
verticalSpeed:
|
verticalSpeed:
|
||||||
description: "feet/s"
|
description: "feet/m"
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
heading:
|
heading:
|
||||||
@ -272,13 +276,16 @@ MapAircraftState:
|
|||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
autopilot:
|
autopilot:
|
||||||
|
description: "-1 unknown, 0 off, 1 on"
|
||||||
type: integer
|
type: integer
|
||||||
verticalMode:
|
verticalMode:
|
||||||
|
description: "0 unknown, 1 VNAV, ALT HOLD, APP (G/S)"
|
||||||
type: integer
|
type: integer
|
||||||
lateralMode:
|
lateralMode:
|
||||||
|
description: "0 unknown, 1 LNAV, APP (LOC)"
|
||||||
type: integer
|
type: integer
|
||||||
tcasMode:
|
tcasMode:
|
||||||
description: "0 Off, 1 TA, 2 TA/RA"
|
description: "-1 unknown, 0 Off, 1 TA, 2 TA/RA"
|
||||||
type: integer
|
type: integer
|
||||||
windSpeed:
|
windSpeed:
|
||||||
type: number
|
type: number
|
||||||
|
@ -9967,6 +9967,12 @@ margin-bottom: 20px;
|
|||||||
};
|
};
|
||||||
defs.MapAircraftState = {
|
defs.MapAircraftState = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
|
"aircraftType" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"onSurface" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"airspeed" : {
|
"airspeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float",
|
"format" : "float",
|
||||||
@ -9980,7 +9986,7 @@ margin-bottom: 20px;
|
|||||||
"groundspeed" : {
|
"groundspeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float",
|
"format" : "float",
|
||||||
"description" : "Groundspeed in knots"
|
"description" : "Ground speed in knots"
|
||||||
},
|
},
|
||||||
"mach" : {
|
"mach" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -9999,7 +10005,7 @@ margin-bottom: 20px;
|
|||||||
"verticalSpeed" : {
|
"verticalSpeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float",
|
"format" : "float",
|
||||||
"description" : "feet/s"
|
"description" : "feet/m"
|
||||||
},
|
},
|
||||||
"heading" : {
|
"heading" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -10024,17 +10030,20 @@ margin-bottom: 20px;
|
|||||||
"format" : "float"
|
"format" : "float"
|
||||||
},
|
},
|
||||||
"autopilot" : {
|
"autopilot" : {
|
||||||
"type" : "integer"
|
"type" : "integer",
|
||||||
|
"description" : "-1 unknown, 0 off, 1 on"
|
||||||
},
|
},
|
||||||
"verticalMode" : {
|
"verticalMode" : {
|
||||||
"type" : "integer"
|
"type" : "integer",
|
||||||
|
"description" : "0 unknown, 1 VNAV, ALT HOLD, APP (G/S)"
|
||||||
},
|
},
|
||||||
"lateralMode" : {
|
"lateralMode" : {
|
||||||
"type" : "integer"
|
"type" : "integer",
|
||||||
|
"description" : "0 unknown, 1 LNAV, APP (LOC)"
|
||||||
},
|
},
|
||||||
"tcasMode" : {
|
"tcasMode" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "0 Off, 1 TA, 2 TA/RA"
|
"description" : "-1 unknown, 0 Off, 1 TA, 2 TA/RA"
|
||||||
},
|
},
|
||||||
"windSpeed" : {
|
"windSpeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -59561,7 +59570,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2025-01-03T12:42:45.813+01:00
|
Generated 2025-01-05T11:23:33.367+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,6 +28,10 @@ SWGMapAircraftState::SWGMapAircraftState(QString* json) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SWGMapAircraftState::SWGMapAircraftState() {
|
SWGMapAircraftState::SWGMapAircraftState() {
|
||||||
|
aircraft_type = nullptr;
|
||||||
|
m_aircraft_type_isSet = false;
|
||||||
|
on_surface = 0;
|
||||||
|
m_on_surface_isSet = false;
|
||||||
airspeed = 0.0f;
|
airspeed = 0.0f;
|
||||||
m_airspeed_isSet = false;
|
m_airspeed_isSet = false;
|
||||||
true_airspeed = 0.0f;
|
true_airspeed = 0.0f;
|
||||||
@ -74,6 +78,10 @@ SWGMapAircraftState::~SWGMapAircraftState() {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGMapAircraftState::init() {
|
SWGMapAircraftState::init() {
|
||||||
|
aircraft_type = new QString("");
|
||||||
|
m_aircraft_type_isSet = false;
|
||||||
|
on_surface = 0;
|
||||||
|
m_on_surface_isSet = false;
|
||||||
airspeed = 0.0f;
|
airspeed = 0.0f;
|
||||||
m_airspeed_isSet = false;
|
m_airspeed_isSet = false;
|
||||||
true_airspeed = 0.0f;
|
true_airspeed = 0.0f;
|
||||||
@ -116,6 +124,10 @@ SWGMapAircraftState::init() {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGMapAircraftState::cleanup() {
|
SWGMapAircraftState::cleanup() {
|
||||||
|
if(aircraft_type != nullptr) {
|
||||||
|
delete aircraft_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -148,6 +160,10 @@ SWGMapAircraftState::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGMapAircraftState::fromJsonObject(QJsonObject &pJson) {
|
SWGMapAircraftState::fromJsonObject(QJsonObject &pJson) {
|
||||||
|
::SWGSDRangel::setValue(&aircraft_type, pJson["aircraftType"], "QString", "QString");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&on_surface, pJson["onSurface"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&airspeed, pJson["airspeed"], "float", "");
|
::SWGSDRangel::setValue(&airspeed, pJson["airspeed"], "float", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&true_airspeed, pJson["trueAirspeed"], "float", "");
|
::SWGSDRangel::setValue(&true_airspeed, pJson["trueAirspeed"], "float", "");
|
||||||
@ -202,6 +218,12 @@ SWGMapAircraftState::asJson ()
|
|||||||
QJsonObject*
|
QJsonObject*
|
||||||
SWGMapAircraftState::asJsonObject() {
|
SWGMapAircraftState::asJsonObject() {
|
||||||
QJsonObject* obj = new QJsonObject();
|
QJsonObject* obj = new QJsonObject();
|
||||||
|
if(aircraft_type != nullptr && *aircraft_type != QString("")){
|
||||||
|
toJsonValue(QString("aircraftType"), aircraft_type, obj, QString("QString"));
|
||||||
|
}
|
||||||
|
if(m_on_surface_isSet){
|
||||||
|
obj->insert("onSurface", QJsonValue(on_surface));
|
||||||
|
}
|
||||||
if(m_airspeed_isSet){
|
if(m_airspeed_isSet){
|
||||||
obj->insert("airspeed", QJsonValue(airspeed));
|
obj->insert("airspeed", QJsonValue(airspeed));
|
||||||
}
|
}
|
||||||
@ -263,6 +285,26 @@ SWGMapAircraftState::asJsonObject() {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString*
|
||||||
|
SWGMapAircraftState::getAircraftType() {
|
||||||
|
return aircraft_type;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGMapAircraftState::setAircraftType(QString* aircraft_type) {
|
||||||
|
this->aircraft_type = aircraft_type;
|
||||||
|
this->m_aircraft_type_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGMapAircraftState::getOnSurface() {
|
||||||
|
return on_surface;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGMapAircraftState::setOnSurface(qint32 on_surface) {
|
||||||
|
this->on_surface = on_surface;
|
||||||
|
this->m_on_surface_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
SWGMapAircraftState::getAirspeed() {
|
SWGMapAircraftState::getAirspeed() {
|
||||||
return airspeed;
|
return airspeed;
|
||||||
@ -458,6 +500,12 @@ bool
|
|||||||
SWGMapAircraftState::isSet(){
|
SWGMapAircraftState::isSet(){
|
||||||
bool isObjectUpdated = false;
|
bool isObjectUpdated = false;
|
||||||
do{
|
do{
|
||||||
|
if(aircraft_type && *aircraft_type != QString("")){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
|
if(m_on_surface_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(m_airspeed_isSet){
|
if(m_airspeed_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
@ -41,6 +42,12 @@ public:
|
|||||||
virtual void fromJsonObject(QJsonObject &json) override;
|
virtual void fromJsonObject(QJsonObject &json) override;
|
||||||
virtual SWGMapAircraftState* fromJson(QString &jsonString) override;
|
virtual SWGMapAircraftState* fromJson(QString &jsonString) override;
|
||||||
|
|
||||||
|
QString* getAircraftType();
|
||||||
|
void setAircraftType(QString* aircraft_type);
|
||||||
|
|
||||||
|
qint32 getOnSurface();
|
||||||
|
void setOnSurface(qint32 on_surface);
|
||||||
|
|
||||||
float getAirspeed();
|
float getAirspeed();
|
||||||
void setAirspeed(float airspeed);
|
void setAirspeed(float airspeed);
|
||||||
|
|
||||||
@ -102,6 +109,12 @@ public:
|
|||||||
virtual bool isSet() override;
|
virtual bool isSet() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QString* aircraft_type;
|
||||||
|
bool m_aircraft_type_isSet;
|
||||||
|
|
||||||
|
qint32 on_surface;
|
||||||
|
bool m_on_surface_isSet;
|
||||||
|
|
||||||
float airspeed;
|
float airspeed;
|
||||||
bool m_airspeed_isSet;
|
bool m_airspeed_isSet;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user