SCRIPT H_navest

	extern float	block_state ();
	extern float	sig_feature ();
	extern float	state;
	
	if ( sig_feature ( SIGFEAT_USER1 ) )
	state = SIGASP_STOP;
	else
	if ( block_state () !=# BLOCK_CLEAR )
	state = SIGASP_STOP_AND_PROCEED;
	else
	state = SIGASP_CLEAR_2;

SCRIPT N2_posun

	extern float	block_state ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;

	if ( block_state () !=# BLOCK_CLEAR )
	state = SIGASP_STOP;
	else
	state = SIGASP_STOP_AND_PROCEED;

	draw_state = def_draw_state (state);

SCRIPT N2_predvest

	extern float	def_draw_state ();
	extern float	next_sig_lr ();
	extern float	sig_feature ();
	extern float	state;
	extern float	draw_state;

	float		x_state;

	if ( sig_feature ( SIGFEAT_USER3 ) )
	x_state = SIGASP_RESTRICTING;
	else
	if ( sig_feature ( SIGFEAT_USER1 ) )
	x_state = next_sig_lr ( SIGFN_NORMAL );
	else
	if ( sig_feature ( SIGFEAT_USER2 ) )
	x_state = next_sig_lr ( SIGFN_DISTANCE );
	else
	x_state = SIGASP_CLEAR_2;

	if ( x_state <=# SIGASP_RESTRICTING )
	state = SIGASP_APPROACH_1;
	else
	if ( x_state <=# SIGASP_APPROACH_3 )
	state = SIGASP_APPROACH_3;
	else
	state = SIGASP_CLEAR_2;

	draw_state = def_draw_state (state);

SCRIPT N4_navest

	extern float	block_state ();
	extern float	route_set ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	sig_feature ();

	if ( block_state () !=# BLOCK_CLEAR )
	state = SIGASP_STOP;
	else
	if ( sig_feature ( SIGFEAT_USER4 ) )
        {
        	if ( sig_feature ( SIGFEAT_USER1 ) )
        	{
                        if ( route_set () )
        		state = SIGASP_CLEAR_1;
        		else
        		state = SIGASP_APPROACH_2;
                }
                else
        	if ( sig_feature ( SIGFEAT_USER2 ) )
        	{
                        if ( route_set () )
        		state = SIGASP_CLEAR_2;
        		else
        		state = SIGASP_APPROACH_1;
                }
                else
        	if ( sig_feature ( SIGFEAT_USER3 ) )
        	{
                        if ( route_set () )
        		state = SIGASP_APPROACH_2;
        		else
        		state = SIGASP_STOP_AND_PROCEED;
                }
        }
        else
       	if ( sig_feature ( SIGFEAT_USER1 ) &&  sig_feature ( SIGFEAT_USER3 ) )
       	state = SIGASP_APPROACH_2;
        else
       	if ( sig_feature ( SIGFEAT_USER2 ) &&  sig_feature ( SIGFEAT_USER3 ) )
	state = SIGASP_APPROACH_1;
        else
       	if ( sig_feature ( SIGFEAT_USER3 ) )
	state = SIGASP_STOP_AND_PROCEED;
       	else
       	state = SIGASP_STOP;

	draw_state = def_draw_state (state);

SCRIPT T2_posun

	extern float	block_state ();
	extern float	def_draw_state ();
	extern float	sig_feature ();
	extern float	route_set ();
	extern float    next_sig_lr ();
	extern float	state;
	extern float	draw_state;
        float           sstate;
	
        if ( sig_feature ( SIGFEAT_USER1 ) )
        {
           if ( route_set () )
       	   sstate = SIGASP_STOP;
       	   else
       	   sstate = SIGASP_STOP_AND_PROCEED;
       	}
       	else
        sstate = SIGASP_STOP_AND_PROCEED;

        if ( sstate ==# SIGASP_STOP_AND_PROCEED )
        {
               	if ( sig_feature ( SIGFEAT_USER2 ) )
               	{
                        if ( block_state () !=# BLOCK_JN_OBSTRUCTED )
                        sstate = SIGASP_STOP_AND_PROCEED;
        	        else
                        sstate = SIGASP_STOP;
                }
                else
        	if ( sig_feature ( SIGFEAT_USER3 ) )
	        {
                        if ( next_sig_lr ( SIGFN_NORMAL ) ==# SIGASP_STOP_AND_PROCEED && block_state () !=# BLOCK_JN_OBSTRUCTED )
                        sstate = SIGASP_STOP_AND_PROCEED;
        	        else
        	        sstate = SIGASP_STOP;
  	        }
                else
                if ( block_state () !=# BLOCK_CLEAR )
	        sstate = SIGASP_STOP;
	        else
	        sstate = SIGASP_STOP_AND_PROCEED;
        }
        
        state = sstate;
	draw_state = def_draw_state (state);

