update reference frame and map