Flying sideways on a rectangular mission

Does anyone know how to fly a rectangular mission sideways to be able to photograph solar arrays

You can set waypoints in mission planner

Can you set a rectangular mission ,but have the drone fly sideways so the photos would be evenly spaced and be able to be stitched together to make an ortho photo. I know the heading can be set in waypoint missions , but can this happen in a rectangular grid mission

Yes, it can. You can insert a YAW_CONDITION command anywhere in the mission to point the vehicle the direction you want it to point. My app (Solex) has a “lock yaw” setting on Surveys and Grids for this purpose. Set that to the angle you want the vehicle to point, and it will fly the entire survey or grid pointed in the direction you specified.