mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-05-05 17:04:11 +00:00
Re-enable TTFF test
This commit is contained in:
parent
731d0e04eb
commit
6f140b67d1
@ -324,6 +324,8 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
|
|||||||
std::cout << "GNSS-SDR can not create message queues!" << std::endl;
|
std::cout << "GNSS-SDR can not create message queues!" << std::endl;
|
||||||
throw new std::exception();
|
throw new std::exception();
|
||||||
}
|
}
|
||||||
|
gettimeofday(&tv, NULL);
|
||||||
|
begin = tv.tv_sec * 1000000 + tv.tv_usec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -557,7 +559,9 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
|||||||
<< " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl;
|
<< " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl;
|
||||||
ttff_msgbuf ttff;
|
ttff_msgbuf ttff;
|
||||||
ttff.mtype = 1;
|
ttff.mtype = 1;
|
||||||
ttff.ttff = 0; //d_sample_counter;
|
gettimeofday(&tv, NULL);
|
||||||
|
long long int end = tv.tv_sec * 1000000 + tv.tv_usec;
|
||||||
|
ttff.ttff = static_cast<double>(end - begin) / 1000000.0;
|
||||||
send_sys_v_ttff_msg(ttff);
|
send_sys_v_ttff_msg(ttff);
|
||||||
first_fix = false;
|
first_fix = false;
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#ifndef GNSS_SDR_RTKLIB_PVT_CC_H
|
#ifndef GNSS_SDR_RTKLIB_PVT_CC_H
|
||||||
#define GNSS_SDR_RTKLIB_PVT_CC_H
|
#define GNSS_SDR_RTKLIB_PVT_CC_H
|
||||||
|
|
||||||
|
#include <ctime>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -142,6 +143,8 @@ private:
|
|||||||
double ttff;
|
double ttff;
|
||||||
} ttff_msgbuf;
|
} ttff_msgbuf;
|
||||||
bool send_sys_v_ttff_msg(ttff_msgbuf ttff);
|
bool send_sys_v_ttff_msg(ttff_msgbuf ttff);
|
||||||
|
struct timeval tv;
|
||||||
|
long long int begin;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
rtklib_pvt_cc(unsigned int nchannels,
|
rtklib_pvt_cc(unsigned int nchannels,
|
||||||
|
@ -279,8 +279,8 @@ void receive_msg()
|
|||||||
ttff_msg = msg.ttff;
|
ttff_msg = msg.ttff;
|
||||||
if( (ttff_msg != 0) && (ttff_msg != -1))
|
if( (ttff_msg != 0) && (ttff_msg != -1))
|
||||||
{
|
{
|
||||||
TTFF_v.push_back(ttff_msg / (1000.0 / decimation_factor) );
|
TTFF_v.push_back(ttff_msg);
|
||||||
LOG(INFO) << "Valid Time-To-First-Fix: " << ttff_msg / (1000.0 / decimation_factor ) << "[s]";
|
LOG(INFO) << "Valid Time-To-First-Fix: " << ttff_msg << "[s]";
|
||||||
// Stop the receiver
|
// Stop the receiver
|
||||||
while(((msqid_stop = msgget(key_stop, 0644))) == -1){}
|
while(((msqid_stop = msgget(key_stop, 0644))) == -1){}
|
||||||
double msgsend_size = sizeof(msg_stop.ttff);
|
double msgsend_size = sizeof(msg_stop.ttff);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user