Positioning Techniques with Smartphone Technology: Performances and Methodologies in Outdoor and Indoor Scenarios