Changeset 281


Ignore:
Timestamp:
01/12/2010 05:29:17 PM (11 years ago)
Author:
dave
Message:

testing

Location:
libs/magicsquares/in-progress/pf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libs/magicsquares/in-progress/pf/src/App.cpp

    r280 r281  
    136136float averror=0; 
    137137 
     138float avx = 0; 
     139float avy = 0; 
     140 
    138141void App::Update(IplImage *camera) 
    139142{        
     
    149152        // able to model this behaviour very well, as it only copes with  
    150153        // linear velocity 
    151         RealState.x=50*sin(m_FrameNum*0.01f); 
     154        RealState.x=50*sin(m_FrameNum*0.02f); 
    152155        RealState.y=-50; 
    153156         
     
    180183        PlotXHairs(camera,RealState,1); 
    181184 
    182         float blend=0.9; 
     185        float blend=0.9;         
     186         
     187        avx=(avx*blend)+(ToPF.x*(1-blend)); 
     188        avy=(avy*blend)+(ToPF.y*(1-blend)); 
     189        //cerr<<"average filter inputs: "<<Distance(avx, avy, RealState.x, RealState.y)<<endl; 
    183190        avnoise=(avnoise*blend)+(Distance(ToPF.x, ToPF.y, RealState.x, RealState.y)*(1-blend)); 
    184191        averror=(averror*blend)+(Distance(Estimate.x, Estimate.y, RealState.x, RealState.y)*(1-blend)); 
     192        //cerr<<"average filter error: "<<averror<<endl; 
    185193        cerr<<"performance: "<<avnoise-averror<<endl; 
    186194         
Note: See TracChangeset for help on using the changeset viewer.