!
!  Id: swWobbler.inc,v 1.0.5 2006-10-19 Hans Ungerechts
!
Call pakoXMLwriteStartElement("RESOURCE","switching",                            &
     &                         comment="generated by paKo",                      &
     &                         space ="before",                                  &
     &                         error=errorXML)
!
valueC = swMode%Wobb
Call pakoXMLwriteElement("PARAM","mode",valueC,                                  &  
     &                         dataType="char",                                  &
     &                         error=errorXML)
!
Write (valueC,*) vars(iValue)%nCycles
Call pakoXMLwriteElement("PARAM","nCycles",valueC,                               &
     &                         dataType="int",                                   &
     &                         unit="--",                                        &
     &                         error=errorXML)
!
Write (valueC,*) 2
Call pakoXMLwriteElement("PARAM","nPhases",valueC,                               &
     &                         dataType="int",                                   &
     &                         unit="--",                                        &
     &                         error=errorXML)
!
Write (valueC,*) vars(iValue)%tPhase
Call pakoXMLwriteElement("PARAM","timePerPhase",valueC,                          &
     &                         "s", "float",                                     &
     &                         error=errorXML)
!
Write (valueC,*) vars(iValue)%tRecord
Call pakoXMLwriteElement("PARAM","timePerRecord",valueC,                         &
     &                         "s", "float",                                     &
     &                         error=errorXML)
!
value = Abs(vars(iValue)%wOffset(1))+Abs(vars(iValue)%wOffset(2))
Write (valueC,*) Real(value*arcsec)
Write (valueComment,*) Real(value), " ", au%arcsec
Call pakoXMLwriteElement("PARAM","wobblerThrow",valueC,                          &
     &                         "rad", "float",                                   &
     &                         comment=valueComment,                             &
     &                         error=errorXML)
!
!TBD value = vars(iValue)%wAngle
!TBD Write (valueC,*) Real(value*deg)
!TBD Write (valueComment,*) Real(value), " ", au%degree
!TBD Call pakoXMLwriteElement("PARAM","wobblerAngle",valueC,                          &
!TBD      &                         "rad", "float",                                   &
!TBD      &                         comment=valueComment,                             &
!TBD      &                         error=errorXML)
!
!!$      write (valueC,*) vars(iValue)%wOffset(1)*arcsec
!!$      write (valueComment,*) real(vars(iValue)%wOffset(1)), au%arcsec
!!$      call pakoXMLwriteElement("PARAM","wobblerOffset1",valueC,        &
!!$     &                         "rad", "float",                         &
!!$     &                         comment=valueComment,                   &
!!$     &                         error=errorXML)
!!$!
!!$      write (valueC,*) vars(iValue)%wOffset(2)*arcsec
!!$      write (valueComment,*) real(vars(iValue)%wOffset(2)), au%arcsec
!!$      call pakoXMLwriteElement("PARAM","wobblerOffset2",valueC,        &
!!$     &                         "rad", "float",                         &
!!$     &                         comment=valueComment,                   &
!!$     &                         error=errorXML)
!!$!
!
Call pakoXMLwriteEndElement  ("RESOURCE","switching",                            &
     &                         space="after",                                    &
     &                         error=errorXML)
!
