Skip to content

Commit

Permalink
fix: adjust latitude and longitude precision in weather URL formatting
Browse files Browse the repository at this point in the history
- Updated the FetchWeather method in YrNoProvider to format latitude and longitude with three decimal places
  • Loading branch information
tphakala committed Jan 5, 2025
1 parent 03edf71 commit 5fb4694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/weather/provider_yrno.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type YrResponse struct {

// FetchWeather implements the Provider interface for YrNoProvider
func (p *YrNoProvider) FetchWeather(settings *conf.Settings) (*WeatherData, error) {
url := fmt.Sprintf("%s?lat=%.6f&lon=%.6f", YrNoBaseURL,
url := fmt.Sprintf("%s?lat=%.3f&lon=%.3f", YrNoBaseURL,
settings.BirdNET.Latitude,
settings.BirdNET.Longitude)

Expand Down

0 comments on commit 5fb4694

Please sign in to comment.