Fly straight... a loaded term
You are, of course, referring to relative to the ground, and your question implies a fixed course on the ground. So let's talk about
heading, and
course.
Heading is the compass direction your drone is pointing, while course is the line it flies over the ground.
A typical consumer drone has a built-in compass, and is pretty good at holding heading. Yaw changes the heading, then the flight controller will keep the drone on that heading as you pitch, roll, and change elevation. In straight-ahead flight (full right stick forward) it will similarly keep flying in the same
direction or heading.
However, course is a different matter. Almost no aircraft have the sensing capability to provide the fine control to fly a fixed course over the ground with little error. Whether a Cessna 182 or a DJI drone, the instrument available to track a course is the pilot's eyeballs.
Flying a straight course is more difficult with any degree of crosswind, and there's almost always some air movement, especially aloft. Easier with a steady wind, much much harder if it's gusty.
In any case, as you've discovered you must yaw or "crab" (aviation term
) into the wind. You shouldn't need to hold some yaw stick, this will make you spin around 360°, even with a tiny amount of stick, just slowly.
Rather, if you want to fly a course of 100° and in that direction there is a steady headwind with a bit of an angle crossing your course left to right, you will have to hold a heading less than 100°, the amount of correction depending on your speed and the wind speed. Say, 90°.
This can only be done "by feel" watching your course on the camera display as you go. If you have a target in the distance, it's easier. With a crosswind component, there will be a spot to the right or left of the display cross hair where the target will stay fixed, and not drift left or right. This is the proper heading that corrects for the crosswind. You gotta adjust heading and eyeball it.
If it's gusty, then the situation is dynamic, and you just gotta do your best. Again, a target here really helps.
You can also roll in the direction of the crosswind to correct. If you use this method – instead of crabbing – you then keep your target dead-center in the cross hair, correct with roll input. This is more tedious as you have to hold the roll angle constantly with the stick.