Browse Source

SITL: ADSB: pass home location not string

zr-v5.1
Peter Hall 5 years ago committed by Andrew Tridgell
parent
commit
3d8a5de1f0
  1. 7
      libraries/SITL/SIM_ADSB.cpp
  2. 4
      libraries/SITL/SIM_ADSB.h

7
libraries/SITL/SIM_ADSB.cpp

@ -28,13 +28,6 @@ namespace SITL { @@ -28,13 +28,6 @@ namespace SITL {
SITL *_sitl;
ADSB::ADSB(const struct sitl_fdm &_fdm, const char *_home_str)
{
float yaw_degrees;
HALSITL::SITL_State::parse_home(_home_str, home, yaw_degrees);
}
/*
update a simulated vehicle
*/

4
libraries/SITL/SIM_ADSB.h

@ -42,14 +42,14 @@ private: @@ -42,14 +42,14 @@ private:
class ADSB {
public:
ADSB(const struct sitl_fdm &_fdm, const char *home_str);
ADSB(const struct sitl_fdm &_fdm, const Location& _home) : home(_home) {};
void update(void);
private:
const char *target_address = "127.0.0.1";
const uint16_t target_port = 5762;
Location home;
const Location& home;
uint8_t num_vehicles = 0;
static const uint8_t num_vehicles_MAX = 200;
ADSB_Vehicle vehicles[num_vehicles_MAX];

Loading…
Cancel
Save