Skip to content

Conversation

@dacracot
Copy link
Owner

No description provided.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR replaces hardcoded latitude/longitude coordinates with environment variables in the daily.sh script. Specifically, the change updates the USNO Navy API call for celestial data on line 28 from using hardcoded coordinates 38.1035,-121.2884 (Sacramento, California) to using environment variables ${LAT},${LON}. These environment variables are sourced from the ${HOME}/.BirdNET-BarChart config file, which is created by the config.sh utility script.

This change makes the BirdNET-BarChart application more geographically flexible by allowing users to configure their specific location for accurate celestial data (sunrise/sunset times, moon phases, etc.) instead of being locked to California coordinates. The modification aligns with existing patterns in the codebase - the hourly.sh script already uses ${LAT} and ${LON} environment variables for weather API calls, so this change brings consistency across the application's location-based API interactions.

The change integrates well with the existing configuration system where users can set their coordinates through the setup process, making the celestial data calculations location-specific and more useful for users worldwide.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it's a straightforward configuration improvement
  • Score reflects a simple variable substitution that follows existing patterns and improves application flexibility
  • Pay attention to ensuring LAT and LON environment variables are properly set in the config file

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@dacracot dacracot merged commit ce0ce5a into dev Aug 11, 2025
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.

2 participants