-
-
Notifications
You must be signed in to change notification settings - Fork 22
Add dew point calculations and display to weather output #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WarningImHack3r
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to increase the count in main.go at line 182 for the live mode to still work properly
Overall though, the change is good, but I'm afraid it would unbalance the output as the icons are 7 high and this change would add an additional line at the bottom
|
|
||
| var directionSymbols = [...]string{"↑", "↗", "→", "↘", "↓", "↙", "←", "↖"} | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary unless a godoc is added here
|
|
||
| // Determine units based on config | ||
| var windSpeedUnits, tempUnit string | ||
| var windSpeedUnits, tempUnit, dewPointUnit string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just use the tempUnit as it has the same purpose and cannot be different?
| } | ||
|
|
||
| // displayWeatherArtCompact shows ASCII art with compact formatting | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one has to be removed to not unlink the godoc from the function
|
|
||
| // Prepare the text lines | ||
| textLines := make([]string, 0, 5) | ||
| textLines := make([]string, 0, 7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure it has to be increased by 2?
| func dewPointCelsius(tempC float64, humidity int) float64 { | ||
| t := tempC | ||
| rh := float64(humidity) | ||
| a := 17.27 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are a and b? I think they should be constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are from Magnus Tetens formula. And they are often called just a and b.
Where a is constant "Magnus Coefficient" and b is temperature constant. So we can call it so. Or leave it as is, they often appear in this way. What do you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like if it represents something, let’s give it a name, otherwise single letters are fine
This PR adds dew point calculations and displays the dew point value in both standard and compact weather output modes. Dew point is now calculated in Celsius or Fahrenheit based on the selected units and shown alongside other weather metrics. This feature is especially useful for users tracking humidity and comfort levels, such as during Arizona’s monsoon season
fixes #26