Skip to content

Commit

Permalink
update to rtklib b34h
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefal committed Nov 2, 2023
1 parent 47e6a27 commit 64e9d7e
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 16 deletions.
17 changes: 17 additions & 0 deletions rtkbase_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,23 @@ upd_2.4.1() {
echo '####################'
echo 'Update from 2.4.1'
echo '####################'
upd_2.4.2 "$@"
}

upd_2.4.2() {
echo '####################'
echo 'Update from 2.4.2'
echo '####################'
${destination_directory}/tools/install.sh --user "${standard_user}" --rtkbase-requirements --unit-files
#upgrade rtklib to b34h
upgrade_rtklib
#restart str2str if it was active before upgrading rtklib
[ $str2str_active = 'active' ] && systemctl start str2str_tcp
# restart previously running services
[ $str2str_local_caster = 'active' ] && systemctl start str2str_local_ntrip_caster
[ $str2str_rtcm = 'active' ] && systemctl start str2str_rtcm_svr
[ $str2str_serial = 'active' ] && systemctl start str2str_rtcm_serial
[ $str2str_file = 'active' ] && systemctl start str2str_file
}

# standard update
Expand Down
Binary file removed tools/bin/rtklib_b34g/aarch64/convbin
Binary file not shown.
Binary file removed tools/bin/rtklib_b34g/aarch64/rtkrcv
Binary file not shown.
Binary file removed tools/bin/rtklib_b34g/aarch64/str2str
Binary file not shown.
Binary file removed tools/bin/rtklib_b34g/armv6l/convbin
Binary file not shown.
Binary file removed tools/bin/rtklib_b34g/armv6l/rtkrcv
Binary file not shown.
Binary file removed tools/bin/rtklib_b34g/armv6l/str2str
Binary file not shown.
Binary file removed tools/bin/rtklib_b34g/armv7l/convbin
Binary file not shown.
Binary file removed tools/bin/rtklib_b34g/armv7l/rtkrcv
Binary file not shown.
Binary file removed tools/bin/rtklib_b34g/armv7l/str2str
Binary file not shown.
Binary file added tools/bin/rtklib_b34h/armv7l/convbin
Binary file not shown.
Binary file added tools/bin/rtklib_b34h/armv7l/rtkrcv
Binary file not shown.
Binary file added tools/bin/rtklib_b34h/armv7l/str2str
Binary file not shown.
32 changes: 16 additions & 16 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ man_help(){
echo ' Install all dependencies like git build-essential python3-pip ...'
echo ''
echo ' -r | --rtklib'
echo ' Get RTKlib 2.4.3b34g from github and compile it.'
echo ' https://github.com/rtklibexplorer/RTKLIB/tree/b34g'
echo ' Get RTKlib 2.4.3b34h from github and compile it.'
echo ' https://github.com/rtklibexplorer/RTKLIB/tree/b34h'
echo ''
echo ' -b | --rtkbase-release'
echo ' Get last release of RTKBase:'
Expand Down Expand Up @@ -180,13 +180,13 @@ install_rtklib() {
sbc_array=('Xunlong Orange Pi Zero' 'Raspberry Pi')
#test if computer_model in sbc_array (https://stackoverflow.com/questions/3685970/check-if-a-bash-array-contains-a-value)
if printf '%s\0' "${sbc_array[@]}" | grep -Fxqz -- "${computer_model}" \
&& [[ -f "${rtkbase_path}"'/tools/bin/rtklib_b34g/'"${arch_package}"'/str2str' ]] \
&& [[ -f "${rtkbase_path}"'/tools/bin/rtklib_b34h/'"${arch_package}"'/str2str' ]] \
&& lsb_release -c | grep -qE 'buster|bullseye'
then
echo 'Copying new rtklib binary for ' "${computer_model}" ' - ' "${arch_package}"
cp "${rtkbase_path}"'/tools/bin/rtklib_b34g/'"${arch_package}"/str2str /usr/local/bin/
cp "${rtkbase_path}"'/tools/bin/rtklib_b34g/'"${arch_package}"/rtkrcv /usr/local/bin/
cp "${rtkbase_path}"'/tools/bin/rtklib_b34g/'"${arch_package}"/convbin /usr/local/bin/
cp "${rtkbase_path}"'/tools/bin/rtklib_b34h/'"${arch_package}"/str2str /usr/local/bin/
cp "${rtkbase_path}"'/tools/bin/rtklib_b34h/'"${arch_package}"/rtkrcv /usr/local/bin/
cp "${rtkbase_path}"'/tools/bin/rtklib_b34h/'"${arch_package}"/convbin /usr/local/bin/
else
echo 'No binary available for ' "${computer_model}" ' - ' "${arch_package}" '. We will build it from source'
_compil_rtklib
Expand All @@ -197,18 +197,18 @@ _compil_rtklib() {
echo '################################'
echo 'COMPILING RTKLIB'
echo '################################'
#Get Rtklib 2.4.3 b34g release
sudo -u "${RTKBASE_USER}" wget -qO - https://github.com/rtklibexplorer/RTKLIB/archive/refs/tags/b34g.tar.gz | tar -xvz
#Get Rtklib 2.4.3 b34h release
sudo -u "${RTKBASE_USER}" wget -qO - https://github.com/rtklibexplorer/RTKLIB/archive/refs/tags/b34h.tar.gz | tar -xvz
#Install Rtklib app
#TODO add correct CTARGET in makefile?
make --directory=RTKLIB-b34g/app/consapp/str2str/gcc
make --directory=RTKLIB-b34g/app/consapp/str2str/gcc install
make --directory=RTKLIB-b34g/app/consapp/rtkrcv/gcc
make --directory=RTKLIB-b34g/app/consapp/rtkrcv/gcc install
make --directory=RTKLIB-b34g/app/consapp/convbin/gcc
make --directory=RTKLIB-b34g/app/consapp/convbin/gcc install
make --directory=RTKLIB-b34h/app/consapp/str2str/gcc
make --directory=RTKLIB-b34h/app/consapp/str2str/gcc install
make --directory=RTKLIB-b34h/app/consapp/rtkrcv/gcc
make --directory=RTKLIB-b34h/app/consapp/rtkrcv/gcc install
make --directory=RTKLIB-b34h/app/consapp/convbin/gcc
make --directory=RTKLIB-b34h/app/consapp/convbin/gcc install
#deleting RTKLIB
rm -rf RTKLIB-b34g/
rm -rf RTKLIB-b34h/
}

_rtkbase_repo(){
Expand Down Expand Up @@ -333,7 +333,7 @@ rtkbase_requirements(){
echo '################################'
echo 'INSTALLING RTKBASE REQUIREMENTS'
echo '################################'
# create virtuel environnement for rtkbase
# create virtual environnement for rtkbase
sudo -u "${RTKBASE_USER}" python3 -m venv "${rtkbase_path}"/venv
python_venv="${rtkbase_path}"/venv/bin/python
platform=$(uname -m)
Expand Down

0 comments on commit 64e9d7e

Please sign in to comment.