Skip to content

Add altim set + WX Report + WR R + Fix LDR Bug (ERAM)#810

Open
jessie846 wants to merge 22 commits intommp:masterfrom
jessie846:add-altim-set
Open

Add altim set + WX Report + WR R + Fix LDR Bug (ERAM)#810
jessie846 wants to merge 22 commits intommp:masterfrom
jessie846:add-altim-set

Conversation

@jessie846
Copy link
Copy Markdown
Contributor

I believe there were some extra comimts like "try add text wrapping", merge branch, and update scenario files, that are causign the issue. Those can be removed as they have nothing to do with the PR. But This PR adds the altimeter set with all the working menus, except TEMPLATE as CRC doesn't have it, so subsequently I do not know what it does.

Fixed a bug with LDR, when the user would change it an LDR is would change the global LDR, that should not happen

@checkandmate1 checkandmate1 self-assigned this Feb 20, 2026
@checkandmate1 checkandmate1 self-requested a review February 20, 2026 17:40
@checkandmate1 checkandmate1 removed their assignment Feb 20, 2026
@jessie846 jessie846 marked this pull request as draft February 21, 2026 04:30
Copy link
Copy Markdown
Collaborator

@checkandmate1 checkandmate1 left a comment

Choose a reason for hiding this comment

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

Nice addition! Just a few comments:

@jessie846
Copy link
Copy Markdown
Contributor Author

@checkandmate1 ALTIM Set still looks good, everything for that should be resolved. Still working on the WX

@jessie846 jessie846 marked this pull request as ready for review February 22, 2026 03:36
Copy link
Copy Markdown
Collaborator

@checkandmate1 checkandmate1 left a comment

Choose a reason for hiding this comment

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

Some more comments, mostly minor things.

@jessie846 jessie846 changed the title Add altim set + Fix LDR Bug (ERAM) Add altim set + WX Report + WR R + Fix LDR Bug (ERAM) Feb 27, 2026
@jessie846
Copy link
Copy Markdown
Contributor Author

Done

@jessie846 jessie846 requested a review from mmp February 27, 2026 04:13
Copy link
Copy Markdown
Owner

@mmp mmp left a comment

Choose a reason for hiding this comment

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

Looks good; no further comments from me and thanks for your patience with all of the feedback! Over to @checkandmate1 for anything else before it lands.

I'd generally comment that there seems to be a lot of duplicated or very similar code between the drawing code in altim.go and wx.go and that the drawing code is fairly extensive. This might be worth a future cleanup; I don't know the ERAM code super well but am curious whether what is provided in menu.go and toolbar.go might be useful for doing this more succinctly.

// Convert 3-letter IATA to ICAO by prepending K (US convention).
icao := airport
if len(airport) == 3 {
icao = "K" + airport
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.

There's an av.DB.LookupAirport method you can use here instead: it also handles trying prepending "P" and "T" if it doesn't find a "K" airport. Then this can go away and you can just do something like:

ap, ok := av.DB.LookupAirport(airport)
if !ok {
  ... error ...
}
icao := ap.Id

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.

I should add: I pushed a fix to LookupAirport just now that handles "T" airports. (Previously it was just K and P.)

// Convert 3-letter IATA to ICAO by prepending K (US convention).
icao := airport
if len(airport) == 3 {
icao = "K" + airport
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.

(As 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.

3 participants