Changeset fcfc72e


Ignore:
Timestamp:
02/28/12 12:07:09 (2 years ago)
Author:
xkolman2 <xkolman2@…>
Branches:
master
Children:
4b20ffa
Parents:
5debf5f
git-author:
xkolman2 <xkolman2@…> (02/28/12 12:07:09)
git-committer:
xkolman2 <xkolman2@…> (02/28/12 12:07:09)
Message:

make the position indicator rotate to current bearing

git-svn-id: https://nlp.fi.muni.cz/svn/gps_navigace/trunk@665 0858a4d0-ffff-46e5-938e-62b5ecb34222

Location:
modules
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • modules/gui_modules/gui_qml/gui_qml.py

    r5debf5f rfcfc72e  
    281281    return self.data.speed if self.data.speed != None else 0 
    282282 
     283  def _bearing(self): 
     284    print "BEARING" 
     285    return self.data.bearing if self.data.bearing != None else 0 
     286 
    283287  def _error(self): 
    284288    return float(self.data.error) 
     
    297301  altitude = QtCore.Property(float, _altitude, notify=changed) 
    298302  speed = QtCore.Property(float, _speed, notify=changed) 
     303  bearing = QtCore.Property(float, _bearing, notify=changed) 
    299304  error = QtCore.Property(float, _error, notify=changed) 
    300305  valid = QtCore.Property(bool, _valid, notify=changed) 
    301306  speedValid = QtCore.Property(bool, _speed_valid, notify=changed) 
    302307  altitudeValid = QtCore.Property(bool, _altitude_valid, notify=changed) 
     308 
    303309 
    304310 
  • modules/gui_modules/gui_qml/qml/MapPage.qml

    r5debf5f rfcfc72e  
    6767        currentPositionLon: gps.lastGoodFix.lon 
    6868        //currentPositionAzimuth: compass.azimuth 
     69        //TODO: switching between GPS bearing & compass azimuth 
     70        currentPositionAzimuth: gps.lastGoodFix.bearing 
    6971        currentPositionError: gps.lastGoodFix.error 
    7072 
  • modules/gui_modules/gui_qml/qml/PinchMap.qml

    r5debf5f rfcfc72e  
    213213        return getCoordFromScreenpoint(pinchmap.width/2, pinchmap.height/2); 
    214214    } 
    215     function sinh(aValue) 
    216     { 
     215 
     216    function sinh(aValue) { 
    217217        return (Math.pow(Math.E, aValue)-Math.pow(Math.E, -aValue))/2; 
    218218    } 
     219 
    219220    function num2deg(xtile, ytile) { 
    220221        var n = Math.pow(2, zoomLevel); 
  • modules/mod_location.py

    r30bff6f1 rfcfc72e  
    5959    """update the screen and also GPSD location if enabled 
    6060    TODO: more efficient screen updates""" 
    61 #    print "updating screen" 
    6261    self.locationUpdate() 
    6362 
     
    7574      if sFromLastRequest > 0.85: 
    7675        self.set('needRedraw', True) 
    77     else: 
    78       print("location: GUI module not available") 
    7976 
    8077  def startGPSD(self): 
Note: See TracChangeset for help on using the changeset viewer.