Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    Aug 2013
    Location
    Italy
    Age
    38
    Posts
    3
    Rep Power
    0

    Default Electronic compass on iGO?

    In some Android devices is internal electronic compass, you can make it work with iGO?

    Pardon my English.

  2.    Advertissements


  3. #2
    Important User

    osiris4isis's Avatar
    Join Date
    Apr 2012
    Location
    Farside of the Sun
    Posts
    2,646
    Rep Power
    639

    Default

    Quote Originally Posted by waynot_mauro View Post
    In some Android devices is internal electronic compass, you can make it work with iGO?

    Pardon my English.
    Yea, Sygic Truck has the ability to use compass for accurate heading, very cool. I wish IGO soon add it.

  4. #3
    Member +
    Join Date
    Aug 2013
    Location
    spain
    Age
    47
    Posts
    90
    Rep Power
    23

    Default

    how useful can "accurate heading" be in an "on-road" navigation program?

  5. #4
    Important User

    osiris4isis's Avatar
    Join Date
    Apr 2012
    Location
    Farside of the Sun
    Posts
    2,646
    Rep Power
    639

    Default

    Quote Originally Posted by griters View Post
    how useful can "accurate heading" be in an "on-road" navigation program?
    When you rotate your unit, GPS response slow but compass fast. Nuff said, I'm not going to justify usefulness, each to his/her own.

  6. #5
    Member
    Join Date
    May 2014
    Location
    cyp
    Posts
    12
    Rep Power
    0

    Default

    Is this kind of like the apple's compass function?

  7. #6
    Important User

    osiris4isis's Avatar
    Join Date
    Apr 2012
    Location
    Farside of the Sun
    Posts
    2,646
    Rep Power
    639

    Default

    Quote Originally Posted by misterxdon View Post
    Is this kind of like the apple's compass function?
    Have no idea since I do not use/have apple product. But considering that GPS only compute direction if you are moving, having a compass as part of GPSNav doesn't hurt, just makes it better.

  8. #7
    Member
    Join Date
    May 2014
    Location
    US
    Posts
    13
    Rep Power
    0

    Default

    Quote Originally Posted by osiris4isis View Post
    Have no idea since I do not use/have apple product. But considering that GPS only compute direction if you are moving, having a compass as part of GPSNav doesn't hurt, just makes it better.
    iGO should add the function that using gps for directions when moving on road and using internal electronic compass when stop moving.

  9. #8
    Important User frontzosd's Avatar
    Join Date
    Jun 2012
    Age
    46
    Posts
    466
    Rep Power
    212

    Default

    Unfortunately, for the electronic compass, first it must be
    supported from the application.
    And after with utilities with lua code.
    Here is an example which
    Enable internal compass
    In java.
    This must be in the primo apk.


    Java example...

    import android.content.Context;
    import android.hardware.Sensor;
    import android.hardware.SensorEvent;
    import android.hardware.SensorEventListener;
    import android.hardware.SensorManager;

    public class InternalCompassOrientationProvider implements SensorEventListener, IOrientationProvider
    {
    private IOrientationConsumer mOrientationConsumer;
    private final SensorManager mSensorManager;
    private float mAzimuth;

    public InternalCompassOrientationProvider(Context context)
    {
    mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
    }

    //
    // IOrientationProvider
    //

    /**
    * Enable orientation updates from the internal compass sensor and show the compass.
    */
    @Override
    public boolean startOrientationProvider(IOrientationConsumer orientationConsumer)
    {
    mOrientationConsumer = orientationConsumer;
    boolean result = false;

    final Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);
    if (sensor != null) {
    result = mSensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI);
    }
    return result;
    }

    @Override
    public void stopOrientationProvider()
    {
    mSensorManager.unregisterListener(this);
    }

    @Override
    public float getLastKnownOrientation()
    {
    return mAzimuth;
    }

    //
    // SensorEventListener
    //

    @Override
    public void onAccuracyChanged(final Sensor sensor, final int accuracy)
    {
    // This is not interesting for us at the moment
    }

    @Override
    public void onSensorChanged(final SensorEvent event)
    {
    if (event.sensor.getType() == Sensor.TYPE_ORIENTATION) {
    if (event.values != null) {
    mAzimuth = event.values[0];
    if (mOrientationConsumer != null)
    mOrientationConsumer.onOrientationChanged(mAzimuth, this);
    }
    }
    }

  10. #9
    iGO&Becker Moderator

    Korabi's Avatar
    Join Date
    Jan 2013
    Location
    Eastern Europe
    Posts
    603
    Rep Power
    753

    Default

    Quote Originally Posted by frontzosd View Post
    Unfortunately, for the electronic compass, first it must be
    supported from the application.
    And after with utilities with lua code.
    Here is an example which
    Enable internal compass
    In java.
    This must be in the primo apk.


    Java example...

    import android.content.Context;
    import android.hardware.Sensor;
    import android.hardware.SensorEvent;
    import android.hardware.SensorEventListener;
    import android.hardware.SensorManager;

    public class InternalCompassOrientationProvider implements SensorEventListener, IOrientationProvider
    {
    private IOrientationConsumer mOrientationConsumer;
    private final SensorManager mSensorManager;
    private float mAzimuth;

    public InternalCompassOrientationProvider(Context context)
    {
    mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
    }

    //
    // IOrientationProvider
    //

    /**
    * Enable orientation updates from the internal compass sensor and show the compass.
    */
    @Override
    public boolean startOrientationProvider(IOrientationConsumer orientationConsumer)
    {
    mOrientationConsumer = orientationConsumer;
    boolean result = false;

    final Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);
    if (sensor != null) {
    result = mSensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI);
    }
    return result;
    }

    @Override
    public void stopOrientationProvider()
    {
    mSensorManager.unregisterListener(this);
    }

    @Override
    public float getLastKnownOrientation()
    {
    return mAzimuth;
    }

    //
    // SensorEventListener
    //

    @Override
    public void onAccuracyChanged(final Sensor sensor, final int accuracy)
    {
    // This is not interesting for us at the moment
    }

    @Override
    public void onSensorChanged(final SensorEvent event)
    {
    if (event.sensor.getType() == Sensor.TYPE_ORIENTATION) {
    if (event.values != null) {
    mAzimuth = event.values[0];
    if (mOrientationConsumer != null)
    mOrientationConsumer.onOrientationChanged(mAzimuth, this);
    }
    }
    }
    I do not know where you found this, or you did, but iGO will use the language program. LUA.This language, born in Brazil 20 years ago, lua = moon. is this language that you write tools iGO Win& Android. example. for compass is this :
    Code:
    Please Login or Register to see the links
    Last edited by Korabi; 6th June 2014 at 20:10.

  11. #10
    Important User frontzosd's Avatar
    Join Date
    Jun 2012
    Age
    46
    Posts
    466
    Rep Power
    212

    Default

    i mean the electronic sensor (compass) from our android device

    like Sygic....

    in Primo

    we are already use the compass , but , it comes from map , gps .

    NOT from internal sensor

    from that we need Java

 

 
Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.