Skip to content

Commit

Permalink
apply updated change
Browse files Browse the repository at this point in the history
  • Loading branch information
tmizu23 committed Aug 9, 2020
1 parent 4c7ff95 commit 9516065
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 194 deletions.
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
url = git://github.com/simonlynen/android_libs.git
[submodule "jni/RTKLIB"]
path = jni/RTKLIB
url = https://github.com/rtklibexplorer/RTKLIB.git
url = https://github.com/tomojitakasu/RTKLIB.git
branch = rtklib_2.4.3
4 changes: 1 addition & 3 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
android:versionCode="26"
android:versionName="1.0 Alpha 26" >

<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="18" />
<uses-sdk />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
Expand Down
179 changes: 11 additions & 168 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,176 +1,19 @@
RtkGps+
RtkGps+ カスタムバージョン
=======

RTKLIB rtknavi port on android.
Forked from https://github.com/eltorio/RtkGps


### Features
### オリジナルからの変更点
* RTKLIBをこちらに変更 https://github.com/tomojitakasu/RTKLIB/tree/rtklib_2.4.3
* QZSSを受信できるように変更
* Mapで地理院地図を選択できるように変更

#### [rtklib][rtklib] features:

* Version pre 2.4.3b29d
* GPS, GLONASS, Galileo, QZSS, BeiDou and SBAS Navigation systems
* Single, DGPS/DGNSS, Kinematic, Static, Moving-Baseline, Fixed,
PPP-Kinematic, PPP-Static and PPP-Fixed positioning modes.
* RTK and PPP integer ambiguities resolution (PPP AR is experimental)
* GNSS formats:
RINEX 2.10,2.11,2.12 OBS/NAV/GNAV/HNAV/LNAV/QNAV, RINEX 3.00,3.01,3.02
OBS/NAV,RINEX 3.02 CLK,RTCM ver.2.3,RTCM ver.3.1 (with amendment 1-5),
RTCM ver.3.2, BINEX, NTRIP 1.0, NMEA 0183, SP3-c, ANTEX 1.4, IONEX 1.0,
NGS PCV and EMS 2.0.
* Proprietary protocotols:
NovAtel: OEM4/V/6,OEM3,OEMStar,Superstar II, Hemisphere: Eclipse,Crescent,
u-blox: LEA-4T/5T/6T, SkyTraq: S1315F, JAVAD GRIL/GREIS, Furuno
GW-10-II/III, NVS NV08C BINR, SiRF III/IV, and Trimble RT17.
* TCP/IP, NTRIP, local log file
* Support for multiple geoids (see explanation)
### おためし用apk
https://github.com/tmizu23/RtkGps/releases/download/0.2/RtkGps-release.apk

#### Android features:

* Test mode for obtaining positions from internal GPS (without any RTKLIB function)
* Bluetooth communication
* Support for internal Trimble / Spectra Precision MobileMapper 50 internal receiver (U-Blox M8N)
* USB OTG communication with speed/parity/stop configuration (ACM, PL2303 chips and alpha for FTDI chips)
* SiRF IV protocol (experimental)
* Show altitude in status view if Height/Geodetic is choosen
* Send mock location to other applications if the checkbox is ticked in the solution option screen. (Not working yet with apps using Google Maps api)
* Upload Log/Solution to Dropbox if Sync to Dropbox is ticked in the FileSettings screen. (the sync occurs after the stop of the server)
* Ability to zip files before uploading to Dropbox for reducing the data volume.
* Generate a GPX track (Output view/GPX Track tab)
* Show UTM coordinates in solution view
* Support for french Geoportail maps (cadastral parcels, roads and satellite) - needs api license key see src/gpsplus/rtkgps/geoportail/License.java.sample

#### Proj4
* Due to multiple issues (error in projection and lacks of features) Proj4J was removed and C lib proj4 was added
* All conversion are done with proj4 5.1.0
* French projections are done with IGN certified method, Lambert II extended is computed with IGN certified grid ntf_r93.gsb
* One custom proj4 specification string can be specified (take care of exact syntax).
* all standard proj4 formats and grids are included, all grids from http://download.osgeo.org/proj/proj-datumgrid-1.7.zip are also included. In other words you have access to this external files: alaska, chenyx06etrs.gsb, conus, epsg,esri, esri.extra, FL, GL27, hawaii, IGNF, MD, nad27, nad83, ntf_r93.gsb, ntv1_can.dat, null, nzgd2kgrid0005.gsb, other.extra, proj_def.dat, prvi, stgeorge, strlnc, stpaul, TN, WI, WO, world, BETA2007.gsb, egm96_15.gtx
* If you need another specific "free" or freely distributable grid or definition file, do not hesitate to drop me an email.

#### Geoids
* you can select different geoid model in "Solution Option"/Geoid model but except for embedded model (EGM96 1°x1°)

After receiving some emails for asking me how to install the geoid model, I added a new menu "Tools" in this menu you can automatically download and install
some geoid models. Take attention to the size! I think you may prefer to download this models via a Wifi connection rather than with your data plan!


