<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the Scilab time frequency toolbox.
This file must be used under the terms of the  terms of the GNU General Public License 
as published by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Copyright (c) 1996 by CNRS (France)
-->


<refentry xml:id="doppler" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:scilab="http://www.scilab.org"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">


  <refnamediv>
    <refname>doppler</refname><refpurpose>Generate complex Doppler signal.</refpurpose>
  </refnamediv>



  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>
      [FM,AM,IFLAW]=doppler(N,FS,F0,D,V)
      [FM,AM,IFLAW]=doppler(N,FS,F0,D,V,T0)
      [FM,AM,IFLAW]=doppler(N,FS,F0,D,V,T0,C)
    </synopsis>
  </refsynopsisdiv>
  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry>
        <term>	 N  :</term>
        <listitem>
          <para>a positive integer: the number of points.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 FS :</term>
        <listitem>
          <para>a positive scalar : the sampling frequency (in Hertz).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>F0 :</term>
        <listitem>
          <para>a  scalar in ]0 FS/2]: the target frequency   (in Hertz).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 D  :</term>
        <listitem>
          <para>a positive scalar: the distance from the line to the observer (in meters).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 V  :</term>
        <listitem>
          <para>a positive scalar: the target velocity    (in m/s).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 T0 :</term>
        <listitem>
          <para>a positive integer in [1 N]: the time center index (default : round(N/2)).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 C  :</term>
        <listitem>
          <para> a positive scalar: the wave velocity (in m/s)  (default : 340).</para>
        </listitem>
      </varlistentry>


      <varlistentry>
        <term>FM :</term>
        <listitem>
          <para>a real column vector of size N: the output frequency modulation.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 AM :</term>
        <listitem>
          <para>a real column vector of size N: the output amplitude modulation.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>	 IFLAW :</term>
        <listitem>
          <para>a real column vector of size N: the output instantaneous frequency law.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>
    <para>
      Returns the frequency modulation (FM), the amplitude
      modulation (AM) and the instantaneous frequency law (IFLAW)
      of the signal received by a fixed observer from a moving target
      emitting a pure frequency f0.
    </para>
  </refsection>

  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    rand("seed",0)
    N=512; 
    [fm,am,iflaw]=doppler(N,200,65,10,50);
    clf;
    subplot(211); plot(real(am.*fm));xtitle(_("Signal "))
    subplot(212); plot(iflaw);
    [ifhat,t]=instfreq(sigmerge(am.*fm,noisecg(N),15),11:502,10);
    plot(t,ifhat,'g');
    xtitle(_("Instantaneous frequency"))
    legend([_("Requested"),_("Observed")]);
    ]]></programlisting>
    <scilab:image><![CDATA[
    rand("seed",0)
    N=512; 
    [fm,am,iflaw]=doppler(N,200,65,10,50);
    clf;
    subplot(211); plot(real(am.*fm));xtitle(_("Signal "))
    subplot(212); plot(iflaw);
    [ifhat,t]=instfreq(sigmerge(am.*fm,noisecg(N),15),11:502,10);
    plot(t',ifhat,'g');
    xtitle(_("Instantaneous frequency"))
    legend([_("Requested"),_("Observed")]);
    ]]></scilab:image>
  </refsection>

  <refsection>
    <title>See also</title>
    <simplelist type="inline">
      <member><link linkend="dopnoise">dopnoise</link></member>
    </simplelist>
  </refsection>

  <refsection>
    <title>Authors</title>
    <simplelist type="vert">
      <member>H. Nahrstaedt - Aug 2010</member>
      <member>	F. Auger, July 94, August 95 - O. Lemoine, October 95.</member>
    </simplelist>
  </refsection>
</refentry>
