
Show HN: Augmented Reality App to Predict the Sun and Moon Location - folli
https://play.google.com/store/apps/details?id=com.genewarrior.sunlocator.lite
======
HelpfulNoob
Haven't tried anything like this recently so I was curious how accurate it
was.

Here are two screenshots: [http://imgur.com/a/8IM9s](http://imgur.com/a/8IM9s)

I am impressed but there is some delay and lagging behind when moving the
phone.

~~~
folli
Thanks for giving it a try!

I'm using a low pass filter on the raw sensor data to minimize any jittery
input.

The code I'm using is as follows:

    
    
      alpha = 0.1;
      output = previous_output + alpha * (new_input-previous_output);
    

If anyone knows a better way to get a stable and also current read-out, I
would be more than interested!

~~~
nitrogen
I haven't implemented one myself, but Kalman filters are frequently used for
this. Search HN's history to find several (presumably) good introductions.

~~~
rawnlq
Kalman filters can get really complicated (EKF, UKF, adaptive, etc etc) and
needs to be tuned with the correct covariances.

Complementary filters works well enough and is very simple to implement even
if you're a noob (e.g., high pass on accelerometer and low pass on gyro).

~~~
duerrp
There's a lot of libraries that do the hard work for you though... Anyway, if
an EKF is too much effort, you could also try the "Madgwick" filter:

Madgwick, S. O., Harrison, A. J., & Vaidyanathan, R. (2011). Estimation of imu
and marg orientation using a gradient descent algorithm. In Proceedings of the
IEEE International Conference on Rehabilitation Robotics

~~~
folli
The Madgwick filter seems to be popular for gyroscope applications, this might
be very helpful. Thanks!

------
positr0n
I've wanted to make a progressive web app like this for a while for gardening.
Way better execution than I could have accomplished in my spare time though!

My use case is, in the winter I want to be able to predict how many hours of
sun various spots in my yard will have during the summer so I can plan where
to plant things or dig new beds.

~~~
folli
I actually started off with quite a similar use case in mind: when I moved
into a new apartment a couple of month ago, I wanted to know how many hours of
sun the plants on the balcony will be getting and when I could expect direct
sunshine onto the balcony in the morning. And because I wanted to try my hands
at Android programming for a long time, this was a good opportunity for such a
project.

------
folli
Here's a write up with all the features and more screenshots:
[http://genewarrior.blogspot.com/2016/10/sun-locator-
predict-...](http://genewarrior.blogspot.com/2016/10/sun-locator-predict-sun-
and-moon.html)

~~~
skeletonjelly
Looks great! Any particularly useful frameworks you used? Guessing the
graphics are just OpenGL? I've started on something similar but for plane
identification (mapping user location, phone orientation, and guessing what
plane it is based on Flightradar data etc)

~~~
folli
Thanks! Yes, the graphics are OpenGL, however I haven't used any frameworks.
It's essentially a static scene showing the horizon, the elevation and azimuth
lines, and the Sun/Moon sphere, while the camera sits in the origin and points
to the location given by the compass/gyroscope.

Your project sounds cool, will you also be using OpenGL, or have you come up
with another approach? I still don't feel very comfortable using OpenGL, it's
a bit too complicated for my taste.

~~~
skeletonjelly
OpenGL. Yeah I didn't find it too great of an experience. Especially after
finding out the myriad devices that are needed to support and their different
OpenGL frameworks. Ended up just doing a PoC but gave up around the time I had
to do the actual maths. With holidays coming up maybe I'll give it another
shot. There's a company I think would find the app useful so it has a
commercial reality too! Will check back in with you to see how you're going if
I remember

------
l33tbro
Everyone in the industry tends to use Sunseeker, which is an AR sun mapping
app that's been going strong since 2009. It's great you've made this, but I'm
just not sure why I would use this over Sunseeker or Dark Sky.

~~~
folli
When I started off, I didn't intent to compete against any existing apps;
however I got quite some good feedback from friends so I decided to publish
the app anyway.

Regarding Sunseeker: give Sun Locator a chance anyways! Although I'm obviously
biased, I would say the Map view is streets ahead of sunseeker. Plus the free
(lite) version is already much more useful and the pro version is still
cheaper.

~~~
ratana
First, as the developer of one of the existing apps (Sun Surveyor) in the
space, congratulations! Long time HN lurker; never expected to see this space
come up here. My experience with it has been incredibly fulfilling, and I
never knew about Sun Seeker et all (or the difficulty involved in some
aspects) when I started or I may not have. I'd love to compare notes sometime.

Second, I see you have a lite and pro app. I'm curious what made you choose
that model; when I released my app there were no IAPs, and now it's almost too
troublesome to try to switch to that model for me. It's rare to see a non-IAP
model these days so just curious how it's working out for you and your
rationale! I certainly wish I could just have IAP.

~~~
folli
Thanks for the encouraging words! I think Sun Surveyor is undisputed the top
app in the space. It's really quite an instructive and interesting process to
publish an app, try your hands at marketing, answer requests, work around at
intricacies of different Android versions and device models. Coming from a
background in academia and research, it's very fulfilling to see your app
(even though it's comparatively simple) used by hundreds of people.

Regarding IAP: I'm not using in-app purchases. At the beginning I thought it
to be too much of an effort to implement and now it's too late. So there are
two separate apps available, the free version (shows data only for the current
day) and the paid version (shows data for any day). I think this is similar to
your app(?). I thought it would be easier to get users to try a free app and
than upgrade instead of having to buy a paid app without getting to test the
app beforehand. However the rate of people buying the pro version is rather
low (around 3-4% of Lite users purchase the Pro version; I don't know what
your experience is?)

Send me an email (contact@genewarrior.com) to compare notes, I'm definitely
interested!

------
yaur
How does this compare with photopills?

~~~
folli
I never tried photopills, I think it's iOS only. Besides the Augmented Reality
feature, Sun Locator also has a map view that shows a 3D sun dial projecting
the shadow on the chosen date/time that helps you to assess the shadow length
and direction.

One thing that I think is the main advantage over other popular sun position
apps is the ease of use, while still showing all the relevant information.

------
lorenzop
spoiler: this has nothing to do with Pokémon

