B4J Code Needed

Stulish

Active Member
Licensed User
Longtime User
Hi i have a product that records serial data and audio data and saves them into zip files.

and we made playback software for PC using visual studio, but a customer wants something for a Mac, so i thought about using B4J so it would be cross platform.

The recorded zip files are saved in directories for each hour (see below):

20150430-11 This is the hour starting at 1100 on 30 April 2015
20150430-12 This is the hour starting at 1200 on 30 April 2015
20150430-13 This is the hour starting at 1300 on 30 April 2015

Within each folder should be 120 zip files if the whole hour was recorded one zip file holds the WAV audio file and one file holds the TXT serial data file (see naming format below)

SND-30042015-12590000.zip This holds the WAV file for the 1 minute of audio starting at 1259 on 30 Apr 2015.
VDR-30042015-12590000.zip This holds the text file for 1 minute of serial data starting at 1259 on 30 Apr 2015.


The software needs to allow the user to select where the data is saved and then list the available playback times (in Minutes) and allow them to select the start and stop minute, once this is complete the selected files should be extracted to a temporary directory ready for playback.

The software should then allow the user to play, pause, move forward to the start of the next minute or back to the start of the previous minute (media controls), and play the relevant audio file along with showing the serial data for each second in a textbox and show some positional/speed information.

The serial data file text structure is in the following format:

%46681
$GPGGA,125802,,N,,W, ,0,,,M,,M,,0000,3,
$GPVTG,,T,,,,N,N
$GPGGA,125802,,N,,W, ,0,,,M,,M,,0000,3,
$GPVTG,,T,,,,N,N
$PAMIs,530000000000343300000000
$GPGGA,125803,,N,,W, ,0,,,M,,M,,0000,3,
%46682
$GPVTG,,T,,,,N,N
$PAMIs,500000000000343300000000
$GPGGA,125804,,N,,W, ,0,,,M,,M,,0000,3,
%46683
$GPVTG,,T,,,,N,N
$GPGGA,125804,,N,,W, ,0,,,M,,M,,0000,3,
$GPVTG,,T,,,,N,N
$PAMIs,500000000000343200000000
$GPZDA,125805,30,04,2015,00,00,
%46684
$GPGGA,125805,,N,,W, ,0,,,M,,M,,0000,3,
$GPVTG,,T,,,,N,N
$PAMIs,350000000000343200000000
$GPGGA,125806,,N,,W, ,0,,,M,,M,,0000,3,
%46685
$GPVTG,,T,,,,N,N
$GPGGA,125806,,N,,W, ,0,,,M,,M,,0000,3,
$GPVTG,,T,,,,N,N
$PAMIs,530000000000343000000000
$GPGGA,125807,,N,,W, ,0,,,M,,M,,0000,3,
%46686

each % symbol is the start of a new second (the number after the % is the number of seconds since midnight.

The data in between is NMEA 0183 from a GPS, the software needs to decode this and show the following when playing (updating every second):

Latitude
Longitude
Speed
Heading
Date
Time

There is one more file in the directory where the folders for each hour are saved, this is a shipData.zip file; inside this zip is one text file called shipdata.txt, there should be a way for the user to open this file, a copy of this file is shown below, but it could be shown in a text box, or the app could call a native text editor to show it:

VESSEL NAME: Millenium Time
OWNER/OPERATOR: City Cruises
CALL SIGN:
IMO NUMBER:
MMSI NUMBER:
SERIAL NUMBER: MAIB1

--INFORMATION RECORDED:-------- - NMEA Sentence -----------------------------

HEADING GYRO $HEHDT,199.8,T*26

GPS TIME $GPZDA,135202.00,24,09,2010,-01,00*41
GPS GEOGRAPHIC POSITIONAL $GPGGA,135202.00,5009.1418,N,00503.2981,W,1,11,1.4,28,M,,M,,*42
GPS GROUND SPEED $GPVTG,267.3,T,269.9,M,0.0,N,0.0,K,A*27

Speed Log $VDVBW,,T,,M,00.0,N,,K*D7

DEPTH $SDDPT,0001.1,-0.0,0020*64

VHF AUDIO DEBEG - RT6322

--Equipments Installed:-------- - Serial Number------------------------------

32973 Main Unit - MI-0000 SW/V M3 2.4.3
23973 VHF Interface - MI-0000
32972 Microphones 1: - MI-0000
32972 Microphones 2: - MI-0000

Installed by ME Ltd.

Manufactured by ME Ltd.
Website: www.me.net
E-Mail: technical@me.net
28/09/10

This shouldn't be a difficult project to complete, and i am looking at a fast turn around, please message me if you are interested with cost and timings, i could also send some recorded data through for you the test.

I would look at creating this myself but just do not have time, so once you have completed the code, if you could comment (English would be nice), i could then add any changes that may be required in the future.

If you have any questions please respond and i will reply.

Many thanks
 

Roycefer

Well-Known Member
Licensed User
Longtime User
How much are you looking to spend on this project? How soon do you want it completed?
 

Stulish

Active Member
Licensed User
Longtime User
Not sure of the cost, but would want it completed ASAP a week to two, i havn't really done anything in B4J (done quite a lot in B4A) but havn't got the time myself, it would be quite a basic user interface and would basically unzip files and play the audio and data files back at the same time in chronological order, with the user being able to jump forward and backward to the start of each minute.
 

Roycefer

Well-Known Member
Licensed User
Longtime User
I'd be willing to do it for $50/hour (US). The project isn't as simple as you say. There is no good NMEA parser library for B4J or B4A so I would have to wrap an open-source Java NMEA parser for use in B4J (this one seems the best of the ones at which I've looked: https://gist.github.com/javisantana/1326141). I could probably have a working application for you to review within a week.

Here are some of my B4J libraries, if you'd like to see some of my work:
http://b4x.com/android/forum/threads/jcolorlogger-for-a-colorful-console.56003/
http://b4x.com/android/forum/threads/jawtrobot-invoke-keyboard-and-mouse-events-etc.55832/
http://b4x.com/android/forum/threads/jnativehookb4j-for-intercepting-system-input-events.55826/
 
Last edited:

Stulish

Active Member
Licensed User
Longtime User
Hi Guys,

Just to let you know the project is complete now, i actually managed to get it done myself in 3 days (then half a day to update to it would work correctly on the mac).

Having used B4A, i found using B4J really natural which made the speedy turn around possible.

Thanks for your responses, i will let you know if anything else comes up.

Regards

Stu
 
Top