Skip to content

Commit d73e423

Browse files
committed
Fixed Operational Mode Codes
Moved `single antenna` and `GPS antenna offset` flags from V1 to V2 operational status messages.
1 parent 715304f commit d73e423

5 files changed

Lines changed: 25 additions & 26 deletions

File tree

src/main/java/de/serosystems/example/ExampleDecoder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,14 @@ public void decodeMsg(long timestamp, String raw, Position receiver) {
228228
System.out.println(" IDENT switch active: " + opstatA1.hasActiveIDENTSwitch());
229229
System.out.println(" Has operational TCAS: " + opstatA1.hasOperationalTCAS());
230230
System.out.println(" Has TCAS resolution advisory: " + opstatA1.hasTCASResolutionAdvisory());
231-
System.out.println(" Uses single antenna: " + opstatA1.hasSingleAntenna());
232231
System.out.println(" Supports air-referenced velocity reports: " + opstatA1.hasAirReferencedVelocity());
233232

234233
if (msg instanceof AirborneOperationalStatusV2Msg) {
235234
System.out.println(" Gemoetric vertical accuracy: "+((AirborneOperationalStatusV2Msg) msg).getGeometricVerticalAccuracy()+"m");
236235
System.out.println(" System design assurance: " + ((AirborneOperationalStatusV2Msg) msg).getSystemDesignAssurance());
237236
System.out.println(" Has UAT in: " + ((AirborneOperationalStatusV2Msg) msg).hasUATIn());
238237
System.out.println(" Has SIL supplement: " + ((AirborneOperationalStatusV2Msg) msg).hasSILSupplement());
238+
System.out.println(" Uses single antenna: " + ((AirborneOperationalStatusV2Msg) msg).hasSingleAntenna());
239239
}
240240

241241
break;
@@ -256,11 +256,9 @@ public void decodeMsg(long timestamp, String raw, Position receiver) {
256256
System.out.println(" Has operational CDTI: " + opstatS1.hasOperationalCDTI());
257257
System.out.println(" IDENT switch active: " + opstatS1.hasActiveIDENTSwitch());
258258
System.out.println(" Has TCAS resolution advisory: " + opstatS1.hasTCASResolutionAdvisory());
259-
System.out.println(" Uses single antenna: " + opstatS1.hasSingleAntenna());
260259
System.out.println(" Airplane length: " + opstatS1.getAirplaneLength() + "m");
261260
System.out.println(" Airplane width: " + opstatS1.getAirplaneWidth() + "m");
262261
System.out.println(" Low (<70W) TX power: " + opstatS1.hasLowTxPower());
263-
System.out.println(" Encoded GPS antenna offset: " + opstatS1.getGPSAntennaOffset());
264262
System.out.println(" Has track heading info: " + opstatS1.hasTrackHeadingInfo());
265263

266264
if (msg instanceof SurfaceOperationalStatusV2Msg) {
@@ -269,6 +267,8 @@ public void decodeMsg(long timestamp, String raw, Position receiver) {
269267
System.out.println(" Navigation Accuracy Category for velocity (NACv): " + ((SurfaceOperationalStatusV2Msg) msg).getNACv());
270268
System.out.println(" Has SIL supplement: " + ((SurfaceOperationalStatusV2Msg) msg).hasSILSupplement());
271269
System.out.println(" Has UAT in: " + ((SurfaceOperationalStatusV2Msg) msg).hasUATIn());
270+
System.out.println(" Encoded GPS antenna offset: " + ((SurfaceOperationalStatusV2Msg) msg).getGPSAntennaOffset());
271+
System.out.println(" Uses single antenna: " + ((SurfaceOperationalStatusV2Msg) msg).hasSingleAntenna());
272272
}
273273

274274
break;

src/main/java/de/serosystems/lib1090/msgs/adsb/AirborneOperationalStatusV1Msg.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,6 @@ public boolean hasActiveIDENTSwitch() {
163163
return (operational_mode_code & 0x1000) != 0;
164164
}
165165

166-
/**
167-
* @return whether aircraft uses a single antenna or two
168-
*/
169-
public boolean hasSingleAntenna() {
170-
return (operational_mode_code & 0x400) != 0;
171-
}
172-
173166
/**
174167
* @return the version number of the formats and protocols in use on the aircraft installation.<br>
175168
* 0: Conformant to DO-260/ED-102 and DO-242<br>

src/main/java/de/serosystems/lib1090/msgs/adsb/AirborneOperationalStatusV2Msg.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ public boolean hasUATIn() {
9797
return (capability_class_code & 0x20) != 0;
9898
}
9999

100+
/**
101+
* @return whether aircraft uses a single antenna or two
102+
*/
103+
public boolean hasSingleAntenna() {
104+
return (operational_mode_code & 0x400) != 0;
105+
}
106+
100107
/**
101108
* @return the encoded geometric vertical accuracy (see DO-260B 2.2.3.2.7.2.8)
102109
*/

src/main/java/de/serosystems/lib1090/msgs/adsb/SurfaceOperationalStatusV1Msg.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,6 @@ public boolean hasActiveIDENTSwitch() {
154154
return (operational_mode_code & 0x1000) != 0;
155155
}
156156

157-
/**
158-
* @return whether aircraft uses a single antenna or two
159-
*/
160-
public boolean hasSingleAntenna() {
161-
return (operational_mode_code & 0x400) != 0;
162-
}
163-
164-
/**
165-
* @return encoded longitudinal distance of the GPS Antenna from the NOSE of the aircraft
166-
* (see Table A-34, RTCA DO-260B)
167-
*/
168-
public byte getGPSAntennaOffset() {
169-
return (byte) (operational_mode_code & 0xFF);
170-
}
171157

172158
/**
173159
* According to DO-260B Table 2-74. Compatible with ADS-B version 1 and 2
@@ -231,8 +217,6 @@ public byte getSIL() {
231217
return sil;
232218
}
233219

234-
// TODO use in Surface position message?
235-
236220
/**
237221
* @return the Track Angle/Heading allows correct interpretation of the data
238222
* contained in the Heading/Ground Track subfield of ADS-B Surface

src/main/java/de/serosystems/lib1090/msgs/adsb/SurfaceOperationalStatusV2Msg.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ public boolean getNICSupplementC() {
101101
return (capability_class_code & 0x10) != 0;
102102
}
103103

104+
/**
105+
* @return whether aircraft uses a single antenna or two
106+
*/
107+
public boolean hasSingleAntenna() {
108+
return (operational_mode_code & 0x400) != 0;
109+
}
110+
104111
/**
105112
* For interpretation see Table 2-65 in DO-260B
106113
*
@@ -110,6 +117,14 @@ public byte getSystemDesignAssurance() {
110117
return (byte) ((operational_mode_code & 0x300) >>> 8);
111118
}
112119

120+
/**
121+
* @return encoded longitudinal and lateral distance of the GPS Antenna from the NOSE of the aircraft
122+
* (see Table A-33 and A-34, RTCA DO-260B)
123+
*/
124+
public byte getGPSAntennaOffset() {
125+
return (byte) (operational_mode_code & 0xFF);
126+
}
127+
113128
/**
114129
* DO-260B 2.2.3.2.7.2.14
115130
*

0 commit comments

Comments
 (0)