Open Sint  3.4-2
Macros | Functions
davis.h File Reference

davis specific functions More...

#include "adc.h"
#include "anemometer.h"
Include dependency graph for davis.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DAVIS_CUTOFF   5
 

Functions

void davis_init (void)
 initialize the davis anemometer.
 
uint8_t davis_adjust (void)
 anemometer value fine tuning and error correction. Any time the main find it has a wind speed flag active, it means we have a tick per cycle to elaborate. This routine is used to trasform ticks per cycle in (?? m/s) (?? km/h). More...
 

Detailed Description

davis specific functions

Macro Definition Documentation

◆ DAVIS_CUTOFF

#define DAVIS_CUTOFF   5

Filter cutoff to eliminate spike

Function Documentation

◆ davis_adjust()

uint8_t davis_adjust ( void  )

anemometer value fine tuning and error correction. Any time the main find it has a wind speed flag active, it means we have a tick per cycle to elaborate. This routine is used to trasform ticks per cycle in (?? m/s) (?? km/h).

Note
clear media_rt the first time (init).
speed_rt and angle_rt are set by interrupt routine.
Todo:
This routine should also check the validity of these value someway.
Returns
TRUE - ok the value has been corrected, FALSE - error.
Bug:
return is always TRUE, please fix.

Adjust wind speed, these value are hardware dependant. See spreadsheet.