Menu

#2897 Setting own tower position doesn't work

2024.1
Fixed
None
Low
2024-12-16
2024-06-09
No

FG: 2020.4
System: Linux Mint

How to reproduce

  1. Change te view to "Tower View" by "V" key
  2. Go to menu "Location" -> "Tower position"
  3. Uncheck “Always use nearest tower” and enter a different valid ICAO code than your nearest airport and click "OK" button.

Result

The view of the tower was not changed to the specified tower via ICAO code.

Expected result

The tower view should change to the specified tower via ICAO code.

Extra info

This problem does not occur in version 2020.3.19.

As far as I have noticed, in version 2020.3.19, the switching of the tower view was handled by the FGTowerLocationListener class from the positioninit.cxx file, but in version 2020.4, this class has been removed and it looks like it has not been replaced by anything.

Discussion

  • Roman Ludwicki

    Roman Ludwicki - 2024-06-10
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,7 +4,7 @@
     # How to reproduce
    
     1. Change te view to "Tower View" by "V" key
     2. Go to menu "Location" -> "Tower position"
    -3. Uncheck “Always use nearest tower” and enter a different valid ICAO code than your nearest airport.
    +3. Uncheck “Always use nearest tower” and enter a different valid ICAO code than your nearest airport and click "OK" button.
    
     # Result
     The view of the tower was not changed to the specified tower via ICAO code.
    
     
  • James Turner

    James Turner - 2024-06-10

    This is a bit odd, there's still a reference to 'initTowerLocationListener' in one file but it's not defined and never called. Would help if we can find the commit which changed this since 2020.3 and see what the intention actuall was...

     
  • James Turner

    James Turner - 2024-06-10
    • status: New --> NeedInfo
     
  • James Turner

    James Turner - 2024-06-10

    Found it : commit [522d7e] by Richard moves this logic to FGEnvironmentMgr::updateClosestAirport.

    @r-harrison can you comment on this U case?

     

    Related

    Commit: [522d7e]


    Last edit: Gijs 2024-07-12
  • James Turner

    James Turner - 2024-06-10
    • assigned_to: Richard Harrison
     
  • Richard Harrison

    • status: NeedInfo --> Started
     
    • ranguli

      ranguli - 2024-11-21

      Hi @r-harrison, any chance you would be able to give an update on the status of this issue?

      Thanks!
      Joshua

       
  • ranguli

    ranguli - 2024-11-03
    • Milestone: 2020.4 --> 2024.1
     
  • James Turner

    James Turner - 2024-12-02
    • assigned_to: Richard Harrison --> James Turner
     
  • James Turner

    James Turner - 2024-12-02

    Taking this one over: have the changes locally, jsut needs quite some testing.

     
  • Richard Harrison

    I got stuck on this because when I reintroduced the logic it caused instability and I couldn't figure out why.

    Also the dialog needs the following:

    diff --git a/gui/dialogs/location-of-tower.xml b/gui/dialogs/location-of-tower.xml
    index f9215ea8b..ea3a9621e 100644
    --- a/gui/dialogs/location-of-tower.xml
    +++ b/gui/dialogs/location-of-tower.xml
    @@ -72,6 +72,7 @@


    <input>

    • <live>true</live>
      <name>airport-id</name>
      <row>1</row>
      1
      @@ -86,6 +87,9 @@
      <property>/sim/tower/auto-position</property>

    • <binding></binding>
    • dialog-apply


    • <empty>
      <row>0</row></empty>
     
  • James Turner

    James Turner - 2024-12-06

    I've got a fix mostly done, just testing the various cases now.

     
  • Rick Gruber-Riemer

    I can help with carrier testing this one - also MP carrier - however I do not understand the error (or it is not fixed). Using latest 2024.1.1 compiled this morning.

    When I start at KSFO and change to tower view, then it it the view from KSFO tower.
    When I continue to fly, use Location->Tower View, then uncheck the "Always use closest", change the ICAO to KOAK and then hit the OK button, the view is still from KSFO tower - I would have assumed that the view then changes to KOAK tower.

     
  • James Turner

    James Turner - 2024-12-15

    The fixes are only local, I'm trying to test before I push!

     
  • James Turner

    James Turner - 2024-12-16
    • status: Started --> Fixed
     
  • James Turner

    James Turner - 2024-12-16

    Fixed on 2024.1 in FG commit 3ea4e45b4c0b2976270c47fba1d010b062869dbc

    (Needs picked to next as well)

     

Log in to post a comment.

MongoDB Logo MongoDB