public void update ( long time , double latitude , double longitude , double speed , double bearing , double rateOfTurn ) { if ( strat == Strategy . SHORT ) { throw new IllegalStateException ( "mixing short/long update" ) ; } strat = Strategy . LONG ; lock . lock ( ) ; try { this . time = time ; this . latitude = latitude ; this . longitude = longitude ; this . speed = speed ; this . bearing = bearing ; this . rateOfTurn = rateOfTurn ; calculated = false ; } finally { lock . unlock ( ) ; } }
Updates values .