(2020.8.12追è¨ãapkãæ´æ°ãã¾ãããhttp://tmizu23.hatenablog.com/entry/2020/08/09/100146 )
ã¹ããç¨ã®RTKã¢ããªãRTKGPS+ããã«ã¹ã¿ãã¤ãºãã¦ãã«ãããæ¹æ³ã§ãã
GNSSã®å¾å¦çããããã£ã㯠(PPK) ãããããã«ã¯ãåä¿¡æ©ã®Rawãã¼ã¿ãåå¾ããå¿ è¦ãããã¾ããPixcel3ãªã©ã®ã¢ã³ããã¤ãã¹ããã¨Neo-M8Tãªã©ã®RTK対å¿ã®åä¿¡æ©ãUSBã§æ¥ç¶ãã¦RTKGPS+ã使ãã¨ãRawãã¼ã¿ãç°¡åã«åå¾ã§ãã¾ãããã ããªãªã¸ãã«ã®ã¢ããªã ã¨QZSSã®ãã¼ã¿ã表示ãããªãã®ã¨ã2å¨æ³¢å¯¾å¿ã®ZED-F9Pã®åä¿¡æ©ã«å¯¾å¿ãã¦ãªããããªã®ã§ãã«ã¹ã¿ãã¤ãºãã¦ã¿ã¾ããã¤ãã§ã«ãããã«å°çé¢å°å³ã表示ã§ããããã«ãã¦ã¿ã¾ãã
â»ãªãªã¸ãã«ã®ãã®ã§ãQZSSã®Rawãã¼ã¿ã¯åå¾ã§ãã¦ãã£ã½ãã®ã§PPKã®å¦çã¯åé¡ãªãã§ããã
2å¨æ³¢è¡¨ç¤ºã¨QZSS表示ã®ãã¤ã³ãã¯ã該å½ç®æã®ã³ã¡ã³ãã¢ã¦ããå¤ããã¨ã¨ãRTKGPS+ç¨ã®ããããå½ã¦ãã°ããã£ãã ããªã®ã§ãã...ã³ã¼ããç解ãã¦ããã«æ°ãä»ãã¾ã§ãé·ãã£ã...
Android Studioã®ã¤ã³ã¹ãã¼ã«
ãã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã
RTKGPS+ã®ã³ã¼ãåå¾
git ã§ä»¥ä¸ã®ã³ãã³ãã§åå¾ãããRTKLIBãªã©é¢é£ããã¸ã§ã¯ããå«ãã¦åå¾ãããã --recursive ãå¿ è¦ãªã®ã§æ³¨æï¼
git clone --recursive https://github.com/eltorio/RtkGps.git
Android Studioã§RTKGPS+ãéã
Android Studioã§åå¾ããRtkGpsãã©ã«ããéãã¨ãèªåã§Syncããã¦è¶³ããªãã©ã¤ãã©ãªãªã©ãã¤ã³ã¹ãã¼ã«ããããã«ã¡ãã»ã¼ã¸ããã¨ã©ã¼ãã§ãã®ã§å¾ãã
å¿ è¦ãªã©ã¤ãã©ãªããããã¨ããã«ãã§ããããã«ãªããã¨ã©ã¼ã§æ¢ã¾ãã®ã§ã以ä¸ã®ã³ã¼ãã®ä¿®æ£ãããã
ç°å¢å¤æ°ãè¨å®ãã
Windowsã®ç°å¢å¤æ°ã®Pathã«ä»¥ä¸ã追å
C:\Users\mizutani\AppData\Local\Android\Sdk\ndk\20.0.559457
C:\Users\mizutani\AppData\Local\Android\Sdk\platform-tools
ãã«ããéãããã«ã³ã¼ãã®ä¿®æ£
- jni/Application.mkãä¿®æ£
APP_STLãc++_staticããå¤æ´ãAPP_ABIã追å
APP_STL := c++_shared APP_ABI := armeabi-v7a
- build.gradleãä¿®æ£
abiFiltersãarmeabi-v7a以å¤ãã³ã¡ã³ãã¢ã¦ããããï¼ã¨ãããããããã°ããããã«ãã«ããéããããããããªãªã¼ã¹æã¯ãè¦å¤æ´ï¼
defaultConfigã® packagingOptionsã« pickFirstã追å ããã
defaultConfig { applicationId "gpsplus.rtkgps" minSdkVersion 21 targetSdkVersion 26 multiDexEnabled true ããndk { abiFilters = [] abiFilters.add('armeabi-v7a') //abiFilters.add('x86') //abiFilters.add('x86_64') //abiFilters.add('arm64-v8a') } packagingOptions { pickFirst 'lib/armeabi-v7a/libc++_shared.so' pickFirst 'lib/armeabi-v7a/libproj.so' pickFirst 'lib/armeabi-v7a/librtkgps.so' pickFirst 'lib/armeabi-v7a/libntripcaster.so' pickFirst 'lib/armeabi-v7a/libgdalalljni.so' pickFirst 'lib/x86_64/libc++_shared.so' //pickFirst 'lib/x86_64/libntripcaster.so' //pickFirst 'lib/x86_64/librtkgps.so' //pickFirst 'lib/x86_64/libproj.so' //pickFirst 'lib/x86_64/libgdalalljni.so' //pickFirst 'lib/x86/libc++_shared.so' //pickFirst 'lib/x86/librtkgps.so' //pickFirst 'lib/x86/libgdalalljni.so' //pickFirst 'lib/x86/libntripcaster.so' //pickFirst 'lib/x86/libproj.so' //pickFirst 'lib/arm64-v8a/libc++_shared.so' //pickFirst 'lib/arm64-v8a/libproj.so' //pickFirst 'lib/arm64-v8a/librtkgps.so' //pickFirst 'lib/arm64-v8a/libntripcaster.so' //pickFirst 'lib/arm64-v8a/libgdalalljni.so' } ããã¨ãã¨ããã³ã¼ã }
- License.java.sampleã®å¤æ´
src/gpsplus/rtkgps/geoportail/License.java.sampleã®ãã¡ã¤ã«åãLicense.javaã«å¤æ´
QZSSã表示ã§ããããã«ã³ã¼ããä¿®æ£
jni/rtklib.mkã®RTKLIB_CFLAGSãã³ã¡ã³ãã¢ã¦ããã¦ããããã®ã«å¤æ´ï¼RtkGps+ã®ä½è ã¯QZSSãé¢ä¿ãªãå°åã®äººã ã£ãã®ããªï¼ï¼
RTKLIB_CFLAGS := -DENAGLO -DENAGAL -DENAQZS -DENACMP -DNFREQ=3 -DTRACE
ã©ã¤ãã©ãªã®ãã«ã
Android Studioã®Terminalã§RtkGps/jniã®ãã©ã«ãã«ç§»åå¾ãndk-buildã®ã³ãã³ãã§ã©ã¤ãã©ãªããã«ã
cd RtkGps/jni ndk-build
ã¢ããªã®ãã«ã
Android Studioã§ãã«ããã¿ã³ãæ¼ã
ã¢ããªã®èµ·åãã¹ã
Android Studioã§Build APKãããã¨build/outputs/debugãã©ã«ãã«apkãã§ããã®ã§ãå®éã®ã¹ããã«ã³ãã¼ãã¦ããã¡ã¤ã«ã¢ããªããéãã¦ã¤ã³ã¹ãã¼ã«ããã
ãããã°
https://okfoxy1990.com/android-apps-wifi-debug
Android Studioで開発したアプリを実機でテストする方法【初心者向け】 | TechAcademyマガジン
ä¸è¨ãåèã«ãã¦WIFIæ¥ç¶ã§ãããã°ã§ããããã«ãããUSBã¯åä¿¡æ©ãæ¥ç¶ãã¦ããã®ã§ã
éçºè ã¢ã¼ãã§USBãããã°ãæå¹ã«ãã¦ãããUSBæ¥ç¶ãã¦ã以ä¸ã®ã³ãã³ããæ㤠adb.exe tcpip 5555 USBå¤ãã¦ã以ä¸ã®ã³ãã³ããæã¤ãipã¯ã¹ããã®ipã¢ãã¬ã¹ã確èªãã¦æå® adb.exe connect 192.168.1.11
Android Studioã§å®æ©ã®ããã¤ã¹ãæå®ãã¦å®è¡ããã¨ãå®æ©ã«ã¢ããªãã¤ã³ã¹ãã¼ã«ããã¦èµ·åããã
ãããã°ã¢ã¼ãã¨ãªã£ã¦ããã®ã§Android Studioã®Logcatã¿ãã«Logãåºåãããã
ã¢ããªã®ã¤ã³ã¹ãã¼ã«
Android Studio : debugビルドとReleaseビルドの切替、releaseビルドの追加方法、署名付きapk作成方法 | 生活を良くします-怠惰なプログラミング
ä¸è¨ãåèã«ãã
RTKLIBã®æ´æ°
submoduleã¨ãªã£ã¦ããRTKLIBãæ´æ°ããã
rtklibexplorerãã¼ã¸ã§ã³ã®å ´å
cd RtkGps git submodule deinit -f jni/RTKLIB git rm -rf jni/RTKLIB rmdir /s .git\modules\jni\RTKLIB git submodule add https://github.com/rtklibexplorer/RTKLIB.git jni/RTKLIB
jni/rtklib.mkã®ä»¥ä¸ã®è¡ãåé¤
$(RTKLIB_PATH)/src/rcv/ss2.c \
jni/RTKLIB-unixsocket.patchã®ãããããã¦ã
android studioã®VCS -> Apply patch... ã§ãã¡ã¤ã«ãæå®ãã
ãªãªã¸ãã«ã®å ´å
android studioã®terminalã§ä»¥ä¸ãå®è¡ï¼ã³ãã³ãããã³ãããªã®ã§ãã©ã«ãæ¶ãã¨ãã¯rmdirï¼
cd RtkGps git submodule deinit -f jni/RTKLIB git rm -rf jni/RTKLIB rmdir /s .git\modules\jni\RTKLIB git submodule add -b rtklib_2.4.3 https://github.com/tomojitakasu/RTKLIB.git jni/RTKLIB
jni/rtklib.mkã®ä»¥ä¸ã®è¡ãåé¤
$(RTKLIB_PATH)/src/rcv/swiftnav.c \ $(RTKLIB_PATH)/src/rcv/comnav.c \
jni/prcopt.cãå¤æ´ãã(é¢åãªã®ã§ãããã®å 容)
diff --git a/jni/prcopt.c b/jni/prcopt.c index 49d6884..7b88048 100644 --- a/jni/prcopt.c +++ b/jni/prcopt.c @@ -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) @@ -352,22 +352,21 @@ 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(maxaveep, Int) - SET_FIELD(initrst, Int) - SET_FIELD(outsingle, Int) - SET_FIELD(syncsol, Int) - SET_FIELD(freqopt, Int) - + //SET_FIELD(varholdamb, Double) + //SET_FIELD(gainholdamb, Double) + //SET_FIELD(maxaveep, Int) + //SET_FIELD(initrst, Int) + //SET_FIELD(outsingle, Int) + //SET_FIELD(syncsol, Int) + //SET_FIELD(freqopt, Int) SET_FIELD(maxout, Int) SET_FIELD(minlock, Int) SET_FIELD(minfix, Int)
jni/RTKLIB-unixsocket.patchã®ãããããã¦ã
android studioã®VCS -> Apply patch... ã§ãã¡ã¤ã«ãæå®ãã
osmdroidã®æ´æ°ã¨å°çé¢å°å³ã®è¿½å
build.gradleã«osmdroidã®ææ°ãã¼ã¸ã§ã³è¿½å ããã¨ãã¨ã®osmdroidã®jarã¯åé¤ãã
dependencies { implementation 'org.osmdroid:osmdroid-android:6.1.2' ãã¨ãã¨ãã£ãã³ã¼ã }
osmdroidã®ãã¼ã¸ã§ã³ã®éãã«ããã¨ã©ã¼ãã§ãã®ã§MapFragment.javaã¾ãããä¿®æ£ãå°çé¢å°å³ã追å ãã¦geoportailã®å°å³ãåé¤ã
ä¸è¨ãå¤æ´ããRtkGps+ã®ã³ã¼ãã¯ãã¡ãã«ããã¾ãã
(2019.11.29ã追è¨ï¼apkã以ä¸ã®releaseã®ä¸ã«ã¢ãããã¦ããã¾ããã)
github.com
ãã¨ãã
ãã¨ãã¨ã®ç®çã¯ããã¼ã³ç¨å¯¾ç©ºæ¨èã®åº§æ¨æ±ºãã§ã2å¨æ³¢RTKã ã£ãã3åãããã®åä¿¡ã¨é»ååºæºç¹ã¨ã®å¾å¦çã§Fixããããï¼ã¨ããæå¾ ã§ããããçµæ5kmé¢ããé»ååºæºç¹ã§ã¯ã3åã§ã¯Fixãããæä½5åã¯å¿ è¦ã§ããããã¨ãPPKãã試ãã¦ãªãã®ã§ãRTKGps+ã使ã£ã¦2å¨æ³¢ã®RTK測ä½ã試ãããã§ãããZed-F9Pã¯1å°ãããªãã®ã§ãå®ããªã£ã¦ããããª...