mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 13:20:35 +08:00
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:
@@ -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}");
|
||||
|
||||
Reference in New Issue
Block a user