Hello,

I am trying to calculate bearing using the following:

Bearing = ATN2(SIN(DestinationLongitude-OriginLongitude) * COS(DestinationLatitude),(COS(OriginLatitude) * SIN(DestinationLatitude)) - (SIN(OriginLatitude) * COS(DestinationLatitude) * COS(DestinationLongitude-OriginLongitude)))

I keep getting Msg 3623 An invalid floating point operation occurred. Any idea how to fix this?