@@ -101,9 +101,13 @@ const GDL90_Msg_FF_ID_t msgFFid = {
101
101
.ShortName = {' S' , ' o' , ' f' , ' t' , ' R' , ' F' , ' ' , ' ' },
102
102
.LongName = {' S' , ' o' , ' f' , ' t' , ' R' , ' F' ,
103
103
' ' , ' ' , ' ' , ' ' , ' ' , ' ' , ' ' , ' ' , ' ' , ' ' },
104
+ #if !defined(USE_GDL90_MSL)
105
+ .Capabilities = {0x00 , 0x00 , 0x00 , 0x00 }, /* WGS-84 ellipsoid altitude for Ownship Geometric report */
106
+ #else
104
107
.Capabilities = {0x00 , 0x00 , 0x00 , 0x01 }, /* MSL altitude for Ownship Geometric report */
108
+ #endif /* USE_GDL90_MSL */
105
109
};
106
- #endif
110
+ #endif /* DO_GDL90_FF_EXT */
107
111
108
112
/* convert a signed latitude to 2s complement ready for 24-bit packing */
109
113
static uint32_t makeLatitude (float latitude)
@@ -313,7 +317,7 @@ static void *msgOwnershipGeometricAltitude(ufo_t *aircraft)
313
317
{
314
318
uint16_t vfom = 0x000A ;
315
319
316
- #if 0
320
+ #if !defined(USE_GDL90_MSL)
317
321
/*
318
322
* The Geo Altitude field is a 16-bit signed integer that represents
319
323
* the geometric altitude (height above WGS-84 ellipsoid),
@@ -328,7 +332,7 @@ static void *msgOwnershipGeometricAltitude(ufo_t *aircraft)
328
332
* SkyDemon is the only known exception which uses WGS-84 altitude still.
329
333
*/
330
334
uint16_t altitude = (int16_t )(aircraft->altitude * _GPS_FEET_PER_METER / 5 );
331
- #endif
335
+ #endif /* USE_GDL90_MSL */
332
336
333
337
GeometricAltitude.geo_altitude = ((altitude & 0x00FF ) << 8 ) | ((altitude & 0xFF00 ) >> 8 ) ;
334
338
GeometricAltitude.VFOM = ((vfom & 0x00FF ) << 8 ) | ((vfom & 0xFF00 ) >> 8 );
0 commit comments