skeye planetarium gyroscope

213 views
Skip to first unread message

Edward Ned Harvey

unread,
Dec 24, 2011, 9:58:33 PM12/24/11
to sk...@googlegroups.com

does skeye support gyroscope?  (6 axis accelerometer, rotational) which greatly smooths the phone/tablet knowledge of position and movement?

I like google skymaps, but it's a little jittery.  The gyroscope is there for a reason...

Harshad RJ

unread,
Dec 24, 2011, 10:47:07 PM12/24/11
to sk...@googlegroups.com
Thanks for bringing it up. SkEye doesn't support gyroscopes as of now. The last time I had checked (many months back), gyros were only available in a few handsets. But these days many high-end handsets / tablets seem to have gyros along with the required sensor fusion support.

Will investigate further.

--
Harshad RJ
http://lavadip.com

Harshad RJ

unread,
Dec 27, 2011, 3:03:41 PM12/27/11
to sk...@googlegroups.com
On Sun, Dec 25, 2011 at 9:17 AM, Harshad RJ <harsh...@gmail.com> wrote:
Thanks for bringing it up. SkEye doesn't support gyroscopes as of now. The last time I had checked (many months back), gyros were only available in a few handsets. But these days many high-end handsets / tablets seem to have gyros along with the required sensor fusion support.

I spent quite some time in reading and experimenting with new code and how it works with different Android devices and OS versions.

My conclusion is that true gyroscope support has only been implemented in Android 4.0 (ICS).

I have created a test version of SkEye which uses gyroscopes only if your phone has ICS. You can download it from here:
http://lavadip.com/media/SkEye-Gyro-ICS-test.apk

Please let me know if you try it.

PS for visitors from the future: The above link will only be available for a few weeks.

rah...@gmail.com

unread,
Dec 27, 2011, 4:26:46 PM12/27/11
to sk...@googlegroups.com
What do you mean, true gyro support only implemented in 4.0?  My system is an asus transformer, running 3.2.1.  There are many apps that use the gyro.  For example, GyroRotate does a very good job of smoothing motion but it's unfortunately 90degrees off (seems they rotated the axis 90 deg in tablets versus phones, and the developer doesn't want to work on it.)  And various flight gyro simulators like New Horizons... 
AndroSensor displays raw readouts from all the sensors, including gyro.

Installing ICS test you supplied above...  Well, results are not good, but let's talk about that...

The point of a gyro is to be able to know which way is truly down, even if you're accelerating right or left or up or down.  In the initial state, it doesn't know anything...  In airplanes, when you first start the engines and you're stationary on the ground, the pilot must calibrate at that point, before taking off.  Because once you takeoff, there's no way to know which way is down anymore.  All you can feel is gravity/acceleration, and you can't trust that.  Initial calibration is necessary...

Well, sort of.  I mean, you can assume the device is not under any *constant* acceleration other than gravity.  Because this isn't an airplane gyro we're talking about and nobody's life depends on it.  You can take the average of all the readings, and assume that's an accurate representation of down.  And you can safely assume the rotational axes are the more fine-grained axes...  So you can use the average of the last n readings of direction to get direction, and use the rotational axes to get acceleration toward the believed direction...

I would ask the GyroRotate guy for his code.  He offered to give me his code so I could fix the 90 degree problem, but I think I probably acted too clueless, because he didn't give it to me actually.  I bet he would actually give it to you.  His app is extremely fast and extremely precise in determining the motion of the device.

The way I know if an app is using the gyro correctly:  I hold out the device in front of me, and I quickly turn on my heel 90 degrees or 180 degrees.  If it's not using the gyro, it will think the world tilted, like a glass of water sloshing.  If it is using the gyro, it will correctly know where the level horizon is, and it will only rotate its image of the world around my vertical axis, correctly.

The reason it matters...  Skeye and google sky maps, and all the other star charts I can find...  You point them at the sky, and they're full of jitter.  They're trusting the coarse accelerometer data too much.  The rotational axes are there to help smooth out all the jitter.  Exactly as GyroRotate does.

Is that helpful feedback?

Harshad RJ

unread,
Dec 28, 2011, 12:46:23 AM12/28/11
to sk...@googlegroups.com, rah...@gmail.com
On Wed, Dec 28, 2011 at 2:56 AM, <rah...@gmail.com> wrote:
What do you mean, true gyro support only implemented in 4.0?

Ok, so here's the whole raw deal.

Gyroscopes help measure rotation, while accelerometer measures acceleration (including that due to gravity), while compass measures the magnetic field.

Accelerometer and compass can help indicate the absolute position of a device relative to the ground, and in combination with GPS can also indicate position wrt the Earth. However they suffer from noise.

Gyros don't suffer from noise that much, but they do suffer from drift. And they can't provide absolute positions.

Hence, Gyros can't be used all by themselves in the case of SkEye (and many other applications). To use them you need to fuse the input from all three sensors using various filters and this requires complex algorithms to get right.

The correct fusion algorithms have only be implemented in ICS, according to this:
http://code.google.com/p/android/issues/detail?id=17780

