Fix bearing
This commit is contained in:
parent
3d60921184
commit
ce2c219352
4 changed files with 17 additions and 20 deletions
14
.travis.yml
14
.travis.yml
|
@ -1,14 +0,0 @@
|
||||||
language: android
|
|
||||||
|
|
||||||
# Work in progress. Repo should be used for initial checkout https://github.com/osmandapp/OsmAnd-manifest/blob/master/android_build.xml
|
|
||||||
|
|
||||||
android:
|
|
||||||
components:
|
|
||||||
- tools
|
|
||||||
- platform-tools
|
|
||||||
|
|
||||||
# The BuildTools version used by your project
|
|
||||||
- build-tools-27.0.3
|
|
||||||
- android-27
|
|
||||||
|
|
||||||
script: ./gradlew test
|
|
|
@ -1,5 +1,5 @@
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
android
|
android
|
||||||
|
@ -77,6 +77,14 @@ artifacts {
|
||||||
android androidJar
|
android androidJar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
artifactId "osmand-base"
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
|
|
|
@ -168,12 +168,13 @@ public class OsmAndFormatter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFormattedAzimuth(float bearing, OsmandApplication app) {
|
public static String getFormattedAzimuth(float bearing, OsmandApplication app) {
|
||||||
int azimuth;
|
while(bearing < -180.0) {
|
||||||
if (bearing < 0.0) {
|
bearing += 360;
|
||||||
azimuth = (int) (360 + bearing);
|
|
||||||
} else {
|
|
||||||
azimuth = (int) bearing;
|
|
||||||
}
|
}
|
||||||
|
while(bearing > 360.0) {
|
||||||
|
bearing -= 360;
|
||||||
|
}
|
||||||
|
int azimuth = (int) bearing;
|
||||||
|
|
||||||
if (app.getSettings().ANGULAR_UNITS.get() == AngularConstants.MILLIRADS) {
|
if (app.getSettings().ANGULAR_UNITS.get() == AngularConstants.MILLIRADS) {
|
||||||
return (int) (azimuth * 17.4533) + " " + AngularConstants.MILLIRADS.getUnitSymbol();
|
return (int) (azimuth * 17.4533) + " " + AngularConstants.MILLIRADS.getUnitSymbol();
|
||||||
|
|
|
@ -14,6 +14,8 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
group "net.osmand"
|
||||||
|
version "1.0"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
ivy {
|
ivy {
|
||||||
|
|
Loading…
Reference in a new issue