apps4av / avare

Avare Aviation GPS for Android
Other
154 stars 121 forks source link

Loss of Restricted area information #386

Open n251ea opened 4 years ago

n251ea commented 4 years ago

When selecting "use ADS-B weather" from the preferences options you lose the text display of any restricted airspace when long pressing on the screen on or near the Restricted airspace. If you disable "use ADS-B weather" the information for the restricted airspace is displayed.

I don't believe Restricted airspace is transmitted over ADS-B (FIS-B) were as TFR data is/should be.

One picture is with ADS-B wx enabled the other is not, notice the loss of the special use airspaces and alert airspaces.

Screenshot_20210206-162700_Avare Screenshot_20210206-162637_Avare

besidethewoods commented 2 years ago

So I am not and Android of Java programmer so I haven't been able to try out a fix for this issue. But poking around in the code I noticed a few things I would like to suggest as a possible solution.

In LocationView.java, there is a call in a conditional if(mPref.useAdsbWeather()).

sua = mService.getAdsbWeather().getSua();

Further up in the code in the conditional if(!mPref.useAdsbWeather()).

sua = mService.getDBResource().getSua(lon, lat);

So maybe the fix is as simple as adding (lon, lat) to the adsbweather getSua call? Or if getAdsbWeather doesn't have the functionality to call .getSua than just use the getDBResource()? I am a bit lost on how the class structure funcitonality operate in Java/Avare.

Again apologies that I have not figured out how to build and test a possible solution.