[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-11-02 Thread Josef Hardi
Why is it the worst?

I tried to think how to implement each idea and I came across with
these
thoughts:
1) Idea #1: Imo, the movement/sliding effect will be less smooth,
using
canvas.drawText().
2) Idea #2: Having a fixed-sized image has a limitation if the users
continue rotating more than the image can handle. What happens if the
image is already scrolled until the end side of 'W' or 'E' (from your
example).
3) Idea #3: ... Thus, to solve the limitation in Idea #2, I am
thinking
to draw the panel on-the-fly based on the changed situation. Probably
your concern is about the performance for re-drawing (?). Any better
suggestion?
4) Idea #4: I am not sure what it is. Perhaps an extension of Idea #2?

Any comments?


On Nov 2, 1:00 am, DanH danhi...@ieee.org wrote:
 Actually, I figured #3 was the worst of the lot.

  On Oct 31, 11:46 pm, DanH danhi...@ieee.org wrote:

   1) Paint the letters and hash marks under program control
   2) Have an image that goes, say W..N..E..S..W..N..E and slide it back
   and forth as needed
   3) Have images W, N, E, S, and several .. images of different
   lengths, and tile together the desired image.
   4) Have about 32 complete separate images and select one

  Thank you for the ideas. I might consider the idea #3 to re-draw the
  compass bar every time the heading changes. I found also the article
  from Adrian can be very helpful for the implementation.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-11-01 Thread Maps.Huge.Info (Maps API Guru)
I'll bet it works a lot like electronic car compasses. The one I have
in my truck (GMC) is fairly accurate but once in a great while it goes
nuts. To recalibrate the thing the manual instructs to drive in a
circle slowly. If it still doesn't work right, drive in a figure 8
slowly. Don't know why it works but it does.

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-11-01 Thread DanH
What do you tell the cop when he stops you?

On Nov 1, 12:06 pm, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
 I'll bet it works a lot like electronic car compasses. The one I have
 in my truck (GMC) is fairly accurate but once in a great while it goes
 nuts. To recalibrate the thing the manual instructs to drive in a
 circle slowly. If it still doesn't work right, drive in a figure 8
 slowly. Don't know why it works but it does.

 -John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-11-01 Thread Josef Hardi
On Oct 31, 11:46 pm, DanH danhi...@ieee.org wrote:

 1) Paint the letters and hash marks under program control
 2) Have an image that goes, say W..N..E..S..W..N..E and slide it back
 and forth as needed
 3) Have images W, N, E, S, and several .. images of different
 lengths, and tile together the desired image.
 4) Have about 32 complete separate images and select one

Thank you for the ideas. I might consider the idea #3 to re-draw the
compass bar every time the heading changes. I found also the article
from Adrian can be very helpful for the implementation.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-11-01 Thread DanH
Actually, I figured #3 was the worst of the lot.

On Nov 1, 5:46 pm, Josef Hardi josef.ha...@gmail.com wrote:
 On Oct 31, 11:46 pm, DanH danhi...@ieee.org wrote:

  1) Paint the letters and hash marks under program control
  2) Have an image that goes, say W..N..E..S..W..N..E and slide it back
  and forth as needed
  3) Have images W, N, E, S, and several .. images of different
  lengths, and tile together the desired image.
  4) Have about 32 complete separate images and select one

 Thank you for the ideas. I might consider the idea #3 to re-draw the
 compass bar every time the heading changes. I found also the article
 from Adrian can be very helpful for the implementation.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-11-01 Thread Chris Stratton
If you want it to really look like an aircraft compass, construct it
as a sphere with markings in openGL.

On Oct 31, 4:51 am, josef.hardi josef.ha...@gmail.com wrote:
 I want to create a non-generic compass that uses rotating directions
 instead of a rotating needle as in the conventional compass. The
 drawing is like the illustration below.

                     |
 ' ' W ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' '

 (shift a bit to the east)

                     |
 ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' ' ' ' W

 The needle (depict as |) is fixed and the direction string should
 have
 some sort of rotation effect that immediately relocates each sign or
 character from one tip of the edge to the opposite edge. Of course,
 the movement follows the reading of the Android sensor.

 Does anyone has an idea how to implement this? I stumbled with how
 I create the rotation effect and connect the string's movement with
 the sensor reading.

 Thanks
 /Joe

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-10-31 Thread Adrian Romanelli
Does an Android 'sensor' have a compass built in?  I thought it was
just a motion sensor, portrait/landscape, etc., and not a true
compass?

And as far as I know, the gps device is a coordinate/point location
thing, not a compass thing.

How would the phone/device actually know its facing North?

Finally, I'm not sure if this would help you out, but take a look at
this article (its in three parts, link is part one), that describes a
scrollable surface view: 
http://www.droidnova.com/create-a-scrollable-map-with-cells-part-i,654.html