you will need to place the corresponding model in the RtkGps storage (probably /storage/sdcard0/RtkGps)
the model format is RTKLIB dependent, check jni/RTKLIB/src/geoid.c
the model file MUST be one of:
```
EGM96_M150.geoid
EGM2008_M25.geoid
EGM2008_M10.geoid
GSI2000_M15.geoid
RAF09_M15x20.geoid
```

for example if you want to use EGM2008 2.5'x2.5' model you need:
```
1. download from National Geospatial Intelligence Agency the model
on august 2014 file can be found http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008/Small_Endian/Und_min2.5x2.5_egm2008_isw=82_WGS84_TideFree_SE.gz
2. extract the Und_min2.5x2.5_egm2008_isw=82_WGS84_TideFree_SE file and rename it EGM2008_M25.geoid (149Mo)
3. place this model in RtkGps storage path (where all the trace and log go), on my tools it is /storage/sdcard0/RtkGps/
```

for example if you want to use IGN RAF09 1.5'x2.5' model you need:
```
1. download from IGN wich is the french national geographical institute the model
on august 2014 file can be found http://geodesie.ign.fr/contenu/fichiers/documentation/grilles/metropole/RAF09.mnt
2. rename it RAF09_M15x20.geoid
3. place this model in RtkGps storage path (where all the trace and log go), on my tools it is /storage/sdcard0/RtkGps/
```

if you do not have the correct model or if model is inconsistent it will not show an error, rather than it will use the EGM96 1°x1° embedded model or it use ellipsoidal height.

#### Precise ephemeris
If you need precise ephemeris you have 2 ways for using them:
* Manualy: In the correction tab you select "File" and type SP3 , in the filename you put the filename of the file you provide in RtkGps directory (ending with .SP3)
* Automatically: When the server is running, hit the "Tools" menu, here you have an option to download and inject automatically the latest ultra-rapid ephemeris from IGS or simply inject them if you already have the good file.

#### NTRIP Caster
This is highly experimental, but I embedded NTRIP Caster 0.1.5. It works but I'm not satisfied of the implementation. Because it cannot shutdown cleanly.
Why?
* 1- because closing connections does not work at 100% (even in original soft), so thread do not end at 100%
* 2- because by conception of the original Caster the end is not clean, it waits for Control-C for ending and ends with exit(1)!!!
* 3- because Android lacks some pthread functions (ie: real pthread_cancel...)

So I locked the ability to stop the NTRIP Caster without closing RTKGPS+.
But if you want to test it works, on the first launch 2 files are created in RtkGps/ntripcaster/ ,you can edit them, But as is it works and can provide 3 streams:
```
/GNSS0
/GNSS1
/GNSS2
(all three sources have rtkgps as password)
```
for using with the log streams you need to set them:
```
server: 127.0.0.1
mountpoint: GNSSx
password: rtkgps (please change it)
```
On your wifi network you can use your stream on:
```
ntrip://username:password@ip_shown_in_caster_options:2101/GNSSx
(please change the login and the password)
```
#### Building on Windows
Android is Unix so it is easier to build under an Unix system. Personnaly I use MacOSX but it can be done under Windows (tested under 8.1 x86_64).
You need a correctly installed ndk (under windows I use ndk-r9d), a correctly Installed ADT (I use x86_64-20140702).
Also you will need a working Cygwin installation with make, gcc-core gcc-c++ bash at least.
Define ANDOID_NDK and ANDROID_SDK variable to their correct paths, also add ANDROID_NDK path in PATH
```
copy RtkGps\jni\simonlynen_android_libs\lapack\jni\clapack\INCLUDE\*.h to:
RtkGps\jni\simonlynen_android_libs\lapack\jni\clapack\SRC
RtkGps\jni\simonlynen_android_libs\lapack\jni\clapack\INSTALL
RtkGps\jni\simonlynen_android_libs\lapack\jni\clapack\BLAS\SRC
```
This is a workaround for the symlinks.
You also need to deactivate the use of lapack since it cannot be build under windows.
For that please modify RtkGps/jni/rtklib.mk and Android.mk for removing LAPACK flag and clapck module import (with performance issues).
now under a cygwin terminal move to your RtkGps directory and build with ```ndk-build``` command.
Under Eclipse be sure that you do not set to build the native library since it fails.

