| Richting tussen twee coördinaten Direction between two sets of co-ordinates |
home → vogeltrekstation → informatie algemeen → richting
The direction between two sets of co-ordinates is calculated by computer (Imboden & Imboden 1972) as the
direction between the current record and the first record (=ringing data). The direction is given in degrees (000-359).
A direction is always calculated, even if the geographical co-ordinates are given as inaccurate. Users should check the
field ‘accuracy of co-ordinates’ (see the EURING code).
NB1: of course the distance is not present in the first record (=ringing data), in that case code: --- (three ‘hyphens’).
NB2: you can compute distance and direction between two sets of co-ordinates according to ‘orthodrome’ (shortest
distance) or ‘loxodrome’ (constant direction), the two methods can give rather different results (Imboden &
Imboden 1972). The method prefered by EURING is ‘loxodrome’. Scientists should check which method is used in the
data you did receive, or better: compute it yourself.
Imboden C. & D. Imboden 1972. Formel für Orthodrome und Loxodrome bei der Berechnung von Richtung und
Distanz zwischen Beringung- und Wiederfundort. Die Vogelwarte 26(4): 336-346.
You can download this publication here as a pdf.
| In the computerprograms on the Dutch Ringing Centre (for the computation of distance and direction) we do use the loxodrome: |
| The main part is subroutine "bafricht" where first the degrees-minutes coordinates are converted to decimal degrees (subroutine "todecgeo") and the second part (subroutine "loxod") where, according to the loxodrome, distance and direction is computed. |
Subroutine bafricht.
CREATE PROCEDURE dd_bafricht
@rca char(4),
@rcb char(4),
@rq char(1),
@fca char(4),
@fcb char(4),
@fq char(1)
AS
BEGIN
/* compute distance and direction */
DECLARE
@i int,
@rbr int,
@vbr int,
@rle int,
@vle int,
@graden int,
@kms int,
@err int,
@dum char(80)
/* select dist=null,dir=null */
/* corrigeer voor kwadranten en converteer naar integers */
/* bereken geograf coordinaten uit Amfrt coordinaten */
/* ringcoordinaten */
exec @err = dd_todecgeo @rca,@rcb,@rq,@rbr output,@rle output
if @err != 1 return
/* vindcoordinaten */
exec @err = dd_todecgeo @fca,@fcb,@fq,@vbr output,@vle output
if @err != 1 return
/* de coordinaten zijn bruikbaar voor de berekeningen */
/* bereken met loxodroom de afstand en richting */
exec @err = dd_loxod @rbr,@rle,@vbr,@vle,@kms output, @graden output
if @err != 1 return
select dist=@kms,dir=@graden
return
END
GO
|
Subroutine todecgeo.
/****** Object: Stored Procedure dbo.dd_todecgeo Script Date: 16-4-2003 11:19:09 ******/
CREATE PROCEDURE dd_todecgeo
@ca char(4),
@cb char(4),
@q char(1) output,
@br int output,
@le int output
AS
BEGIN
/* maak van karakters integers en */
/* corrigeer lengte en breedte voor kwadrant */
/* roep proc aan voor conversie van Amfrt naar geogr coordinaten */
if charindex('-',@ca) = 0 and
charindex('-',@cb) = 0
begin /* naukeurge coordinaten: dus bereken */
/* maak van Amerfoort coordinaten geografische coordinaten */
if @q='N' exec dd_amtogeo2 @ca out,@cb out,@q out
/* maak van tekst integers */
select @br=convert(int,@ca)
select @le=convert(int,@cb)
if @q='E' return 1
if @q='W'
begin
select @le=-@le
return 1
end
if @q='S'
begin
select @br=-@br
return 1
end
if @q='U'
begin
select @le=-@le
select @br=-@br
return 1
end
if @q='C'
begin
select @le=@le+10000
return 1
end
if @q='A'
begin
select @le=@le+10000
select @br=-@br
return 1
end
if @q='H'
begin
select @le=@le+10000
select @le=-@le
return 1
end
if @q='P'
begin
select @le=@le+10000
select @le=-@le
select @br=-@br
return 1
end
else /* coordinaat onnauwkeurig */
return 2
end
return 3 /* kwadrant onbekend */
END
GO
|
Subroutine loxod.
CREATE PROCEDURE dd_loxod
@rbr int,
@rle int,
@vbr int,
@vle int,
@kms int output,
@graden int output
AS
BEGIN
/* Berekening van richting en afstand met de loxodroom
* volgens Imboden: Vogelwarte 26,1972: 336-346
*/
declare
@pi float,
@erd float,
@rad float,
@hl float,
@al float,
@ala float,
@alo float,
@bla float,
@blo float,
@delo float,
@dela float,
@pha float,
@phb float,
@deph float,
@desb float,
@wl float,
@dl float,
@phna float,
@phnb float,
@a float
/* return 1 bij geen fouten */
select @kms=0
select @graden=0
select @pi=3.1415926
select @erd=6368.0
select @rad=57.295779
/* coordinaten buiten minimum en maximum return=2 */
if (@rbr> 9000 or @rbr< -9000) return 2
if (@vbr> 9000 or @vbr< -9000) return 2
if (@rle>18000 or @rle<-18000) return 2
if (@vle>18000 or @vle<-18000) return 2
select @hl=0
select @al=0
select @dl=0
select @wl=0
/* van graden+minuten naar decimale graden */
exec dd_todec @rbr,@ala output
exec dd_todec @rle,@alo output
exec dd_todec @vbr,@bla output
exec dd_todec @vle,@blo output
select @dela=@bla-@ala
select @delo=@blo-@alo
if (@dela=0 and @delo=0) return 1 /* ringplaats=vindplaats */
select @a=abs(@delo)
if @a-180 > 0
begin
if @delo <= 0 select @delo=@delo+360
else select @delo=@delo-360
end
select @pha=@ala/@rad
select @phb=@bla/@rad
select @deph=@dela/@rad
select @desb=@a/@rad
if @delo != 0
begin
if @dela = 0
begin
select @dl=@desb*cos(@pha)
select @wl=90
end
else
begin
select @phna=(45+@ala/2)/@rad
select @phnb=(45+@bla/2)/@rad
select @a=atan(@desb/(log(abs(tan(@phnb)))-log(abs(tan(@phna)))))
select @dl=@deph/cos(@a)
if @dela<0 select @a=@pi+@a
select @wl=@a*@rad
end
end
else
begin
select @dl=@deph
select @wl=360
if @phb<@pha select @wl=180
end
select @dl=abs(@dl)*@erd
if @delo<0 select @wl=360-@wl
select @graden=@wl+0.5
select @kms=@dl+0.5
if @graden=0 select @graden=360
if @kms=0 select @graden=0
/* select @kms,@graden */
return 1
END
GO
|
Deze pagina is voor het laatst bijgewerkt op 07 juni 2005.