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