#### Translations
Contributors are welcomed for translating RTKGPS+, the translation can be easily managed on [Crowdin](https://crowdin.com/project/gpsplusrtkgps/invite).
You can freely create a translator account and with it you will be able request for a new translation.
Today target languages are English, French, Spanish, Polish, German and Russian
Current translation to this target languages [![Crowdin](https://d322cqt584bo4o.cloudfront.net/gpsplusrtkgps/localized.png)](https://crowdin.com/project/gpsplusrtkgps/invite)
[If you want this in your native language or if you want to contribute to one of the current translation, you are welcome.](https://crowdin.com/project/gpsplusrtkgps/invite)
I already made this translations:
* English (source language)
* French
* Chinese (fully translated by Yong Zhang)
* Spanish (I and Enoc Sanz Ablanedo)
* Polish (fully translated by Tomasz Robak)
* German (translated by Hagen Felix)


### Requirements

* android > 4.0
* Bluetooth or USB OTG GPS receiver supported by rtklib
* Allow mock locations in your device developer settings (optional but required for sending mock locations)
* A Dropbox account for uploading log/solution. (you will be asked for authorizing this app by Dropbox)

###### Download original version from Alexey Illarionov.
[original version](https://github.com/illarionov/RtkGps)

### Download alpha version (1.0apha23) from Google Play.

![qr](https://raw.githubusercontent.com/eltorio/RtkGps/master/qr_googleplay.png)

[Google play](https://play.google.com/store/apps/details?id=gpsplus.rtkgps)


[rtklib]: http://www.rtklib.com/

###### Binary distribution

* the latest apk with Mobile Mapper 50 and proj4 5.1.0 wich is maybe very instable can be found in bin directory, but prefer the Google Play version

###### Beta distribution

* the build 18 / 08 / 2018 (1.0alpha26) has been deployed as "BETA" on Google Play Store it is an open beta… If you want try it, but don't blame if it does not work.
Ronan
### メモ
http://tmizu23.hatenablog.com/entry/2020/08/09/100146
http://tmizu23.hatenablog.com/entry/2019/10/28/205553
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:4.0.1'
}
}
apply plugin: 'com.android.application'
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jul 27 15:54:34 CEST 2018
#Sun Aug 09 09:27:59 JST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
2 changes: 1 addition & 1 deletion jni/RTKLIB
32 changes: 16 additions & 16 deletions jni/prcopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,16 @@ void processing_options2prcopt_t(JNIEnv* env, jobject thiz, prcopt_t *dst)
GET_FIELD(modear, Int)
GET_FIELD(glomodear, Int)

GET_FIELD(gpsmodear, Int)
//GET_FIELD(gpsmodear, Int)
GET_FIELD(bdsmodear, Int)
GET_FIELD(arfilter, Int)
GET_FIELD(minfixsats, Int)
GET_FIELD(minholdsats, Int)
GET_FIELD(mindropsats, Int)
GET_FIELD(rcvstds, Int)
//GET_FIELD(arfilter, Int)
//GET_FIELD(minfixsats, Int)
//GET_FIELD(minholdsats, Int)
//GET_FIELD(mindropsats, Int)
//GET_FIELD(rcvstds, Int)
GET_FIELD(armaxiter, Int)
GET_FIELD(varholdamb, Double)
GET_FIELD(gainholdamb, Double)
//GET_FIELD(varholdamb, Double)
//GET_FIELD(gainholdamb, Double)
GET_FIELD(maxaveep, Int)
GET_FIELD(initrst, Int)
GET_FIELD(outsingle, Int)
Expand Down Expand Up @@ -352,16 +352,16 @@ static void ProcessingOptions_load_defaults(JNIEnv* env, jobject thiz)
SET_FIELD(modear, Int)
SET_FIELD(glomodear, Int)

SET_FIELD(gpsmodear, Int)
//SET_FIELD(gpsmodear, Int)
SET_FIELD(bdsmodear, Int)
SET_FIELD(arfilter, Int)
SET_FIELD(minfixsats, Int)
SET_FIELD(minholdsats, Int)
SET_FIELD(mindropsats, Int)
SET_FIELD(rcvstds, Int)
//SET_FIELD(arfilter, Int)
//SET_FIELD(minfixsats, Int)
//SET_FIELD(minholdsats, Int)
//SET_FIELD(mindropsats, Int)
//SET_FIELD(rcvstds, Int)
SET_FIELD(armaxiter, Int)
SET_FIELD(varholdamb, Double)
SET_FIELD(gainholdamb, Double)
//SET_FIELD(varholdamb, Double)
//SET_FIELD(gainholdamb, Double)
SET_FIELD(maxaveep, Int)
SET_FIELD(initrst, Int)
SET_FIELD(outsingle, Int)
Expand Down
3 changes: 1 addition & 2 deletions jni/rtklib.mk
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,10 @@ LOCAL_SRC_FILES += \
$(RTKLIB_PATH)/src/rcv/rt17.c \
$(RTKLIB_PATH)/src/rcv/septentrio.c \
$(RTKLIB_PATH)/src/rcv/skytraq.c \
$(RTKLIB_PATH)/src/rcv/swiftnav.c \
$(RTKLIB_PATH)/src/rcv/ublox.c \
$(RTKLIB_PATH)/src/rcv/cmr.c \
$(RTKLIB_PATH)/src/rcv/tersus.c \
$(RTKLIB_PATH)/src/rcv/comnav.c \
$(RTKLIB_PATH)/src/rcv/ss2.c \
LOCAL_SRC_FILES += log.c

#
Expand Down

0 comments on commit 9516065

Please sign in to comment.