If you are setting the location at the UI and seeing it changed back to the same value every time, then your gateway is probably sending some hardcoded position with the stats and thus the location you save is overwritten. Check your gateway configuration and change accordingly if this is the case.