Ballast Control

Functions to control the ballast pump for altitude. More...


Defines

#define BALLAST_3D_FIX_COUNT   10
 Number of consecutive 3D GPS fixes required to assert altitude as valid.
#define BALLAST_HOLD_ALTITUDE   30500l
 Altitude in feet used to control ballast pump.

Enumerations

enum  BALLAST_MODE { WAIT_ACTIVATION, CONTROL_ALTITUDE, PUMP_RUN, PUMP_RUN_DELAY }
 Ballast pump state machine. More...

Functions

uint16_t ballastGetPumpCount ()
 Return the number of times the ballast pump has been commanded to run.
void ballastInit ()
 Setup the ballast controls system.
void ballastSetState (bool_t state)
 Set the ballast control operation.
void ballastLogEvent (bool_t state)
 Log the ballast pump command on or off.
void ballastCheck ()
 Function that should be called once a second with each GPS fix to determine ballast pump operation.

Variables

uint16_t ballastPumpCount
 Number of times the ballast pump has been commanded to run.
uint8_t ballast3DFixCount
 Count of 3D fixes required to assert GPS altitude is valid.
uint8_t ballastTimeCount
 Counter used to track number of seconds pump is on or off.
BALLAST_MODE ballastMode
 Enumerated type that indicates the current ballast mode.
bool_t ballastState
 Flag used to enable/disable ballast control.


Detailed Description

Functions to control the ballast pump for altitude.

Define Documentation

#define BALLAST_3D_FIX_COUNT   10

Number of consecutive 3D GPS fixes required to assert altitude as valid.

Referenced by ballastCheck().

#define BALLAST_HOLD_ALTITUDE   30500l

Altitude in feet used to control ballast pump.

Referenced by ballastCheck().


Enumeration Type Documentation

Ballast pump state machine.

Enumerator:
WAIT_ACTIVATION  Wait 90 minutes after boot or higher than BALLAST_HOLD_ALTITUDE to activate ballast pump.
CONTROL_ALTITUDE  Determine if altitude is less than BALLAST_HOLD_ALTITUDE.
PUMP_RUN  Run the ballast pump.
PUMP_RUN_DELAY  Time delay after ballast pump runs to determine effects of fluid loss.


Function Documentation

void ballastCheck (  ) 

Function that should be called once a second with each GPS fix to determine ballast pump operation.

References ballast3DFixCount, BALLAST_3D_FIX_COUNT, BALLAST_HOLD_ALTITUDE, ballastLogEvent(), ballastMode, ballastPumpCount, ballastState, ballastTimeCount, CONTROL_ALTITUDE, GPS_3D_FIX, gpsGetFixType(), gpsPosition, IO_BALLAST_PUMP, PUMP_RUN, PUMP_RUN_DELAY, timeGetHours(), timeGetMinutes(), and WAIT_ACTIVATION.

Referenced by main().

Here is the call graph for this function:

uint16_t ballastGetPumpCount (  ) 

Return the number of times the ballast pump has been commanded to run.

Returns:
run count

References ballastPumpCount.

Referenced by psk31CreateDataPacket().

void ballastInit (  ) 

Setup the ballast controls system.

References ballast3DFixCount, ballastMode, ballastPumpCount, ballastState, ballastTimeCount, and WAIT_ACTIVATION.

Referenced by main().

void ballastLogEvent ( bool_t  state  ) 

Log the ballast pump command on or off.

Parameters:
state boolean that indicates if pump was turned on or off

References gpsPosition, LOG_PUMP, logInt32(), logType(), and logUint8().

Referenced by ballastCheck().

Here is the call graph for this function:

void ballastSetState ( bool_t  state  ) 

Set the ballast control operation.

Parameters:
state true to enable pump operation; otherwise false

References ballastState.


Variable Documentation

Count of 3D fixes required to assert GPS altitude is valid.

Referenced by ballastCheck(), and ballastInit().

Enumerated type that indicates the current ballast mode.

Referenced by ballastCheck(), and ballastInit().

Number of times the ballast pump has been commanded to run.

Referenced by ballastCheck(), ballastGetPumpCount(), and ballastInit().

Flag used to enable/disable ballast control.

Referenced by ballastCheck(), ballastInit(), and ballastSetState().

Counter used to track number of seconds pump is on or off.

Referenced by ballastCheck(), and ballastInit().


Generated on Sun Oct 5 11:29:37 2008 for HF-APRS Beacon by  doxygen 1.5.7