Code Monkey home page Code Monkey logo

compass's Introduction

Compass is a sample android application which implements trivial compass functionality. It was created just as a code snippet reuse in some of my projects.

The main feature of the compass is noise filter (Low-pass filter) which make the arrow more stable in comparison to other similar applications where arrow always trembles.

You can install it from google play: https://play.google.com/store/apps/details?id=com.sevencrayons.compass

Enhancements are welcome!

TODO:

  • customization of place to point, see dev branch for details
  • better, correct graphics
  • relevant layout for different devices (tablets)
  • insert an instructon about how to calibrate device sensors

How to Build

  • launch Android Studio
  • select Open an existing Android Studio project
  • select the project folder
  • select menu Run -> Run 'app'

Articles to Learn

compass's People

Contributors

iutinvg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compass's Issues

Error:Unsupported method: BaseConfig.getApplicationIdSuffix().

Error:Unsupported method: BaseConfig.getApplicationIdSuffix().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.

Using Android Studio 3.0.1 on Linux

compilation bug

Hello,

I have this compilation error :
ERROR: This version of Android Studio cannot open this project, please retry with Android Studio 3.5 or newer.

I have the latest version of Android Studio.
You should re-install your Android Studio, and test your software with it before publishing it on github

cOMP

hey, the compass is good . but i need the background image also to rotate so that i can show the poles also .i.e north ,south,east and west. How to do it by using ur code?

Actual North direction and what showing in app is different .

Compass is not showing correct North direction. Every time it points to the different north direction which is not correct.
I open my device in any direction it should show north in the right direction.
Can you help me on this, I want to show my compass to always in the north direction, on correct north direction.

Hope to express the direction in string

if (348.75 <= bearing && bearing <= 360) {
return "N";
} else if (0 <= bearing && bearing <= 11.25) {
return "N";
} else if (11.25 < bearing && bearing <= 33.75) {
return "NNE";
} else if (33.75 < bearing && bearing <= 56.25) {
return "NE";
} else if (56.25 < bearing && bearing <= 78.75) {
return "ENE";
} else if (78.75 < bearing && bearing <= 101.25) {
return "E";
} else if (101.25 < bearing && bearing <= 123.75) {
return "ESE";
} else if (123.75 < bearing && bearing <= 146.25) {
return "SE";
} else if (146.25 < bearing && bearing <= 168.75) {
return "SSE";
} else if (168.75 < bearing && bearing <= 191.25) {
return "S";
} else if (191.25 < bearing && bearing <= 213.75) {
return "SSW";
} else if (213.75 < bearing && bearing <= 236.25) {
return "SW";
} else if (236.25 < bearing && bearing <= 258.75) {
return "WSW";
} else if (258.75 < bearing && bearing <= 281.25) {
return "W";
} else if (281.25 < bearing && bearing <= 303.75) {
return "WNW";
} else if (303.75 < bearing && bearing <= 326.25) {
return "NW";
} else if (326.25 < bearing && bearing < 348.75) {
return "NNW";
} else {
return "";
}

Point to Location

Hi, I'm trying to modify the code to point to specific location (gps latitude and longitude) but it doesn't work. How to add this funtionality?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.