Not an expert by any means, but I'd suggest looking at the Dash7 protocol/ firmware as a reference for the mesh, security and positioning. It's been around a while and seems robust.
Open source, royalty free, low power, high range (several km even in urban areas), medium bandwidth, runs on several lora boards.