diff --git a/src/RadarMarpa.cpp b/src/RadarMarpa.cpp index ac2539fc..193ecdda 100644 --- a/src/RadarMarpa.cpp +++ b/src/RadarMarpa.cpp @@ -688,6 +688,7 @@ void ArpaTarget::RefreshTarget(int dist) { }*/ // PREDICTION CYCLE + m_position.time = time1; // estimated new target time delta_t = ((double)((m_position.time - prev_X.time).GetLo())) / 1000.; // in seconds if (m_status == 0) { @@ -712,7 +713,9 @@ void ArpaTarget::RefreshTarget(int dist) { return; } m_expected = pol; // save expected polar position - // Measurement cycle + + //MEASUREMENT CYCLE + // now search for the target at the expected polar position in pol int dist1 = dist; Polar back = pol; @@ -880,13 +883,14 @@ void ArpaTarget::RefreshTarget(int dist) { bool ArpaTarget::FindNearestContour(Polar* pol, int dist) { // make a search pattern along a square // returns the position of the nearest blob found in pol - // dist is search radius (1 more or less) + // dist is search radius (1 more or less) in radial pixels int a = pol->angle; int r = pol->r; if (dist < 2) dist = 2; for (int j = 1; j <= dist; j++) { int dist_r = j; int dist_a = (int)(326. / (double)r * j); // 326/r: conversion factor to make squares + // if r == 326 circle would be 28 * PI * 326 = 2048 if (dist_a == 0) dist_a = 1; for (int i = 0; i <= dist_a; i++) { // "upper" side PIX(a - i, r + dist_r); // search starting from the middle diff --git a/src/RadarMarpa.h b/src/RadarMarpa.h index 329b4eb2..cb12a924 100644 --- a/src/RadarMarpa.h +++ b/src/RadarMarpa.h @@ -51,8 +51,8 @@ class Position; #define TARGET_SEARCH_RADIUS2 (15) // radius of target search area for pass 1 #define SCAN_MARGIN (150) // number of lines that a next scan of the target may have moved #define SCAN_MARGIN2 (1000) // if target is refreshed after this time you will be shure it is the next sweep -#define MAX_CONTOUR_LENGTH (601) // defines maximal size of target contour -#define MAX_TARGET_DIAMETER (200) // target will be set lost if diameter larger than this value +#define MAX_CONTOUR_LENGTH (601) // defines maximal size of target contour in pixels +#define MAX_TARGET_DIAMETER (200) // target will be set lost if diameter in pixels is larger than this value #define MAX_LOST_COUNT (3) // number of sweeps that target can be missed before it is set to lost #define FOR_DELETION (-2) // status of a duplicate target used to delete a target diff --git a/src/navico/NavicoReceive.h b/src/navico/NavicoReceive.h index 454b5b4e..59fe10a5 100644 --- a/src/navico/NavicoReceive.h +++ b/src/navico/NavicoReceive.h @@ -56,8 +56,8 @@ class NavicoReceive : public RadarReceive { m_receive_socket = GetLocalhostServerTCPSocket(); m_send_socket = GetLocalhostSendTCPSocket(m_receive_socket); SetInfoStatus(wxString::Format(wxT("%s: %s"), m_ri->m_name.c_str(), _("Initializing"))); - - LOG_RECEIVE(wxT("radar_pi: %s receive thread created"), m_ri->m_name.c_str()); + SetPriority(wxPRIORITY_MAX); + LOG_INFO(wxT("radar_pi: %s receive thread created, prio= %i"), m_ri->m_name.c_str(), GetPriority()); }; ~NavicoReceive() {}