Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nps_sensor_sonar.c File Reference

Simulated sonar for NPS simulator. More...

#include "nps_sensor_sonar.h"
#include "generated/airframe.h"
#include "std.h"
#include "nps_fdm.h"
#include "nps_random.h"
#include <NPS_SENSORS_PARAMS>
+ Include dependency graph for nps_sensor_sonar.c:

Go to the source code of this file.

Macros

#define NPS_SONAR_DT   0.01
 10Hz default More...
 
#define NPS_SONAR_NOISE_STD_DEV   0.01
 standard devition in meters (default 1cm) More...
 
#define NPS_SONAR_OFFSET   0
 

Functions

void nps_sensor_sonar_init (struct NpsSensorSonar *sonar, double time)
 
void nps_sensor_sonar_run_step (struct NpsSensorSonar *sonar, double time)
 

Detailed Description

Simulated sonar for NPS simulator.

Definition in file nps_sensor_sonar.c.

Macro Definition Documentation

#define NPS_SONAR_DT   0.01

10Hz default

Definition at line 40 of file nps_sensor_sonar.c.

Referenced by nps_sensor_sonar_run_step().

#define NPS_SONAR_NOISE_STD_DEV   0.01

standard devition in meters (default 1cm)

Definition at line 45 of file nps_sensor_sonar.c.

Referenced by nps_sensor_sonar_init().

#define NPS_SONAR_OFFSET   0

Definition at line 49 of file nps_sensor_sonar.c.

Referenced by nps_sensor_sonar_init().

Function Documentation

void nps_sensor_sonar_init ( struct NpsSensorSonar sonar,
double  time 
)
void nps_sensor_sonar_run_step ( struct NpsSensorSonar sonar,
double  time 
)

Definition at line 63 of file nps_sensor_sonar.c.

References NpsFdm::agl, NpsSensorSonar::data_available, fdm, get_gaussian_noise(), NpsSensorSonar::next_update, NpsSensorSonar::noise_std_dev, NPS_SONAR_DT, NpsSensorSonar::offset, TRUE, and NpsSensorSonar::value.

Referenced by nps_sensors_run_step().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: