The equation that relates the altitude, latitude and longitude is as follows:
$$\sin{a}=\cos{h}\cos{\delta}\cos{\phi}+\sin{\delta}\sin{\phi}$$
where
- a is the altitude
- h is the hour angle which includes the longitude of the observer (and the right ascension of the Sun which is known from the date and time).
- $\delta$ is the declination of the Sun (which is known from the date and time).
- $\phi$ is the latitude of the observer.
This gives one equation with two unknowns. From measuring the altitude at two different times, you have two equations and two unknowns which can be solved for latitude and longitude. (Solve for hour angle and latitude first.)
There may not be a direction solution to the two equations since it involves trig functions. The solution may require an iterative approach which is easier to do since you have a computer.
The solution may be easier if you measure the azimuth of the Sun also; or at least knowing the azimuth (az) will give you a first approximation of the longitude.
$$\tan(az) = \frac{\sin(h)}{\cos(h)\sin(\phi)-\tan(\delta)\cos(\phi)}$$
Edit: I should point out that the time needs to be Universal Time in order to determine the latitude. The time cannot be the local time. For example, if it is 10 am local time and you are at 30° latitude, the Sun will be in the same basic position regardless of your latitude. The exception is if you know the "standard latitude" for your time zone (0°, 15°, 30°, ...). Then the equations can be used with the local time to find the offset from the standard longitude.
Greg Miller also pointed out in comments that two observations and the altitude equation are not enough to determine the latitude and longitude uniquely. For a given altitude from observation 1, there is a ring of latitude,longitude points that are centered on the subsolar point. Observation 2 gives a different ring centered about the new subsolar point. The two two rings intersect at 2 points. To determine which of the 2 points of intersection is correct, a third observation.