Not sure if it can help you or not, but maybe a place to start?



On Oct 31, 1:51 am, josef.hardi josef.ha...@gmail.com wrote:
 I want to create a non-generic compass that uses rotating directions
 instead of a rotating needle as in the conventional compass. The
 drawing is like the illustration below.

                     |
 ' ' W ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' '

 (shift a bit to the east)

                     |
 ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' ' ' ' W

 The needle (depict as |) is fixed and the direction string should
 have
 some sort of rotation effect that immediately relocates each sign or
 character from one tip of the edge to the opposite edge. Of course,
 the movement follows the reading of the Android sensor.

 Does anyone has an idea how to implement this? I stumbled with how
 I create the rotation effect and connect the string's movement with
 the sensor reading.

 Thanks
 /Joe

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-10-31 Thread Adrian Romanelli
Just to answer my own question, Compass functionality is built into
some (all?) devices.  I noticed that the up-coming T-Mobile Comet has
compass functionality.


On Oct 31, 2:06 pm, Adrian Romanelli adrian.romane...@gmail.com
wrote:
 Does an Android 'sensor' have a compass built in?  I thought it was
 just a motion sensor, portrait/landscape, etc., and not a true
 compass?

 And as far as I know, the gps device is a coordinate/point location
 thing, not a compass thing.

 How would the phone/device actually know its facing North?

 Finally, I'm not sure if this would help you out, but take a look at
 this article (its in three parts, link is part one), that describes a
 scrollable surface 
 view:http://www.droidnova.com/create-a-scrollable-map-with-cells-part-i,65...

 Not sure if it can help you or not, but maybe a place to start?

 On Oct 31, 1:51 am, josef.hardi josef.ha...@gmail.com wrote:







  I want to create a non-generic compass that uses rotating directions
  instead of a rotating needle as in the conventional compass. The
  drawing is like the illustration below.

                      |
  ' ' W ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' '

  (shift a bit to the east)

                      |
  ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' ' ' ' W

  The needle (depict as |) is fixed and the direction string should
  have
  some sort of rotation effect that immediately relocates each sign or
  character from one tip of the edge to the opposite edge. Of course,
  the movement follows the reading of the Android sensor.

  Does anyone has an idea how to implement this? I stumbled with how
  I create the rotation effect and connect the string's movement with
  the sensor reading.

  Thanks
  /Joe

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-10-31 Thread DanH
I do wonder how accurate it could possibly be, however.  Your standard
compass can be led astray by a steel belt buckle, so it's hard to see
how a compass inside a phone, with batteries, printed circuits,
electrons whizzing around, etc, could be very accurate at all.

On Oct 31, 5:35 pm, Adrian Romanelli adrian.romane...@gmail.com
wrote:
 Just to answer my own question, Compass functionality is built into
 some (all?) devices.  I noticed that the up-coming T-Mobile Comet has
 compass functionality.

 On Oct 31, 2:06 pm, Adrian Romanelli adrian.romane...@gmail.com
 wrote:

  Does an Android 'sensor' have a compass built in?  I thought it was
  just a motion sensor, portrait/landscape, etc., and not a true
  compass?

  And as far as I know, the gps device is a coordinate/point location
  thing, not a compass thing.

  How would the phone/device actually know its facing North?

  Finally, I'm not sure if this would help you out, but take a look at
  this article (its in three parts, link is part one), that describes a
  scrollable surface 
  view:http://www.droidnova.com/create-a-scrollable-map-with-cells-part-i,65...

  Not sure if it can help you or not, but maybe a place to start?

  On Oct 31, 1:51 am, josef.hardi josef.ha...@gmail.com wrote:

   I want to create a non-generic compass that uses rotating directions
   instead of a rotating needle as in the conventional compass. The
   drawing is like the illustration below.

                       |
   ' ' W ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' '

   (shift a bit to the east)

                       |
   ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' ' ' ' W

   The needle (depict as |) is fixed and the direction string should
   have
   some sort of rotation effect that immediately relocates each sign or
   character from one tip of the edge to the opposite edge. Of course,
   the movement follows the reading of the Android sensor.

   Does anyone has an idea how to implement this? I stumbled with how
   I create the rotation effect and connect the string's movement with
   the sensor reading.

   Thanks
   /Joe

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-10-31 Thread DanH
In answer to the original query, there are four conceptual ways I can
think of to do the job:
1) Paint the letters and hash marks under program control
2) Have an image that goes, say W..N..E..S..W..N..E and slide it back
and forth as needed
3) Have images W, N, E, S, and several .. images of different
lengths, and tile together the desired image.
4) Have about 32 complete separate images and select one


