I want to calculate (for optimal path purposes) work done while hiking through hills. Hill heights would be in a $E(x,y)$, a scalar for a point in a flat surface $x,y$. I would also like to factor in work done even walking horizontally in flat surface.
How can I use work calculation / line integrals for this? Can I turn $E$ and friction into an $\vec{F}$ perhaps where for every $z>0$ where $E(x,y)>0$ I have a little up pointing vector, and some friction force in $x,y$ directions, so the vector field looks like
$$ \vec{F} = f i + f j + g k $$
where $f$ is a constant values related to friction and $g$ related to gravity (walking up, where $g$ would be picked as much larger than $f$, I want walking uphill to cost much more than walking horizontally).
Then for any path represented by parametrized curve $r(t)$ through this field I could compute $W = \int \vec{F} dr$.
Does this make sense, especially for friction? Maybe I should always pick a constant length vector in the direction of the path itself that represents work done whereever you walk horizontally..?
Also a potential problem, if a path goes up and down a hill, returning to where it started, would this result in zero work done (this would not be useful for me)?
Thanks,