How can you tell if a person on long trip got a virus or if it is food poisoning?

Not with certainty. Viruses tend to be very short lived and mild infections in the GI tract. Food poisoning can vary in the length and severity of the process depending on the bug, how much was ingested and the integrity of the person's immune system. As a rule, these infections tend to be a bit nastier and last longer on average.