Autonomous landings are always fraught with danger. One of the most dangerous terrains any landing might occur on is a boulder field. Not only would the impact of the landing on these hard objects be a threat, but the boulders are likely to be jagged too. Another threat are the steep cliffs of the crater - not falling off them (although that's a possibility), but crashing into them. (click on the image to the left to see the animation)
The landing ellipse for NASA landers on Mars is typically around 20km (12mi) long and 7km (4.3mi) wide. Jezero crater, where Mars 2020 is due to land in Feb 2021, is 49km (30.4mi) across. This means there are probably going to be a variety of terrains within that ellipse. Mars 2020 has a solution to prevent landing in a poor location.
First off, you probably want to know where Jezero Crater is. The technicolour map on the right shows all of Mars. If you locate the extremely dark blue area in the southern hemisphere, then track north until you come to another blue region, then look for the small 'bite' the blue region has made above and slightly off-centre of the dark-blue region you started in. Clicking on the map will enlarge it, and clicking it again will display the map full size.
The other map shows the western edge of that 'bite', and the vast volcano Syrtis Major (it's a low relief mountain, but covers a very large area - large enough to see through small telescopes on Earth).
Clicking on the map will enlarge it, and clicking it again will enlarge it still further. After that, use your browser's tools to make it full screen (usually F11) and zoom in. Isidis Planitia is a more-or-less circular basin, and Jezero is in the top left edge of it, making it the top right corner of Syrtis Major. Although it's a small crater, it's labelled, so you should be able to find it (you'll definitely have to zoom in though).
Isidis Planitia, by the way, is where the Beagle 2 landed.
On the other side of Isidis is a large promontory called Terra Cimmeria, and beyond that is the vast Elysium Planitia. Tucked away in the bottom left of Elysium (just a few degrees above the equator) is the InSight lander, and just a few hundred kilometers from InSight, the Curiosity rover is still trundling around Gale Crater.
Back to the headline, navigating during landing. To avoid all the obstacles and actually choose a better location for final touchdown, the Mars 2020 Rover has a system called Terrain Relative Navigation (TRN), which is an autonomous pilot capable of making navigation decisions.
It does this because it already has a map of hazards (sand dunes, cliffs, smaller craters and boulder fields). TRN kicks in during descent at around 13,000ft (3,960m) and starts taking images in what is known as Coarse Landmark Mode using the Lander Visual System (LVS). These can be examined at the rate of one per second, and the images are broken down into squares that cover around 5,000ft (1,520m) of surface area.
It's not doing a 'map analysis and comparison' here. It's looking for light and dark areas, and when it finds a 'pattern' that looks uncommon (compared to everything else it's seeing), the camera homes in on that area and takes more images. These are compared to a map of landmarks, and when it has three images-to-map comparison matches it switches to Fine Landmark Matching.
Image collection continues, but this time the images are broken into 410ft (125m) squares. In this mode, LVS is looking for at least 20 matches per second, but will usually do much better than that - up to 150 matches per second. With all this data, LVS is able to plot the lander's trajectory with a high degree of accuracy. This information is sent to the Safe Target Selection system (STS).
STS can project where the lander is going to land, compare that area with an onboard map of hazards and safe zones, and if necessary change the landers descent such that the landing point can be changed by up to 2,000ft (600m).
When the Beagle 2 (landing in 2004) failed to communicate with Mars Express, it was assumed it had crashed. It hadn't, but at that time 50% of all lander missions had met an unfortunate demise at the end of the descent phase. Therefore, making the assumption it had crashed was a perfectly reasonable thing to do.
For large rovers like Curiosity and Mars 2020 which have a huge mass, sky-cranes are a partial solution to the problem. When they work they place the payload gently on the ground. It should be born in mind that sky-cranes are a very high-tech solution, and therefore there is a risk involved in using them. If for whatever reason they fail, they'll fail spectacularly. NASA didn't use one for InSight, since it didn't have the mass required to need one. Even when one is used, it might still deliver the payload onto entirely unsuitable terrain - amongst large boulders for example, which effectively imprison the rover, or into a dust bank, into which the lander sinks and is unable to power its way out (or recharge for that matter).
Yes, these hazards are unlikely, but they are still possible. NASA and ESA choose their landing sites very carefully to limit, reduce or eliminate such possibilities. With Mars 2020, there are smaller craters with Jezera, and if the rover is descending into one of them, there is a very real possibility it will crash into a cliff on the way down.
A landing ellipse is 20km by 7km. Jezera is 49km in diameter. If we look at NASA's most recent landing - InSight - we can see a problem. InSight was meant to land at a longitude of 135.974°E, but it actually landed at 135.6234°E. Let's do some maths:
21,344 km (circumference of Mars) / 360 (number of degrees) = 59.288 km per degree 135.974 - 135.6234 = 0.3506 (degrees) 59.288 * 0.3506 = 20.786 km.
Insight missed its target by 20.786km. What this means is the landing ellipse is 20km long, with a 10km variance of hitting the actually intended landing site. At this sort of accuracy Jezera, at 49km wide, is pushing the limits of safe landing. Internally, Jezera is riddled with hazards. This new landing system is in effect a game-changer.
Mars 2020 is taking a helicopter with it too. I'm pretty excited about Mars 2020. Aren't you?