I might support non-ICS devices by implementing a custom fusion algorithm, but that is a lower priority right now, since most Android devices with gyroscopes will be updateable to ICS anyway.
 
  My system is an asus transformer, running 3.2.1.  There are many apps that use the gyro.  For example, GyroRotate does a very good job of smoothing motion but it's unfortunately 90degrees off (seems they rotated the axis 90 deg in tablets versus phones, and the developer doesn't want to work on it.)

I couldn't find any app called GyroRotate on the Market. Did you mean this app called GyroscopeRotate:
https://market.android.com/details?id=com.gyro

That app seems like re-bundled sample code from the Android SDK. It doesn't do sensor fusion by itself (but will work correctly if used on ICS). It will look better than raw accelerometer and compass but the jitter, if any, won't be visible at low zoom levels such as in that app.

I tried this approach, and didn't find any sufficient improvement from the present results.
 
  And various flight gyro simulators like New Horizons... 

The zoom level is much to low here. For an app like SkEye, I need to take care of jitter on really tiny scales.

And oh, the New Horizons compass fails the rotate-the-device-by-90 degree test on my Asus Transformer with Android 3.2

Installing ICS test you supplied above...  Well, results are not good, but let's talk about that...

Did you try it on an ICS device?
 
I would ask the GyroRotate guy for his code.  He offered to give me his code so I could fix the 90 degree problem, but I think I probably acted too clueless, because he didn't give it to me actually.  I bet he would actually give it to you.  His app is extremely fast and extremely precise in determining the motion of the device.

I would love to find out. Please provide a link to this app / developer.
 
The way I know if an app is using the gyro correctly:  I hold out the device in front of me, and I quickly turn on my heel 90 degrees or 180 degrees.  If it's not using the gyro, it will think the world tilted, like a glass of water sloshing.  If it is using the gyro, it will correctly know where the level horizon is, and it will only rotate its image of the world around my vertical axis, correctly.

Yes this is one advantage of a fully integrated gyro. This is useful when you are in a moving reference frame, for example, a moving vehicle. The New Horizons app actually failed this test for me.

The reason it matters...  Skeye and google sky maps, and all the other star charts I can find...  You point them at the sky, and they're full of jitter.

Trust me, I have spent months thinking about this problem. It matters most to SkEye because it's the only app that aligns with a telescope using phone's sensors.

 
Is that helpful feedback?

Certainly, and I welcome more discussion. Thanks for bringing this topic up in the first place.. I had experimenting with gyroscopes several months back and then it had slowly slipped out of my radar.

PS. please join the group, I might forget to CC you sometimes.

cheers,

Edward Ned Harvey

unread,
Dec 28, 2011, 10:28:26 AM12/28/11
to Harshad RJ, sk...@googlegroups.com
> I couldn't find any app called GyroRotate on the Market. Did you mean this
> app called GyroscopeRotate:
> https://market.android.com/details?id=com.gyro

Yes, that's the one. After installation, the icon just says "GyroRotate."
But I recognize the icon, so it's right.


> That app seems like re-bundled sample code from the Android SDK. It
> doesn't do sensor fusion by itself (but will work correctly if used on
ICS). It
> will look better than raw accelerometer and compass but the jitter, if
any,
> won't be visible at low zoom levels such as in that app.
>
> I tried this approach, and didn't find any sufficient improvement from the
> present results.

I'm telling you, the code in Gyroscope Rotate works perfectly - extremely
accurate representation of how I actually move the tablet around, except for
the fact that it's off 90 degrees. No jitter, no lag, no "slosh," no
nothing... It's extremely smooth, extremely crisp. The 90 deg problem
presumably because it was written for a phone, but the default orientation
of a tablet is 90deg rotated - landscape instead of portrait.


> Did you try it on an ICS device?

No, I only have 3.2.1


> The New
> Horizons app actually failed this test for me.

Interesting. You're right. It fails for me too. I guess I just assumed I
previously saw it working because I left it installed. But now that I
explicitly go test it again right now... No dice.

Still, gyroscope rotate = flawless (except the 90deg rotation)


> PS. please join the group, I might forget to CC you sometimes.

I subscribed to the thread, so as long as it's a reply to this thread, I
should get it. But it looked like there is plenty of active discussion in
the group, and I'd rather just avoid the extra email...

Harshad RJ

unread,
Dec 28, 2011, 11:17:57 PM12/28/11
to Edward Ned Harvey, SkEye
On Wed, Dec 28, 2011 at 8:58 PM, Edward Ned Harvey <rah...@gmail.com> wrote:
Yes, that's the one.  After installation, the icon just says "GyroRotate."
But I recognize the icon, so it's right.

That app suffers from drift and the app description itself says that. Drift is unacceptable for an astronomy app.

And if, tomorrow that app manages to eliminate drift using sensor fusion, it doesn't have enough zoom to be able to show jitter or the lack of it.

> Did you try it on an ICS device?

No, I only have 3.2.1

Well, then you won't see an improvement as I mentioned. That version of SkEye enables gyro input only on ICS, because, I repeat, to the best of my understanding only ICS has it right.

Btw, so far, I haven't heard from anyone about the performance of this version on an ICS device.

 
Still, gyroscope rotate = flawless (except the 90deg rotation)

And except for the drift.

Reply all
Reply to author
Forward
0 new messages