Skip to content

GDL90: traffic report convert GNSS altitude#755

Open
PepperJo wants to merge 1 commit into
cyoung:masterfrom
PepperJo:convertaltGPSBaro
Open

GDL90: traffic report convert GNSS altitude#755
PepperJo wants to merge 1 commit into
cyoung:masterfrom
PepperJo:convertaltGPSBaro

Conversation

@PepperJo

Copy link
Copy Markdown
Contributor

GPL90 traffic reports expect barometric altitude. Convert
GNSS altitudes in traffic information to barometric altitude.
Estimate barometric altitude from reported GPS geoid height,
own geoid separation and barometric pressure.

Signed-off-by: PepperJo pepperjo@japf.ch

GPL90 traffic reports expect barometric altitude. Convert
GNSS altitudes in traffic information to barometric altitude.
Estimate barometric altitude from reported GPS geoid height,
own geoid separation and barometric pressure.

Signed-off-by: PepperJo <pepperjo@japf.ch>
@PepperJo

Copy link
Copy Markdown
Contributor Author

ping

Comment thread main/traffic.go
alt = 0x0FFF
// GDL90 expects barometric altitude in traffic reports
var baroAlt int32
if ti.AltIsGNSS {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& isGPSValid() && isTempPressValid().

Not all Stratux builds have GPS units and/or pressure sensors.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Should be discussed what to do then since the reported traffic altitude could be quite a bit off if we fall back to not adjusting it at all.

Comment thread main/traffic.go
if ti.AltIsGNSS {
// Convert from GPS geoid height to barometric altitude
baroAlt = ti.Alt - int32(mySituation.GPSGeoidSep)
baroAlt = baroAlt - int32(mySituation.GPSAltitudeMSL) + int32(mySituation.BaroPressureAltitude)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

baroAlt += -mySituation.GPSGeoidSep - mySituation.GPSAltitudeMSL + mySituation.BaroPressureAltitude

simplifies to

baroAlt += -mySituation.GPSHeightAboveEllipsoid + mySituation.BaroPressureAltitude

Seems like an interesting estimation to convert HAE to pressure altitude using local data.

One thing that is missed here is how data is passed to stratux from dump1090:

https://github.com/stratux/dump1090/blob/master/net_io.c#L569-L582

HAE delta is received and passed over as GnssDiffFromBaroAlt.

I think this PR could be rolled up into a one line change on stratux/dump1090:

https://github.com/stratux/dump1090/blob/13d61a9a3276de26322b88c99a7426a5625f592b/net_io.c#L575

Removing the Modes.use_hae condition (seems unexpected to only pass the GNSS-derived altitude when the delta is available).

Have you seen many aircraft that come through with AltIsGNSS being true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't seen any ADS-B traffic where this is set however the FLARM forks use this since FLARM reports GPS altitude. The flag was already there but was not handled. I propose we either handle this in the FLARM code and remove the flag and make clear that altitude is barometric here or we convert it.

@PepperJo

Copy link
Copy Markdown
Contributor Author

What's the verdict on this pull request? Do we want it or do we rely on every module feeding data to do their own conversion? If so we should at least clarify that the AltIsGNSS does not do any conversion but sends the data as is via GDL90 which expects baro alt. Or remove the flag as suggested above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants