Both may be correct depending on author intentions - the second half of the first one is in indicative mood, and the second half of the second one is in subjunctive mood. The key distinction here is whether or not you actually know where you are and what you are doing here. For brevity's sake, I'm going to just refer to them as first and second.
'I set my back straight, my chin up, and walk onwards; as if I know where I am and what I am doing here.
This is indicative mood and present tense. You know where you are and what you are doing here.(The semicolon is incorrect, but you weren't asking primarily about that.)
I set my back straight, my chin up, and walk onwards, as if I knew where I was and what I was doing here.
This is subjunctive mood and present tense. You are trying to appear like you know where you are and what you are doing. You may or may not actually know these things, and even if you do know you may still be attempting to appear to be something and doing something other than what you really are and are doing. The best example I can think of would be a spy pretending to be a maintenance worker - the spy knows exactly who they are and what they're doing, but they're trying to appear as if they were a maintenance worker and were doing what a maintenance worker does.
Considering the use of the phrase "as if", the subjunctive mood is probably most appropriate.
To avoid confusion, if you intend the indicative mood, I would rephrase the first sentence to use two independent clauses:
'I set my back straight, my chin up, and walk onwards; I know where I am and what I am doing here.