source: trunk/MagicSoft/Cosy/main/MTracking.cc@ 8871

Last change on this file since 8871 was 8871, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 20.2 KB
Line 
1#include "MTracking.h"
2
3#include "MLogManip.h"
4
5#include "macs.h"
6#include "shaftencoder.h"
7
8#include "MCosy.h"
9#include "SlaStars.h"
10
11#include "MDriveCom.h"
12
13ClassImp(MTracking);
14
15using namespace std;
16
17//#define EXPERT
18#undef EXPERT
19
20// --------------------------------------------------------------------------
21//
22// request the current positions from the rotary encoders.
23// use GetRePos to get the psotions. If the request fails the function
24// returns kFALSE, otherwise kTRUE
25//
26bool MTracking::RequestRePos()
27{
28 for (int i=0; i<2; i++)
29 {
30 //
31 // Send request
32 //
33 fCosy->fMac2->RequestSDO(0x6004);
34 fCosy->fMac1->RequestSDO(0x6004);
35
36 //
37 // Wait until the objects are received.
38 //
39 fCosy->fMac2->WaitForSdo(0x6004, 0, 500, i>0);
40 fCosy->fMac1->WaitForSdo(0x6004, 0, 500, i>0);
41
42 //
43 // If waiting was not interrupted everything is ok. return.
44 //
45 if (!Break())
46 return true;
47
48 fCosy->PrintError();
49 }
50
51 //
52 // If the waiting was interrupted due to a network error,
53 // print some logging message.
54 //
55 if (fCosy->HasError())
56 gLog << err << "ERROR - while requesting re pos from Macs (SDO #6004)" << endl;
57
58 return false;
59}
60
61// --------------------------------------------------------------------------
62//
63// Sets the tracking velocity
64//
65// The velocities are given in a ZdAz object in re/min. Return kTRUE
66// in case of success, kFALSE in case of failure.
67//
68Bool_t MTracking::SetVelocity(const ZdAz &v)
69{
70 for (int i=0; i<2; i++)
71 {
72 //
73 // Send the new velocities for both axes.
74 //
75 fCosy->fMac2->SendSDO(0x3006, 1, (LWORD_t)v.Zd()); // SetRpmVelocity [re/min]
76 fCosy->fMac1->SendSDO(0x3006, 1, (LWORD_t)v.Az()); // SetRpmVelocity [re/min]
77
78 //
79 // Wait for the objects to be acknoledged.
80 //
81 fCosy->fMac2->WaitForSdo(0x3006, 1, 500, i>0);
82 fCosy->fMac1->WaitForSdo(0x3006, 1, 500, i>0);
83
84 //
85 // If the waiting for the objects wasn't interrupted return kTRUE
86 //
87 if (!Break())
88 return kTRUE;
89
90 fCosy->PrintError();
91 }
92
93 //
94 // print a message if the interruption was due to a Can-node Error
95 //
96 if (fCosy->HasError())
97 gLog << err << "ERROR - while setting tracking velocity (SDO #3006)" << endl;
98
99 return kFALSE;
100}
101
102// --------------------------------------------------------------------------
103//
104// Initializes Tracking mode
105//
106// Initializes the accelerations of both axes with 90% of the maximum
107// acceleration. Set the status for moving and tracking and starts thr
108// revolution mode.
109//
110bool MTracking::InitTracking()
111{
112 // FIXME? Handling of Zombie OK?
113 if (fCosy->fMac1->IsZombieNode() || fCosy->fMac2->IsZombieNode())
114 return false;
115
116 //
117 // Start revolution mode
118 //
119 if (!SetAccDec(fCosy->fMac2, fTrackAcc, fTrackDec))
120 return false;
121
122 if (!SetAccDec(fCosy->fMac1, fTrackAcc, fTrackDec))
123 return false;
124
125 fCosy->fMac2->SetRpmMode(TRUE);
126 if (fCosy->fMac2->IsZombieNode())
127 return false;
128
129 fCosy->fMac1->SetRpmMode(TRUE);
130 if (fCosy->fMac1->IsZombieNode())
131 return false;
132
133 fCosy->SetStatus(MDriveCom::kMoving | MDriveCom::kTracking);
134
135 return true;
136}
137/*
138void MTracking::StopTracking()
139{
140 //
141 // Set status to Stopping
142 //
143 fCosy->SetStatus(MDriveCom::kStopping);
144
145 //
146 // set deceleration to 50%
147 //
148 cout << "Stopping tracking (dec=20%)..." << endl;
149 fCosy->fMac1->SetDeceleration(0.2*fMac1->GetVelRes());
150 fCosy->fMac2->SetDeceleration(0.2*fMac2->GetVelRes());
151
152 fCosy->fMac2->SendSDO(0x3006, 1, (LWORD_t)0); // SetRpmVelocity [re/min]
153 fCosy->fMac1->SendSDO(0x3006, 1, (LWORD_t)0); // SetRpmVelocity [re/min]
154 fCosy->fMac2->WaitForSdo(0x3006, 1);
155 fCosy->fMac1->WaitForSdo(0x3006, 1);
156
157 cout << "Waiting for end of movement..." << endl;
158 fCosy->WaitForEndMovement();
159
160 //
161 // Wait for the objects to be OKed.
162 //
163 fCosy->fMac1->SetRpmMode(FALSE);
164 fCosy->fMac2->SetRpmMode(FALSE);
165
166 //
167 // Wait for the movement to really be finished.
168 //
169 //cout << "Waiting for end of movement..." << endl;
170 //WaitForEndMovement();
171
172 //
173 // Check whether everything works fine.
174 //
175 fCosy->CheckForError();
176 cout << "Movement stopped." << endl;
177}
178*/
179// --------------------------------------------------------------------------
180//
181// Limits the speed.
182//
183// This function should work as a limiter. If a tracking error is too large
184// to be corrected fast enough we would get enormous velocities. These
185// velocities are limited to the maximum velocity.
186//
187Bool_t MTracking::LimitSpeed(ZdAz *vt, const SlaStars &sla) const
188{
189 // vt[re/min]
190
191 // Calculate approximate velocity of both axis
192 ZdAz vcalc = sla.GetApproxVel(fCosy->fRaDec); // [rad/rad]
193
194 //vcalc *= 1./(24*60); // [U_tel/min]
195 //vcalc *= fCosy->kGearTot; // [U_mot/min]
196 //vcalc *= fCosy->kResRE; // [re/min]
197
198 vcalc *= fCosy->kGearTot*fCosy->kResRE/(24*60); // [re/min]
199
200 // Set return code
201 Bool_t rc = kFALSE;
202
203 //
204 // How to limit the speed. If the wind comes and blowes
205 // we cannot forbid changing of the sign. But on the other hand
206 // we don't want fast changes!
207 //
208 ULong_t vrzd = fCosy->fMac1->GetVelRes();
209 ULong_t vraz = fCosy->fMac2->GetVelRes();
210
211#define sgn(x) (x<0?-1:1)
212
213 //
214 // When speed changes sign, the maximum allowed speed
215 // is 25% of the |v|
216 //
217 //const Float_t limit = 0.25;
218
219 //
220 // The maximum allowed speed while tracking is 10%
221 //
222 const Float_t maxtrack = 0.1;
223
224 if (fabs(vt->Az()) > maxtrack*vraz)
225 {
226 vt->Az(maxtrack*vraz*sgn(vcalc.Az()));
227 gLog << warn << "Warning: Azimuth speed limit (" << maxtrack*100 << "%) exceeded (" << fabs(vt->Az()) << " > " << maxtrack*vraz << ")... limited." << endl;
228 gLog << "Vcalc: " << vcalc.Zd() << " " << vcalc.Az() << "re/min" <<endl;
229 rc=kTRUE;
230 }
231 if (fabs(vt->Zd()) > maxtrack*vrzd)
232 {
233 vt->Zd(maxtrack*vrzd*sgn(vcalc.Zd()));
234 gLog << warn << "Warning: Altitude speed limit (" << maxtrack*100 << "%) exceeded (" << fabs(vt->Zd()) <<" > " << maxtrack*vrzd << ")... limited." << endl;
235 gLog << "Vcalc: " << vcalc.Zd() << " " << vcalc.Az() << "re/min" <<endl;
236 rc=kTRUE;
237 }
238 return rc;
239}
240
241// --------------------------------------------------------------------
242//
243// Return pointing position of the telescope based on the
244// Shaftencoders with interpolation with motor encoders.
245//
246// GetPointingPos [re]
247//
248ZdAz MTracking::GetPointingPosRE(Bool_t pdo) const
249{
250 // Conversion factor from se to re
251 //const XY re = fCosy->kGearTot/fCosy->kResSE; //[re/se]
252 const XY re = Div(fCosy->kGearTot, fCosy->kResSE); //[re/se]
253
254 // Check wether moving direction has changed
255 const bool bool1 = fCosy->fZd1->DirHasChanged();
256 const bool bool2 = fCosy->fZd2->DirHasChanged();
257
258 // If both directions have changed reset the flags
259 if (bool1 && bool2)
260 {
261 fCosy->fZd1->ResetDirHasChanged();
262 fCosy->fZd2->ResetDirHasChanged();
263 }
264
265 // Get shaftencoder positions
266 // Ignore the shaftencoder which has not yet changed its value
267 const Int_t pzd1 = fCosy->fZd1->GetPosDirCorrected();
268 const Int_t pzd2 = fCosy->fZd2->GetPosDirCorrected();
269 const Int_t paz = fCosy->fAz->GetPos();
270
271 const Int_t res1 = fCosy->fZd1->GetPhysRes();
272 const Int_t res2 = fCosy->fZd2->GetPhysRes();
273
274 // Get current shaftencoder position of the telescope
275 Double_t seposzd1 = ((pzd1+res1/2)%res1)*re.X();
276 Double_t seposzd2 = ((pzd2+res2/2)%res2)*re.X();
277 //Double_t seposzd1 = pzd1*re.X();
278 //Double_t seposzd2 = pzd2*re.X();
279 Double_t seposaz = paz *re.Y();
280
281 // distance between (To+dt) and To [re]
282 // position time difference < 5usec
283 // fRePos does the synchronization between the
284 // Shaft- and the rotary encoders
285 const ZdAz repos = pdo ? fCosy->GetRePosPdo() : fCosy->GetRePos();
286
287 // Get rotary encoder positions
288 // Get stored offset if one SE has not changed its direction yet
289 const Int_t offset1 = fCosy->fZd1->GetOffsetDirCorrected();
290 const Int_t offset2 = fCosy->fZd2->GetOffsetDirCorrected();
291
292 // Calculate the part of one SE which the motors moved
293 // since the last SE has changed its value
294 const Double_t offzd1 = repos.Zd() - offset1;
295 const Double_t offzd2 = repos.Zd() - offset2;
296 const Double_t offaz = repos.Az() - fCosy->fAz->GetOffset();
297
298 // Correct for the direction in which the motor is moving
299 // (in which the shaftencoders should change its values)
300 if (offaz<0)
301 seposaz += re.Y();
302 if (offzd1<0)
303 seposzd1 += re.X();
304 if (offzd2<0)
305 seposzd2 += re.X();
306
307 // If the correction exceeds one shaftencoder step stop interpolation
308 // of shaftencoder positions using rotary encoder values.
309 //ofstream fout("offsets.log", ios::app);
310 //fout << MTime(-1) << " " << offaz << " " << offzd1 << " " << offzd2 << endl;
311 /*
312 if (TMath::Abs(offaz)>re.Y())
313 offaz = TMath::Sign(re.Y(), offaz);
314 if (TMath::Abs(offzd1)>re.X())
315 offzd1 = TMath::Sign(re.X(), offzd1);
316 if (TMath::Abs(offzd2)>re.X())
317 offzd2 = TMath::Sign(re.X(), offzd2);
318 */
319
320 // and interpolate the shaftencoder steps using the motor
321 // encoder positon (Be carefull the minus-sign is important)
322 seposzd1 += offzd1;
323 seposzd2 -= offzd2;
324 seposaz += offaz;
325
326 return ZdAz((seposzd1-seposzd2)/2, seposaz);
327}
328
329void MTracking::TrackPosition(const RaDec &dst) // ra, dec [rad]
330{
331 SlaStars sla(fCosy->fObservatory);
332
333 //
334 // Position to actual position
335 //
336 sla.Now();
337 ZdAz dest = sla.CalcZdAz(dst);
338
339 gLog << all << sla.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl;
340
341 // If the star is culminating behind the zenith (South) we want to
342 // align the azimuth angle between -180 and 180deg. If the star is
343 // culminating before the zenith (north) we want the star to be
344 // aligned between -180 and 180deg (which is the default of CalcZdAz)
345 if (sla.GetPhi()>dst.Dec() && dest.Az()<0)
346 {
347 // align az from -180/180 to 0/360
348 gLog << inf2 << "Star culminating behind zenith: Adding 360deg to Azimuth " << dest.Az()*kRad2Deg << endl;
349 dest.Az(dest.Az() + TMath::TwoPi());
350 }
351
352 // Position the telescope to the current local position of the
353 // star. Do not reposition but start the tracking after the
354 // first positioning step
355 if (!SetPosition(dest, kTRUE))
356 {
357 gLog << err << "ERROR - Cannot start tracking, positioning failed." << endl;
358 return;
359 }
360
361 //
362 // calculate offset from present se position
363 //
364 //const ZdAz sepos = fCosy->GetSePos()*fCosy->kGearTot/fCosy->kResSE; //[re]
365 if (!RequestRePos())
366 return;
367
368 // Estimate Offset before starting to track
369 ZdAz repos = fCosy->GetRePos();
370 fCosy->fZd1->SetOffset(TMath::Nint(repos.Zd()));
371 fCosy->fZd2->SetOffset(TMath::Nint(repos.Zd()));
372 fCosy->fAz->SetOffset(TMath::Nint(repos.Az()));
373
374 fCosy->SetTrackingPosRE(GetPointingPosRE());
375
376 // Initialize Tracker (slalib or starguider)
377 fCosy->fRaDec = dst;
378
379 RunThread();
380
381 //
382 // Init accelerations and Rpm Mode
383 //
384 if (!InitTracking())
385 {
386 fCosy->StopMovement();
387 return;
388 }
389
390 // Get current nominal local position
391 sla.Now();
392 ZdAz pos = sla.CalcZdAz(fCosy->fRaDec);
393
394 // Some output
395 XY xy(TMath::RadToDeg()*dst.Ra()*24/360, TMath::RadToDeg()*dst.Dec());
396 gLog << all << sla.GetTime() << " - Start Tracking: Ra=" << xy.X() << "h Dec=";
397 gLog << xy.Y() << "\xb0 @ Zd=" << pos.Zd()*kRad2Deg <<"deg Az=" << pos.Az()*kRad2Deg <<"deg" << endl;
398
399 //
400 // We want to reach the theoretical position exactly in about 0.5s
401 //
402 // *OLD*const float dt = 1; // 1 second
403 const float dt = 5;//3; // 2 second
404 while (!Break())
405 {
406 //
407 // Request Target position for Now+dt
408 //
409 sla.Now(dt);
410
411 //
412 // Request nominal position for this time in the future (To+dt)
413 //
414 const ZdAz pointing = sla.CalcZdAz(fCosy->fRaDec); // [rad]
415 ZdAz dest = fCosy->AlignTrackingPos(pointing); // fix ambiguity
416
417 //ZdAz vcalc = sla.GetApproxVel(fCosy->fRaDec);
418 //vcalc *= fCosy->kGearRatio2*4./60.; // [re/min]
419
420 float dtime = -1;
421 //if (kFALSE /*fUseStarguider*/)
422 // dtime = Starguider(sla.GetMjd(), dest);
423
424 ZdAz repos;
425 if (dtime<0)
426 {
427 dest = fCosy->fBending(dest); // [rad]
428 if (!fCosy->CheckRange(dest))
429 break;
430
431 // Destination position at t+dt in re-units
432 dest *= fCosy->kGearTot/TMath::TwoPi(); // [re]
433
434 // Request absolute position of rotary encoder from Macs
435 // Such that the RE position used in GetPointingPos is
436 // as up-to-date as possible.
437// DO I NEED THIS OR IS THE PDOPOS ENOUGH?
438 if (!RequestRePos())
439 break;
440
441 // *NEW* offset handling
442 // Get current position of the telescope and
443 // forward this position to MCosy
444 ZdAz sepos = GetPointingPosRE(); //[re]
445 fCosy->SetTrackingPosRE(sepos);
446
447 // distance between (To+dt) and To [re]
448 // position time difference < 5usec
449 // fRePos does the synchronization between the
450 // Shaft- and the rotary encoders
451 repos = fCosy->GetRePos();
452
453 // Now calculate the distance to move from now
454 // to a time in t+dt.
455 dest -= sepos;
456
457 dtime = dt;
458 }
459
460 //
461 // Velocity to go [re/min] to reach the right position at time t+dt
462 // correct for the duration of RaDec2AltAz
463 //
464 /* --- OLD --- */
465 ZdAz v = dest*60.0/dtime; //[re/min]
466 /* --- NEW --- seems to work worse! */
467 //const Double_t dtaz = sla.GetTime() - fCosy->fMac1->GetPosTime();
468 //const Double_t dtzd = sla.GetTime() - fCosy->fMac2->GetPosTime();
469 //
470 //ZdAz v = dest*60.0;
471 //v.Zd(v.Zd()/dtzd);
472 //v.Az(v.Az()/dtaz);
473 /* --- END --- */
474
475 //*fCosy->fOutRep << "> Dt: " << dtaz << " " << dtzd << endl;
476
477 if (LimitSpeed(&v, sla))
478 {
479 gLog << dbg << "vt: " << v.Zd() << " " << v.Az() << "re/min" << endl;
480 gLog << "Dest: " << dest.Zd() << " " << dest.Az() << endl;
481 }
482
483 //
484 // calculate real velocity of future [re/min]
485 // believing the Macs manual '/4' shouldn't be necessary, but it is.
486 //
487 ZdAz vt = v; //[re'/min]
488 //lout << " " << vt.Zd() << " " << vt.Az() << " ";
489 vt.Round();
490 //lout << " " << vt.Zd() << " " << vt.Az() << endl;
491
492 //
493 // check if the drive is fast enough to follow the star
494 //
495 if (vt.Zd()>.9*fCosy->fMac1->GetVelRes() || vt.Az()>.9*fCosy->fMac2->GetVelRes())
496 {
497 gLog << err << "ERROR - Tracking speed faster than 90% of possible maximum velocity." << endl;
498 break;
499 }
500
501 //
502 // Set theoretical velocity (as early after calculation as possible)
503 // Maybe we should attenuate the changes
504 //
505 //*fCosy->fOutRep << "> SetVelocity1: " << vt.Zd() << " " << vt.Az() << endl;
506 if (!SetVelocity(vt))
507 break;
508 //*fCosy->fOutRep << "> SetVelocity2 " << endl;
509
510 //
511 // Now do 'unnecessary' things (timing)
512 //
513 fCosy->fVelocity = vt/fCosy->kGear; // [U_mot/min]
514 // *OLD* fVelocity = vt/kGearRatio2*4;
515
516 if (fOut)
517 {
518 fOut->Lock("MTracking::TrackPosition");
519 *fOut << "RE-REPORT 00 " << MTime(-1) << " " << repos.Zd() << " " << repos.Az() <<" " << vt.Zd() << " " << vt.Az() << endl;
520 fOut->UnLock("MTracking::TrackPosition");
521 }
522
523 //
524 // Update speed as often as possible.
525 // make sure, that dt is around 10 times larger than the
526 // update time
527 //
528 // The loop should not be executed faster than the ramp of
529 // a change in the velocity can be followed.
530 // (This is important on fast machines >500MHz)
531 //
532 usleep(1000000); // 1s
533 }
534
535 sla.Now();
536
537 CancelThread();
538
539 // If CancelPoints are used we have to make this a Cleanup!
540 fCosy->StopMovement();
541
542 gLog << all << sla.GetTime() << " - Tracking stopped @ Zd=";
543 gLog << fCosy->fZdAzSoll.Zd()*TMath::RadToDeg() <<"deg Az=";
544 gLog << fCosy->fZdAzSoll.Az()*TMath::RadToDeg() <<"deg" << endl;
545}
546
547Int_t MTracking::Thread()
548{
549 if (fCosy->fZd1->IsZombieNode() && fCosy->fZd2->IsZombieNode())
550 return 1;
551
552 if (fCosy->fAz->IsZombieNode())
553 return 2;
554
555 if (!fCosy->fMac1 || !fCosy->fMac2)
556 return 3;
557
558 gLog << inf2 << "- Tracking Thread started (" << MTime(-1) << ")" << endl;
559
560 //const XY re2se = fCosy->kGearTot/fCosy->kResSE; //[re/se]
561
562 SlaStars sla(fCosy->fObservatory);
563 sla.Now();
564
565 //ZdAz time;
566
567 ZdAz soll = sla.CalcZdAz(fCosy->fRaDec); // [rad]
568
569 //
570 // only update fTrackingError while tracking
571 //
572 bool phca1=false;
573 bool phca2=false;
574 bool phcaz=false;
575
576 //ZdAz wasse = fCosy->GetSePos();
577 //ZdAz oldse = fCosy->GetSePos();
578
579 while (1)
580 {
581 // Make changes (eg wind) smoother - attenuation of control function
582 // This is the time constant which defines how fast
583 // you correct for external influences (like wind)
584 //const float weight = 1.; //0.3;
585
586 // Check for changes of the shaftencoder values
587 //*fCosy->fOutRep << "> ResetPosHasChanged" << endl;
588 fCosy->fZd1->ResetPosHasChanged();
589 fCosy->fZd2->ResetPosHasChanged();
590 fCosy->fAz->ResetPosHasChanged();
591 //*fCosy->fOutRep << "> Check for PosHasChanged" << endl;
592 do
593 {
594 phca1 = fCosy->fZd1->PosHasChanged();
595 phca2 = fCosy->fZd2->PosHasChanged();
596 phcaz = fCosy->fAz->PosHasChanged();
597
598 usleep(1);
599 TThread::CancelPoint();
600
601 } while (!phca1 && !phca2 && !phcaz);
602
603 // Get time from last shaftencoder position change (position: ist)
604 // FIXME: Is this correct?
605 // time.Az(fCosy->fMac1->GetMjd());
606 // time.Zd(fCosy->fMac2->GetMjd());
607
608 //Double_t mjd1 = fCosy->fZd1->GetMjd();
609 //Double_t mjd2 = fCosy->fZd2->GetMjd();
610 //Double_t mjd0 = fCosy->fAz->GetMjd();
611
612 Double_t mjdaz = fCosy->fMac1->GetPdoMjd();//mjd0;
613 Double_t mjdzd = fCosy->fMac2->GetPdoMjd();//TMath::Max(mjd1, mjd2);
614
615 // get current position of shaftencoders (interpolated
616 // using motor encoders)
617 const ZdAz istse = GetPointingPosRE(kTRUE)/fCosy->kGearTot*TMath::TwoPi();
618 //const ZdAz istse = fCosy->GetSePosPdo();
619
620 // calculate offset for both axis (only one is needed)
621 // *NEW* offset handling
622 //.const ZdAz offset = istre; //(istse*re2se - istre)*weight + fRePos*(weight-1);
623 // if Shaftencoder changed position, calculate nominal position
624 if (phca1 || phca2)
625 {
626 ZdAz dummy = sla.CalcZdAz(fCosy->fRaDec, mjdzd);
627 dummy = fCosy->AlignTrackingPos(dummy);
628 fCosy->fZdAzSoll.Zd(dummy.Zd());
629 soll.Zd(fCosy->fBending(dummy).Zd()); // [rad]
630
631 fCosy->fTrackingError.Zd(soll.Zd()-istse.Zd());
632
633 TThread::CancelPoint();
634 }
635 if (phcaz)
636 {
637 ZdAz dummy = sla.CalcZdAz(fCosy->fRaDec, mjdaz);
638 dummy = fCosy->AlignTrackingPos(dummy);
639 fCosy->fZdAzSoll.Az(dummy.Az());
640 soll.Az(fCosy->fBending(dummy).Az()); // [rad]
641
642 fCosy->fTrackingError.Az(soll.Az()-istse.Az());
643
644 TThread::CancelPoint();
645 }
646
647
648 //fCosy->fZdAzSoll = soll;
649/*
650 // Calculate the aligned tracking position from 'soll'-position
651 if (phca1 || phca2)
652 fCosy->fTrackingError.Zd(soll.Zd()-istse.Zd());
653 if (phcaz)
654 fCosy->fTrackingError.Az(soll.Az()-istse.Az());
655 */
656 }
657
658 gLog << inf2 << "- Tracking Thread done. (" << MTime(-1) << ")" << endl;
659 return 0;
660}
Note: See TracBrowser for help on using the repository browser.