- if( *psz_polarisation == 'H' || *psz_polarisation == 'h' )
- i_polar = BDA_POLARISATION_LINEAR_H;
- if( *psz_polarisation == 'V' || *psz_polarisation == 'v' )
- i_polar = BDA_POLARISATION_LINEAR_V;
- if( *psz_polarisation == 'L' || *psz_polarisation == 'l' )
- i_polar = BDA_POLARISATION_CIRCULAR_L;
- if( *psz_polarisation == 'R' || *psz_polarisation == 'r' )
- i_polar = BDA_POLARISATION_CIRCULAR_R;
+ if( psz_polarisation != NULL )
+ switch( toupper( psz_polarisation[0] ) )
+ {
+ case 'H':
+ i_polar = BDA_POLARISATION_LINEAR_H;
+ break;
+ case 'V':
+ i_polar = BDA_POLARISATION_LINEAR_V;
+ break;
+ case 'L':
+ i_polar = BDA_POLARISATION_CIRCULAR_L;
+ break;
+ case 'R':
+ i_polar = BDA_POLARISATION_CIRCULAR_R;
+ break;
+ }