PX4 Firmware
PX4 Autopilot Software http://px4.io
launchdetection::CatapultLaunchMethod Class Reference

#include <CatapultLaunchMethod.h>

Inheritance diagram for launchdetection::CatapultLaunchMethod:
Collaboration diagram for launchdetection::CatapultLaunchMethod:

Public Member Functions

 CatapultLaunchMethod (ModuleParams *parent)
 
 ~CatapultLaunchMethod () override=default
 
void update (float accel_x) override
 
LaunchDetectionResult getLaunchDetected () const override
 
void reset () override
 
float getPitchMax (float pitchMaxDefault) override
 
- Public Member Functions inherited from launchdetection::LaunchMethod
virtual ~LaunchMethod ()=default
 

Private Attributes

hrt_abstime _last_timestamp {0}
 
float _integrator {0.0f}
 
float _motorDelayCounter {0.0f}
 
LaunchDetectionResult state {LAUNCHDETECTION_RES_NONE}
 

Detailed Description

Definition at line 52 of file CatapultLaunchMethod.h.

Constructor & Destructor Documentation

◆ CatapultLaunchMethod()

launchdetection::CatapultLaunchMethod::CatapultLaunchMethod ( ModuleParams *  parent)

Definition at line 49 of file CatapultLaunchMethod.cpp.

References _last_timestamp, and hrt_absolute_time().

Here is the call graph for this function:

◆ ~CatapultLaunchMethod()

launchdetection::CatapultLaunchMethod::~CatapultLaunchMethod ( )
overridedefault

Member Function Documentation

◆ getLaunchDetected()

LaunchDetectionResult launchdetection::CatapultLaunchMethod::getLaunchDetected ( ) const
overridevirtual

Implements launchdetection::LaunchMethod.

Definition at line 104 of file CatapultLaunchMethod.cpp.

References state.

◆ getPitchMax()

float launchdetection::CatapultLaunchMethod::getPitchMax ( float  pitchMaxDefault)
overridevirtual

◆ reset()

void launchdetection::CatapultLaunchMethod::reset ( void  )
overridevirtual

Implements launchdetection::LaunchMethod.

Definition at line 109 of file CatapultLaunchMethod.cpp.

References _integrator, _motorDelayCounter, launchdetection::LAUNCHDETECTION_RES_NONE, and state.

Referenced by update().

Here is the caller graph for this function:

◆ update()

void launchdetection::CatapultLaunchMethod::update ( float  accel_x)
overridevirtual

Implements launchdetection::LaunchMethod.

Definition at line 55 of file CatapultLaunchMethod.cpp.

References _integrator, _last_timestamp, _motorDelayCounter, dt, f(), hrt_absolute_time(), hrt_elapsed_time(), launchdetection::LAUNCHDETECTION_RES_DETECTED_ENABLECONTROL, launchdetection::LAUNCHDETECTION_RES_DETECTED_ENABLEMOTORS, launchdetection::LAUNCHDETECTION_RES_NONE, reset(), and state.

Here is the call graph for this function:

Member Data Documentation

◆ _integrator

float launchdetection::CatapultLaunchMethod::_integrator {0.0f}
private

Definition at line 65 of file CatapultLaunchMethod.h.

Referenced by reset(), and update().

◆ _last_timestamp

hrt_abstime launchdetection::CatapultLaunchMethod::_last_timestamp {0}
private

Definition at line 64 of file CatapultLaunchMethod.h.

Referenced by CatapultLaunchMethod(), and update().

◆ _motorDelayCounter

float launchdetection::CatapultLaunchMethod::_motorDelayCounter {0.0f}
private

Definition at line 66 of file CatapultLaunchMethod.h.

Referenced by reset(), and update().

◆ state

LaunchDetectionResult launchdetection::CatapultLaunchMethod::state {LAUNCHDETECTION_RES_NONE}
private

Definition at line 68 of file CatapultLaunchMethod.h.

Referenced by getLaunchDetected(), getPitchMax(), reset(), and update().


The documentation for this class was generated from the following files: