Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the approach to transfer the activity packets in posecells? #3

Open
SeaEastXu opened this issue Jun 6, 2019 · 0 comments
Open

Comments

@SeaEastXu
Copy link

    %extend the Posecells one unit in each direction (max supported at the moment)
    % work out the weight contribution to the NE cell from the SW, NW, SE cells 
    % given vtrans and the direction
    % weight_sw = v * cos(th) * v * sin(th)
    % weight_se = (1 - v * cos(th)) * v * sin(th)
    % weight_nw = (1 - v * sin(th)) * v * sin(th)
    % weight_ne = 1 - weight_sw - weight_se - weight_nw
    % think in terms of NE divided into 4 rectangles with the sides
    % given by vtrans and the angle
    pca_new=zeros(PC_DIM_XY+2);            
    pca_new(2:end-1,2:end-1) = pca90;
    weight_sw = vtrans^2 *cos(dir90) * sin(dir90);
    weight_se = vtrans*sin(dir90) - vtrans^2 *cos(dir90) * sin(dir90);
    weight_nw = vtrans*cos(dir90) - vtrans^2 *cos(dir90) * sin(dir90);
    weight_ne = 1.0 - weight_sw - weight_se - weight_nw;

    % circular shift and multiple by the contributing weight
    % copy those shifted elements for the wrap around       
    pca_new = pca_new.*weight_ne + circshift(pca_new, [0 1]).*weight_nw + circshift(pca_new, [1 0]).*weight_se + circshift(pca_new, [1 1]).*weight_sw;
    pca90 = pca_new(2:end-1,2:end-1);
    pca90(2:end,1) = pca90(2:end,1) + pca_new(3:end-1,end);
    pca90(1,2:end) = pca90(1,2:end) + pca_new(end,3:end-1);
    pca90(1,1) = pca90(1,1) + pca_new(end:end);

    % unrotate the pose cell xy layer
    Posecells(:,:,dir_pc) = rot90(pca90, 4 - floor(dir * 2/pi));

I don't konw the funciton of these codes.

@SeaEastXu SeaEastXu changed the title What is the approach to transfer state in posecells? What is the approach to transfer the activity packets in posecells? Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant