But, even without seeing the sun or any landmarks, you can improvise to make your own compass with things you can find in the ...
You can use a compass to check which direction each end is facing. The Sun is in the South at about midday, so you can also check your compass is working if one end points in that direction.