simulator: replace gpssim with simple orb publication

- this is one of the last pieces of the system that still depend on DriverFramework
 - add new SIM_GPS_NOISE_X parameter for optionally increasing the GPS noise multiplier (was previously a gpssim command line option)
 - add SIM_x_BLOCK parameters to block sensor publication
   - SIM_GPS_BLOCK
   - SIM_ACCEL_BLOCK
   - SIM_GYRO_BLOCK
   - SIM_MAG_BLOCK
   - SIM_BARO_BLOCK
   - SIM_DPRES_BLOCK
This commit is contained in:
Daniel Agar
2020-01-09 10:30:20 -05:00
committed by GitHub
parent faec9fe579
commit d32a80df3a
14 changed files with 126 additions and 932 deletions
-27
View File
@@ -47,27 +47,10 @@
#include "simulator.h"
using namespace simulator;
static px4_task_t g_sim_task = -1;
Simulator *Simulator::_instance = nullptr;
Simulator *Simulator::getInstance()
{
return _instance;
}
bool Simulator::getGPSSample(uint8_t *buf, int len)
{
return _gps.copyData(buf, len);
}
void Simulator::write_gps_data(void *buf)
{
_gps.writeData(buf);
}
void Simulator::parameters_update(bool force)
{
// check for parameter updates
@@ -107,16 +90,6 @@ int Simulator::start(int argc, char *argv[])
}
}
void Simulator::set_ip(InternetProtocol ip)
{
_ip = ip;
}
void Simulator::set_port(unsigned port)
{
_port = port;
}
static void usage()
{
PX4_INFO("Usage: simulator {start -[spt] [-u udp_port / -c tcp_port] |stop}");