Skip to content

Conversation

@Aditya8369
Copy link
Contributor

@Aditya8369 Aditya8369 commented Jan 21, 2026

📌 Description

The potential division by zero bug in the ETA calculation has been successfully fixed. The change modifies the calculateBusStatistics function to use currentSpeed if it's greater than 0, otherwise fall back to averageSpeed if available, preventing division by zero when the bus is temporarily stopped but has historical speed data.

Fixes: #275


🔧 Type of Change

Please mark the relevant option(s):

  • 🐛 Bug fix
  • ✨ New feature
  • 📝 Documentation update
  • ♻️ Refactor / Code cleanup
  • 🎨 UI / Styling change
  • 🚀 Other (please describe):

🧪 How Has This Been Tested?

Describe the tests you ran to verify your changes.

  • Manual testing
  • Automated tests
  • Not tested (please explain why)

✅ Checklist

Please confirm the following:

  • My code follows the project’s coding style
  • I have tested my changes
  • I have updated documentation where necessary
  • This PR does not introduce breaking changes

@vercel
Copy link

vercel bot commented Jan 21, 2026

@Aditya8369 is attempting to deploy a commit to the Ayan manna's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@Aditya8369
Copy link
Contributor Author

@ayanmanna123 check

@vercel
Copy link

vercel bot commented Jan 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
gps-tracker Ready Ready Preview, Comment Jan 22, 2026 4:10pm

@ayanmanna123
Copy link
Owner

image image

@ayanmanna123
Copy link
Owner

fix all error

@Aditya8369
Copy link
Contributor Author

@ayanmanna123 done

@ayanmanna123
Copy link
Owner

Due to some reason, you did not get any point of this pr if now i marge this pr, I will merge it after solving the issue

@Aditya8369
Copy link
Contributor Author

@ayanmanna123 are the error not fixed? if not then what errors tell me

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.

[Bug]: Potential Division by Zero in ETA Calculation

2 participants