In mandatory prayers, it is a pillar that one prays standing up. If a person is unable to stand up, he can pray sitting down.
If a person is travelling, he is allowed to pray voluntary prayers while sitting down, even to the direction of other than the Ka’abah.
While in the car and in the city, this is not permissible.