Skip to content

Commit

Permalink
release: 3.4.6 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewasjon authored Apr 4, 2024
1 parent 91c310e commit a742d60
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog

## [3.4.*]
## [3.4.6] 2024-04-04
- You can optionally include/exclude which generators to build by using the CMake options `-DINCLUDE_GENERATOR_*`. By default, RTCM and SPARTN generators are included and the old SPARTN generator is excluded.
- Added support for control commands in the `example-lpp` when using `osr`, this was previously only available in when using `ssr`.

## [3.4.5] 2024-04-02
- SPARTN generator will not use provided URA epoch-time. This caused issues where only the URA timestamp would be used and because it isn't update vary frequently the corrections data would not be used.
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ find_package(OpenSSL REQUIRED)
endif (USE_OPENSSL)

add_definitions(-D_POSIX_C_SOURCE=200809L)
add_definitions(-DCLIENT_VERSION="3.4.5")
add_definitions(-DCLIENT_VERSION_INT=0x030405)
add_definitions(-DCLIENT_VERSION="3.4.6")
add_definitions(-DCLIENT_VERSION_INT=0x030406)

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_definitions(-DCOMPILER_CANNOT_DEDUCE_UNREACHABLE=1)
Expand Down
20 changes: 20 additions & 0 deletions examples/lpp/osr_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <receiver/ublox/threaded_receiver.hpp>
#include <sstream>
#include <stdexcept>

#include "control.hpp"
#include "location_information.h"

#ifdef INCLUDE_GENERATOR_RTCM
Expand All @@ -22,6 +24,7 @@ static osr_example::Format gFormat;
static generator::rtcm::MessageFilter gFilter;
static Options gOptions;
static bool gPrintRtcm;
static ControlParser gControlParser;

static std::unique_ptr<Modem_AT> gModem;
static std::unique_ptr<UReceiver> gUbloxReceiver;
Expand All @@ -43,6 +46,7 @@ static void assistance_data_callback(LPP_Client*, LPP_Transaction*, LPP_Message*
auto& ublox_options = gOptions.ublox_options;
auto& nmea_options = gOptions.nmea_options;
auto& location_information_options = gOptions.location_information_options;
auto& control_options = gOptions.control_options;

gConvertConfidence95To39 = location_information_options.convert_confidence_95_to_39;
gOverrideHorizontalConfidence = location_information_options.override_horizontal_confidence;
Expand Down Expand Up @@ -221,12 +225,28 @@ static void assistance_data_callback(LPP_Client*, LPP_Transaction*, LPP_Message*
throw std::runtime_error("Unable to request assistance data");
}

if (control_options.interface) {
printf("[control]\n");
control_options.interface->open();
control_options.interface->print_info();

gControlParser.on_cid = [&](CellID cell) {
printf("[control] cell: %ld:%ld:%ld:%llu\n", cell.mcc, cell.mnc, cell.tac, cell.cell);
gCell = cell;
client.update_assistance_data(request, gCell);
};
}

for (;;) {
struct timespec timeout;
timeout.tv_sec = 0;
timeout.tv_nsec = 1000000 * 100; // 100 ms
nanosleep(&timeout, nullptr);

if (control_options.interface) {
gControlParser.parse(control_options.interface);
}

// client.process() MUST be called at least once every second, otherwise
// ProvideLocationInformation messages will not be send to the server.
if (!client.process()) {
Expand Down

0 comments on commit a742d60

Please sign in to comment.