I am looking to calculate the shortest distance between two points on a sphere in a given direction. In other words, in the diagram here (altered from a Wikipedia article), I am looking for the shortest 'straight' line that connects Q and P where we must always be travelling eastward on the sphere as well as the distance of the line. In other words, the distance we must travel from Q to P without crossing the green line.
Through my reading of spherical trigonometry, it seems that it exclusively uses geodesic lines which do not apply here. My understanding with non-Euclidean geometry is very limited, I am wondering if there is a formulation for this problem and also if there are methods for describing non-geodesic lines on the sphere. I am also unsure whether the line I have drawn on the sphere would be classified as 'straight' and whether there is a definition of a straight line in spherical geometry.