On Oct 31, 3:51 am, josef.hardi josef.ha...@gmail.com wrote:
 I want to create a non-generic compass that uses rotating directions
 instead of a rotating needle as in the conventional compass. The
 drawing is like the illustration below.

                     |
 ' ' W ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' '

 (shift a bit to the east)

                     |
 ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' ' ' ' W

 The needle (depict as |) is fixed and the direction string should
 have
 some sort of rotation effect that immediately relocates each sign or
 character from one tip of the edge to the opposite edge. Of course,
 the movement follows the reading of the Android sensor.

 Does anyone has an idea how to implement this? I stumbled with how
 I create the rotation effect and connect the string's movement with
 the sensor reading.

 Thanks
 /Joe

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-10-31 Thread Bob Kerns
I may know more about magnetic compasses than some of the engineers
putting them in devices...but of course, I don't know what those
engineers are doing. But let me try to address the question in general
terms anyway.

Consider that traditionally, huge iron ships could use magnetic
compasses with fair accuracy. How did they do this? Well, you may have
seen pictures of a ship's compass, with two big iron balls on either
side of it? The purpose of those balls is to allow the local magnetic
field to be flattened, so the effect of all that iron, much of it
magnetized by arc welding, would be balanced out and made more uniform
in all directions. They are placed side-by-side, to compensate for the
fore-and-aft alignment of the ship, and independently adjustable for
compasses not on the ship's centerline.

Then once the field was flattened, the compass would be calibrated by
a specialist. As best I recall the procedure, the ship would be run
back and forth in calm waters on each heading, and the discrepancies
recorded, to be applied to headings and bearings taken using the
compass.

The ship's compass is filled with a fluid, with vanes attached below,
to provide damping and to keep it level.

All of this could better be done electronically, in software, working
from the raw sensor data.

But, of course nobody actually calibrates a phone this way. The
manufacturer's could, but I seriously doubt they do. But I don't think
there's any real reason for them to do so -- because how accurately
can you judge the orientation of your phone relative to your heading?
And without the little pin in the middle for you to sight against the
distant object, how well can you peer over your phone and just the
bearing of the distant object?

I expect that details like this outweigh any sensor accuracy issues.

As for batteries -- those should have no effect. They generally won't
have ferrous metals. The currents involved are small -- and so long as
they are relatively constant, on a reasonable timescale, at most
they'd be something that could be taken care of in the calibration
process, were there such a process.

But I wouldn't be surprised to see something like a camera flash LED
being lit, or the battery being charged, making a noticeable
difference. That could also be addressed in software, but could also
be addressed by carefully separating the sensor from the LED current.

The bottom line is, that while I think phones could be quite accurate,
I see no advantage in doing so, because if you need that kind of
accuracy, you will be better served by a compass with a physical
package designed for the purpose. These days, many of those are
electronic using the same technologies as are found in the phone. You
can get them built into binoculars, even.

On Oct 31, 3:39 pm, DanH danhi...@ieee.org wrote:
 I do wonder how accurate it could possibly be, however.  Your standard
 compass can be led astray by a steel belt buckle, so it's hard to see
 how a compass inside a phone, with batteries, printed circuits,
 electrons whizzing around, etc, could be very accurate at all.

 On Oct 31, 5:35 pm, Adrian Romanelli adrian.romane...@gmail.com
 wrote:







  Just to answer my own question, Compass functionality is built into
  some (all?) devices.  I noticed that the up-coming T-Mobile Comet has
  compass functionality.

  On Oct 31, 2:06 pm, Adrian Romanelli adrian.romane...@gmail.com
  wrote:

   Does an Android 'sensor' have a compass built in?  I thought it was
   just a motion sensor, portrait/landscape, etc., and not a true
   compass?

   And as far as I know, the gps device is a coordinate/point location
   thing, not a compass thing.

   How would the phone/device actually know its facing North?

   Finally, I'm not sure if this would help you out, but take a look at
   this article (its in three parts, link is part one), that describes a
   scrollable surface 
   view:http://www.droidnova.com/create-a-scrollable-map-with-cells-part-i,65...

   Not sure if it can help you or not, but maybe a place to start?

   On Oct 31, 1:51 am, josef.hardi josef.ha...@gmail.com wrote:

I want to create a non-generic compass that uses rotating directions
instead of a rotating needle as in the conventional compass. The
drawing is like the illustration below.

                    |
' ' W ' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' '

(shift a bit to the east)

                    |
' ' ' ' ' N ' ' ' ' ' E ' ' ' ' ' S ' ' ' ' ' W

The needle (depict as |) is fixed and the direction string should
have
some sort of rotation effect that immediately relocates each sign or
character from one tip of the edge to the opposite edge. Of course,
the movement follows the reading of the Android sensor.

Does anyone has an idea how to implement this? I stumbled with how
I create the rotation effect and connect the string's movement with
the sensor reading.

Thanks
/Joe

-- 
You received this message