Android Question Please help me wrap these libraries (in java) to run on B4A

NGUYEN TUAN ANH

Active Member
Licensed User

I want to wrap these source codes to create additional libraries for B4A to serve the purpose of scientific research on GNSS satellite positioning technology in Vietnam
I only have a small budget of 30$, please help me
Thank you very much.
1729739349769.png
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
You will not be able to use this java codes with b4i as b4i does not use java-language.

For the NTRIP-Client i can´t help. I wrote one in the past for a Customer. But as it was a paid Job i can not give out the Library.
 
Last edited:
Upvote 0

NGUYEN TUAN ANH

Active Member
Licensed User
Bạn sẽ không thể sử dụng mã Java này với b4i vì b4i không sử dụng ngôn ngữ Java.

Đối với NTRIP-Client, tôi không thể giúp được. Tôi đã từng viết một cái cho một Khách hàng. Nhưng vì đó là Công việc được trả lương nên tôi không thể cung cấp Thư viện.
PS. i have url "https://14.238.1.125:2101", when i open it on chrome browser it will automatically let me download the file "download" to my computer, could you please help me code in B4A to get this file
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

teddybear

Well-Known Member
Licensed User
Upvote 0

Sandman

Expert
Licensed User
Longtime User
The server speaks http 0.9, which is a headerless response. I have no idea if it's possible to use that out of the box with the current http libraries we have. It should be very possible to just grab it using standard network communication though, you just have to craft the GET command, which is basic stuff.

For reference, here's how to get the data using curl:
Bash:
sandman@mothership:~ curl http://14.238.1.125:2101/
curl: (1) Received HTTP/0.9 when not allowed
sandman@mothership:~ curl --http0.9 --verbose http://14.238.1.125:2101/
*   Trying 14.238.1.125:2101...
* Connected to 14.238.1.125 (14.238.1.125) port 2101 (#0)
> GET / HTTP/1.1
> Host: 14.238.1.125:2101
> User-Agent: curl/7.88.1
> Accept: */*
>
SOURCETABLE 200 OK
Server: GNSS Spider 7.7.1.9072/1.0
Date: Thu, 24 Oct 2024 12:38:23 GMT
Content-Type: text/plain
Content-Length: 2322

STR;VRS.105M6;VRS.105M6;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.105M3;VRS.105M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.103M3;VRS.103M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.104M3;VRS.104M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.104_30M3;VRS.104_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.104_45M3;VRS.104_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.105_30M3;VRS.105_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.105_45M3;VRS.105_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.106M3;VRS.106M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.106_15M3;VRS.106_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.106_30M3;VRS.106_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.107M3;VRS.107M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.107_15M3;VRS.107_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.107_30M3;VRS.107_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.107_45M3;VRS.107_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.108M3;VRS.108M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.108_15M3;VRS.108_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.108_30M3;VRS.108_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.111M6;VRS.111M6;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.WGS84;VRS.WGS84;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
ENDSOURCETABLE
* Closing connection 0
 
Upvote 0

NGUYEN TUAN ANH

Active Member
Licensed User
Máy chủ nói http 0.9, đây là phản hồi không có tiêu đề. Tôi không biết liệu có thể sử dụng nó ngay với các thư viện http hiện tại mà chúng ta có hay không. Tuy nhiên, có thể chỉ cần lấy nó bằng giao tiếp mạng tiêu chuẩn, bạn chỉ cần tạo lệnh GET, đây là lệnh cơ bản.

Để tham khảo, đây là cách lấy dữ liệu bằng curl:
Bash:
sandman@mothership:~ curl http://14.238.1.125:2101/
curl: (1) Đã nhận HTTP/0.9 khi không được phép
sandman@mothership:~ curl --http0.9 --verbose http://14.238.1.125:2101/
* Đang thử 14.238.1.125:2101...
* Đã kết nối tới cổng 14.238.1.125 (14.238.1.125) 2101 (#0)
> NHẬN / HTTP/1.1
> Máy chủ: 14.238.1.125:2101
> Tác nhân người dùng: curl/7.88.1
> Chấp nhận: */*
>
CÓ THỂ NGUỒN 200 OK
Máy chủ: GNSS Spider 7.7.1.9072/1.0
Ngày: Thứ năm, ngày 24 tháng 10 năm 2024 12:38:23 GMT
Loại nội dung: văn bản/thuần túy
Nội dung-Độ dài: 2322

STR;VRS.105M6;VRS.105M6;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.105M3;VRS.105M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.103M3;VRS.103M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.104M3;VRS.104M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.104_30M3;VRS.104_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.104_45M3;VRS.104_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.105_30M3;VRS.105_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.105_45M3;VRS.105_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.106M3;VRS.106M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.106_15M3;VRS.106_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.106_30M3;VRS.106_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.107M3;VRS.107M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.107_15M3;VRS.107_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.107_30M3;VRS.107_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.107_45M3;VRS.107_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.108M3;VRS.108M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.108_15M3;VRS.108_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.108_30M3;VRS.108_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.111M6;VRS.111M6;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.WGS84;VRS.WGS84;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
BẢNG NGUỒN CUNG CẤP CUỐI CÙNG
* Đóng kết nối 0
[/MÃ SỐ]
[/QUOTE]
Thank you, but i want to do it with B4A Code
 
Upvote 0

NGUYEN TUAN ANH

Active Member
Licensed User
You will not be able to use this java codes with b4i as b4i does not use java-language.

For the NTRIP-Client i can´t help. I wrote one in the past for a Customer. But as it was a paid Job i can not give out the Library.
Thank @DonManfred , I have V1 Ntrip Client Library, But now, i need V2 Ntrip Client Library run in B4A for research purposes.
I can send you some money as much as possible if you share with me your V2 Ntrip Clienr library. I just use it for my own use only.
I'm waiting for you.!
 
Upvote 0

emexes

Expert
Licensed User
the purpose of scientific research on GNSS satellite positioning technology in Vietnam

What are you looking to measure? Presumably something to do with relative performance of the major systems. Might be simpler to just have multiple phones or GNSS dongles, one per constellation.
 
Upvote 0

NGUYEN TUAN ANH

Active Member
Licensed User
What are you looking to measure? Presumably something to do with relative performance of the major systems. Might be simpler to just have multiple phones or GNSS dongles, one per constellation.
Thank you
We are doing a pilot project to improve the accuracy of GNSS devices for collecting data in the field using RTK (Real Time Kinematic) method. We want to utilize mobile phones to connect to our old Rover GNSS receivers, then data from mobile devices in the field will be transmitted to the database server, Please help me
 
Upvote 0

emexes

Expert
Licensed User
using RTK (Real Time Kinematic) method

I've never personally done this. My understanding was that it relies on measuring the relative phases of the signal as received at the base station and the roving station. It'd be surprising if that information was emitted by consumer GNSS chips used in mobile phones, which are presumably designed to minimize cost and power usage.

First step is to see if you can access the full NMEA datastream, see what that says.

I've gotten as far as installing and running this program:

https://play.google.com/store/apps/details?id=com.peterhohsy.nmeatools

but I'm stuck inside at the moment and so I'm not yet receiving a GPS signal and position.
 
Upvote 0

NGUYEN TUAN ANH

Active Member
Licensed User
Dự án đính kèm sử dụng JavaObject để khởi tạo org.orekit.gnss.metric.ntrip.NtripClient với máy chủ và cổng, sau đó yêu cầu bảng từ máy chủ 14.238.1.125 cổng 2101. Có vẻ như mã thực sự tải xuống bảng và bắt đầu phân tích dữ liệu nhưng sau đó bị lỗi:

B4X:
Do: org.orekit.errors.OrekitException: hệ thống dẫn đường không xác định: QZSS

Bảng đã tải xuống thực sự có tham chiếu đến QZSS....nhưng Orekit dường như không nhận ra nó (ít nhất là V12.2)

Mã mẫu:
B4X:
#Thuộc tính dự án khu vực
    #MainFormWidth: 600
    #MainFormChiều cao: 600
#Khu vực kết thúc

'https://search.maven.org/remotecontent?filepath=org/orekit/orekit/12.2/orekit-12.2.jar
#AdditionalJar: orekit-12.2

'https://hipparchus.org/downloads/hipparchus-3.1-bin.zip
#AdditionalJar: hipparchus-core-3.1
'#AdditionalJar: hipparchus-clustering-3.1
'#AdditionalJar: hipparchus-fft-3.1
'#AdditionalJar: hipparchus-optim-3.1
'#AdditionalJar: hipparchus-mẫu-3.1
'#AdditionalJar: hipparchus-stat-3.1
'#AdditionalJar: hipparchus-filtering-3.1
'#AdditionalJar: hipparchus-fitting-3.1
'#AdditionalJar: hipparchus-geometry-3.1
'#AdditionalJar: hipparchus-migration-3.1
'#AdditionalJar: hipparchus-ode-3.1

Tiểu trình_Globals
    Fx riêng tư như JFX
    Private MainForm Là Form
    Riêng tư xui Như XUI

Kết thúc Sub

Sub AppStart (Form1 là Form, Args() là String)
    MainForm = Biểu mẫu1
    MainForm.RootPane.LoadLayout("Bố cục1")
' MainForm.Hiển thị


    'http://14.238.1.125:2101
    Dim port As Int = 2101
    Dim host As String = "14.238.1.125"
    Dim quặng như JavaObject
    ore.InitializeNewInstance("org.orekit.gnss.metric.ntrip.NtripClient", Mảng(máy chủ, cổng))
    ore.RunMethod("getSourceTable", Null)
' Dim s As String = ore.RunMethod("getHost", Null)
' Nhật ký
' Proxy mờ Như JavaObject = ore.RunMethod("getProxy", Null)
' Nhật ký (proxy)


Kết thúc Sub

[/MÃ SỐ]

Đây là nội dung của bảng:
[MÃ=b4x]STR;VRS.105M6;VRS.105M6;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.105M3;VRS.105M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.103M3;VRS.103M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.104M3;VRS.104M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.104_30M3;VRS.104_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.104_45M3;VRS.104_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.105_30M3;VRS.105_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.105_45M3;VRS.105_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.106M3;VRS.106M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.106_15M3;VRS.106_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.106_30M3;VRS.106_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.107M3;VRS.107M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.107_15M3;VRS.107_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.107_30M3;VRS.107_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.107_45M3;VRS.107_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.108M3;VRS.108M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.108_15M3;VRS.108_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.108_30M3;VRS.108_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.111M6;VRS.111M6;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
STR;VRS.WGS84;VRS.WGS84;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20,67;105,53;1;1;Leica GNSS Spider;không có;B;Y;9600;
BẢNG NGUỒN CUNG CẤP CUỐI CÙNG
[/MÃ SỐ]
[/QUOTE]
Thanks you very much, i will test it
 
Upvote 0

NGUYEN TUAN ANH

Active Member
Licensed User
I've never personally done this. My understanding was that it relies on measuring the relative phases of the signal as received at the base station and the roving station. It'd be surprising if that information was emitted by consumer GNSS chips used in mobile phones, which are presumably designed to minimize cost and power usage.

First step is to see if you can access the full NMEA datastream, see what that says.

I've gotten as far as installing and running this program:

https://play.google.com/store/apps/details?id=com.peterhohsy.nmeatools

but I'm stuck inside at the moment and so I'm not yet receiving a GPS signal and position.
Maybe you misunderstood me, we do not use the Code measurement value from the phone's GNSS sensor, but we use the Phase measurement value from the GNSS receiver combined with NTrip correction from the Cors station to accurately determine the received coordinates according to the RTK measurement method, the phone is just where the application runs to process the combination between the Phase measurement value from the GNSS receiver and NTrip data.
 
Upvote 0

emexes

Expert
Licensed User
Maybe you misunderstood me, we do not use the Code measurement value from the phone's GNSS sensor, but we use the Phase measurement value from the GNSS receiver

Lol sorry yes I did misunderstand. I thought you were just using consumer mobile phone hardware. You (and Johan) are way ahead of me. I've only programmed as far as parsing NMEA sentences. 🍻
 
Last edited:
Upvote 0

NGUYEN TUAN ANH

Active Member
Licensed User
The attached project uses JavaObject to initialize org.orekit.gnss.metric.ntrip.NtripClient with the host and the port and then requests the table from host 14.238.1.125 port 2101. It seems that the code does indeed download the table and start parsing the data but then crashes:

B4X:
Caused by: org.orekit.errors.OrekitException: unknown navigation system: QZSS

The downloaded table does indeed have a reference to QZSS....but Orekit does not seem to recognize it (at least V12.2)

Sample code:
B4X:
#Region Project Attributes
    #MainFormWidth: 600
    #MainFormHeight: 600
#End Region

'https://search.maven.org/remotecontent?filepath=org/orekit/orekit/12.2/orekit-12.2.jar
#AdditionalJar: orekit-12.2

'https://hipparchus.org/downloads/hipparchus-3.1-bin.zip
#AdditionalJar: hipparchus-core-3.1
'#AdditionalJar: hipparchus-clustering-3.1
'#AdditionalJar: hipparchus-fft-3.1
'#AdditionalJar: hipparchus-optim-3.1
'#AdditionalJar: hipparchus-samples-3.1
'#AdditionalJar: hipparchus-stat-3.1
'#AdditionalJar: hipparchus-filtering-3.1
'#AdditionalJar: hipparchus-fitting-3.1
'#AdditionalJar: hipparchus-geometry-3.1
'#AdditionalJar: hipparchus-migration-3.1
'#AdditionalJar: hipparchus-ode-3.1

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
    Private xui As XUI

End Sub

Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.RootPane.LoadLayout("Layout1")
'    MainForm.Show


    'http://14.238.1.125:2101
    Dim port As Int = 2101
    Dim host As String = "14.238.1.125"
    Dim ore As JavaObject
    ore.InitializeNewInstance("org.orekit.gnss.metric.ntrip.NtripClient", Array(host, port))
    ore.RunMethod("getSourceTable", Null)
'    Dim s As String = ore.RunMethod("getHost", Null)
'    Log(s)
'    Dim proxy As JavaObject = ore.RunMethod("getProxy", Null)
'    Log(proxy)


End Sub

This is the content of the table:
B4X:
STR;VRS.105M6;VRS.105M6;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.105M3;VRS.105M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.103M3;VRS.103M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.104M3;VRS.104M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.104_30M3;VRS.104_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.104_45M3;VRS.104_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.105_30M3;VRS.105_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.105_45M3;VRS.105_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.106M3;VRS.106M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.106_15M3;VRS.106_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.106_30M3;VRS.106_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.107M3;VRS.107M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.107_15M3;VRS.107_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.107_30M3;VRS.107_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.107_45M3;VRS.107_45M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.108M3;VRS.108M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.108_15M3;VRS.108_15M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.108_30M3;VRS.108_30M3;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.111M6;VRS.111M6;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
STR;VRS.WGS84;VRS.WGS84;RTCM 3;;2;GPS+GLO+GAL+BDS+QZSS;DoSM;;20.67;105.53;1;1;Leica GNSS Spider;none;B;Y;9600;
ENDSOURCETABLE
I have run your code, i get Error org.orekit.errors.OrekitException: unknown navigation system: QZSS
But i don't know where the table is downloaded and saved ?
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
I have run your code, i get Error org.orekit.errors.OrekitException: unknown navigation system: QZSS
But i don't know where the table is downloaded and saved ?
It crashes in the Orekit code before one can get the table....it happens while it is trying to parse the table. It does not recognize QZSS in the table at the link where the table is downloaded from. I dont know if a link to a different table will yield a successful result.
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
I have run your code, i get Error org.orekit.errors.OrekitException: unknown navigation system: QZSS
But i don't know where the table is downloaded and saved ?
This is what is recognized by the library as valid Navigation Systems:

B4X:
public enum NavigationSystem {

    /** GPS. */
    GPS("GPS"),

    /** Glonass. */
    GLO("GLO", "Glonass"),

    /** Galileo. */
    GAL("GAL", "Galileo"),

    /** Beidou. */
    BDS("BDS", "Beidou"),

    /** QZNSS. */
    QZS("QZS", "QZNSS"),

    /** SBAS. */
    SBAS("SBAS"),

    /** IRNSS. */
    IRS("IRS", "IRNSS"),

    /** No navigation system for this stream. */
    EMPTY("");

The table at your link contains QZSS while the library expects QZS or QZNSS - that is what is causing the code to crash. I cannot amend the code as I am working with the compiled JAR. So, I guess the table in your link is not compatible with the library.
 
Last edited:
Upvote 0

NGUYEN TUAN ANH

Active Member
Licensed User
This is what is recognized by the library as valid Navigation Systems:

B4X:
public enum NavigationSystem {

    /** GPS. */
    GPS("GPS"),

    /** Glonass. */
    GLO("GLO", "Glonass"),

    /** Galileo. */
    GAL("GAL", "Galileo"),

    /** Beidou. */
    BDS("BDS", "Beidou"),

    /** QZNSS. */
    QZS("QZS", "QZNSS"),

    /** SBAS. */
    SBAS("SBAS"),

    /** IRNSS. */
    IRS("IRS", "IRNSS"),

    /** No navigation system for this stream. */
    EMPTY("");

The table at your link contains QZSS while the library expects QZS or QZNSS - that is what is causing the code to crash. I cannot amend the code as I am working with the compiled JAR. So, I guess the table in your link is not compatible with the library.
Yes, i know, thank you very much.!
PS. I thing the table at my link is is standard, because of Lefebure's NTrip Client App can read this table whit out error
 
Last edited:
Upvote 0
Top