over a long trip, how does a gps measure distance? point to point and then adding it all up or as the crow flies?

Assuming you have an auto-routing GPS, or one that will navigate roadways - if you're in Automobile mode, the GPS will calculate the distance along a route determined by your criteria (shortest route, fastest route, avoid this or that). The distance it comes up with will be the actual distance along the roadway. In marine or other modes, depending on the GPS, the distance wil be straight line, without slope correction.

A GPS will take a position every second (or 5 seconds for some older units) and then calculate the distance between the two measurements. For the trip odometer of the GPS it will simply add those distances up to compute the total miles (or kilometers) traveled. The distance includes changes in altitude as well if you have enough satellites (3D Navigation). If your GPS does have track logs (typically for back tracking a route) those will not match the odometer (in most cases) since they "smoothen" out the number of points and will come up with a more straightline approach. This will result in slightly smaller distance numbers. Found this when comparing a longer trip with lots of twisty roads and comparing the total of the GPS odometer with the individual track logs (differed by about 3% - still better than the bike odometer). Reiner