ericberman / MyFlightbookWeb

The website and service for MyFlightbook
49 stars 18 forks source link

Night Landings not correctly calculated for Canadians #1030

Closed fkrauthan closed 1 year ago

fkrauthan commented 1 year ago

I just got my November Flight Totals email and I've noticed it says: 8 Landings (1 Night). However, the flight itself (11/18/2022) is marked with the following attributes:

In my preferences, I have Canada for my Currency computation. When I print this flight with Canadian layout I see the expected 8T 8L for night (as touch and goes count as night landing/takeoff).

However, the following places I have found so far don't show up correctly:

ericberman commented 1 year ago

Yeah , all of those places you mention are specifically telling you full stop day/night landings, regardless of currency settings. It’s really a design decision to highlight those. Partly US bias (guilty as charged but most on the system are US) but also a symmetry issue, since the day count also excludes touch and go landings. So it’s actually less of a bug and more of a question of what subsets of landings should I highlight. I have more than 50 different kinds of landings. I decided to highlight the two kinds of full stop (Day and Night) because those at the very least are universal and because they are auto detected by the apps.

ericberman commented 1 year ago

I just played with adding in night touch and go's. Not loving the density of it. image

I'm leaning towards "by design" on this. The Canadian layout lists touch&go+fullstop because both count, which makes sense. But the others are just highlighting the two kinds of full-stop landings; they're not really trying to distinguish day/night per se. Nothing inherently wrong with that.

I could also format this as a preference based on whether or not Canadian rules are selected, but I'm loathe to do that because it means passing that fact down from a lot of places in the code. Right now, that format "8 (1D, 2N)" is universal - doesn't know anything about the user who is requesting it. It also means that the "2N" would change meaning, based on preference, which is also weird.

fkrauthan commented 1 year ago

Ah ok yeah that makes sense. I guess the "ultimate" solution would be to either in all places respect the country currency standard (e.g. Canada counts touch and go as landing and takeoff) or provide a global setting to change the behavior. But I understand why that might also cause confusion and adds significant overhead.

ericberman commented 1 year ago

Yeah, note that this isn't really about currency per se. It's literally just making sure that all of the "core" fields are represented E.g., for the top row, it's literally this 1:1 mapping (2nd row too, but harder to draw the lines and keep it legible) image

Also, note that Total Landings > (Full-stop day + full-stop night). So if you have 5 landings, with 2 full-stop day and 1 full-stop night, you can infer that the other 2 landings were touch-and-go, but you can't infer whether they were night unless they were explicitly logged as such (and lots of touch&go landings go un-explicitly labeled). So treating this as the breakdown of "how many were day vs. how many were night" wouldn't work unless you were absolutely fastidious about logging night T&G landings.