Hi - great to hear! So match_near is used to search a subregion of the catalogue - it gathers all of the stars from the catalog in the vicinity of the specified coordinates, and then matches against that. This is used as a way of refining the results from match_lis. In the current configuration, match_lis only checks the brightest MAX_FALSE_STARS+REQUIRED_STARS - the rational for this is performance. Once this is done, we use match_near to identify all of the stars in the image. This is not essential, but is useful in order to further refine your attitude estimate. In cases where there are false negatives, I would take a look at two things:
1. how many stars were identified in the winning solution (lis.winner.size())
2. what is the match certainty (lis.p_match)
the key lies in this line in match_lis: if lis.p_match>P_MATCH_THRESH and lis.winner.size()>=beast.cvar.REQUIRED_STARS:
p_match is computed with the assumption that the photo given is an undistorted photo of the night sky containing only real stars. REQUIRED_STARS is a bandaid around for when these requirements are not met - IE the earth is obstructing the field of view
if you are getting false positives at a rate higher than 1-P_MATCH_THRESH, then there is something funny going on...
If you have some idea of where you are pointing, you should use match_near rather than match_lis - just be sure to check p_match, and the number of stars in the image. This will have better performance that match_lis + a filter, both in terms of speed, matches, and false results
For calculating angular rate between images, take a look at extrapolate_images and extrapolate_matrix. Time is in microseconds since unix epoch, and angular rate is in radians per second