PX4 Firmware
PX4 Autopilot Software http://px4.io
ulanding.cpp File Reference
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <poll.h>
#include <semaphore.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <termios.h>
#include <unistd.h>
#include <drivers/device/device.h>
#include <drivers/device/ringbuffer.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_range_finder.h>
#include <mathlib/mathlib.h>
#include <perf/perf_counter.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/workqueue.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <systemlib/err.h>
#include <uORB/topics/distance_sensor.h>
#include <uORB/uORB.h>
Include dependency graph for ulanding.cpp:

Go to the source code of this file.

Classes

class  Radar
 

Namespaces

 radar
 

Macros

#define ULANDING_MEASURE_INTERVAL   10_ms
 
#define ULANDING_MAX_DISTANCE   50.0f
 
#define ULANDING_MIN_DISTANCE   0.315f
 
#define ULANDING_VERSION   1
 
#define RADAR_DEFAULT_PORT   "/dev/ttyS2"
 
#define ULANDING_PACKET_HDR   254
 
#define ULANDING_BUFFER_LENGTH   18
 
#define SENS_VARIANCE   0.045f * 0.045f
 Assume standard deviation to be equal to sensor resolution. More...
 

Functions

int radar::reset (const char *port)
 Reset the driver. More...
 
int radar::start (const char *port, const uint8_t rotation)
 Start the driver. More...
 
int radar::status ()
 Print the driver status. More...
 
int radar::stop ()
 Stop the driver. More...
 
int radar::test (const char *port)
 Perform some basic functional tests on the driver; make sure we can collect data from the sensor in polled and automatic modes. More...
 
int radar::usage ()
 Prints info about the driver argument usage. More...
 
__EXPORT int ulanding_radar_main (int argc, char *argv[])
 Driver 'main' command. More...
 

Variables

Radarradar::g_dev
 

Detailed Description

Author
Jessica Stockham jessi.nosp@m.ca@a.nosp@m.erote.nosp@m.nna..nosp@m.com
Roman Bapst roman.nosp@m.@uav.nosp@m.entur.nosp@m.e.co.nosp@m.m

Driver for the uLanding radar from Aerotenna

Definition in file ulanding.cpp.

Macro Definition Documentation

◆ RADAR_DEFAULT_PORT

#define RADAR_DEFAULT_PORT   "/dev/ttyS2"

Definition at line 82 of file ulanding.cpp.

Referenced by ulanding_radar_main().

◆ SENS_VARIANCE

#define SENS_VARIANCE   0.045f * 0.045f

Assume standard deviation to be equal to sensor resolution.

Static bench tests have shown that the sensor ouput does not vary if the unit is not moved.

Definition at line 98 of file ulanding.cpp.

Referenced by Radar::collect().

◆ ULANDING_BUFFER_LENGTH

#define ULANDING_BUFFER_LENGTH   18

Definition at line 87 of file ulanding.cpp.

◆ ULANDING_MAX_DISTANCE

#define ULANDING_MAX_DISTANCE   50.0f

Definition at line 75 of file ulanding.cpp.

Referenced by Radar::collect(), and Radar::print_info().

◆ ULANDING_MEASURE_INTERVAL

#define ULANDING_MEASURE_INTERVAL   10_ms

Definition at line 74 of file ulanding.cpp.

Referenced by Radar::print_info(), and Radar::start().

◆ ULANDING_MIN_DISTANCE

#define ULANDING_MIN_DISTANCE   0.315f

Definition at line 76 of file ulanding.cpp.

Referenced by Radar::collect(), and Radar::print_info().

◆ ULANDING_PACKET_HDR

#define ULANDING_PACKET_HDR   254

Definition at line 86 of file ulanding.cpp.

Referenced by Radar::collect().

◆ ULANDING_VERSION

#define ULANDING_VERSION   1

Definition at line 77 of file ulanding.cpp.

Referenced by Radar::collect().

Function Documentation

◆ ulanding_radar_main()

__EXPORT int ulanding_radar_main ( int  argc,
char *  argv[] 
)

Driver 'main' command.

Definition at line 530 of file ulanding.cpp.

References RADAR_DEFAULT_PORT, radar::reset(), radar::start(), radar::status(), radar::stop(), radar::test(), and radar::usage().

Here is the call graph for this function: