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.
 
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
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
 
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
 
Upvote 0

NGUYEN TUAN ANH

Active Member
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 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
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
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…