Working on direction for 2 days but couldnt manage to do it.
the code where i get the speed is
Sub GPS_LocationChanged (Location1 As Location)
lblLat.Text = "Lat = " & Location1.ConvertToMinutes(Location1.Latitude)
lblLon.Text = "Lon = " & Location1.ConvertToMinutes(Location1.Longitude)
lblSpeed.Text = Round(3.6 * (Location1.Speed))
Timer1_Tick
End Sub
This is the timer1_tick
Sub Timer1_Tick
Dim Angle1 As Float
Angle1 =Angle
Angle = (lblSpeed.text) + 231 Mod 360 ( +231 is to set the speed to corresponding angle for the true speed on speedometer)
csvNeedle.DrawRectRotated(DRectNeedle,Colors.Transparent,True,1,Angle1)
csvNeedle.DrawBitmapRotated(bmpNeedle,SRectNeedle,DRectNeedle,Angle)
imvNeedle.Invalidate2(DRectCompass)
Here i added the direction like this :
dim direction as float
direction = angle1 + ( angle - angle1 ) / 5
Angle1 = Direction
But this is resulted with the same movement of needle ( not continuos but on every speed change ) and also this draws multiple needles on the speedometer
any ideas ? TIA