mikereedell / sunrisesunsetlib-java

Library for computing the sunrise/sunset from GPS coordinates and a date, in Java.
http://mikereedell.github.com/sunrisesunsetlib-java/
Apache License 2.0
299 stars 69 forks source link

Huge memory usage #15

Open akirmse opened 8 years ago

akirmse commented 8 years ago

I'm seeing production crashes where the Location class is trying to allocate 320kb, presumably for either the latitude or the longitude. Is there a reason why unlimited precision is necessary? Wouldn't double be good enough?

MenoData commented 6 years ago

I agree that double would be good enough. In general: The accuracy of astronomical calculations cannot be increased by choosing BigDecimal but by choosing another better astronomical algorithm.