This is a version of a question that I posted on the GRASS list, but I didn't get any suggestions there. I would like to overlay a grid (cell size about 500 m x 500m) over an animal track created from hourly locations. For each cell that contains a track segment I want to record a direction vector which represents the direction that the animal was traveling when it passed through that cell.
I tried using the GRASS command "v.to.rast use=dir", which should create a directional vector in every raster cell that the track passes through. It almost works, but the command does not seem to respect the order of the track. It seems just as likely to classify a particular segment as having a direction of NE as to classify the same segment as SW (180 degrees opposite) and I couldn't see any consistency to how the directions were chosen, although I may have missed something. Another challenge is that the animal often re-crossed its own track so that individual grid cells may contain more than one track segment--in those cases I want to sum the direction vectors using regular vector algebra.
I am new to GRASS and a bit overwhelmed, and I would be very grateful for any suggestions that would get me started in the right general direction.