Greyline on Xplanet?

9 posts / 0 new
Last post
sq9lbe
Greyline on Xplanet?

Hi,
Would it be possible to implement greyline function into xplanet?
The greyline as it is now, has a terrible map res. And tried to change the map to something better as explained how to do so in other topic, but that doesn't work.
Xplanet has a nice function, is to display spots from Dxcluster.
Thnx

vk3ou
Greyline on Xplanet?

I modified the last 2 lines of the geoconfig file located in cqrlog/xplanet/ thus:

twilight=10
shade=35

What would be interesting is if cqrlog could output a text file (called "rotator" or similar) alongside the marker file with 2 co-ords: a home lat/long, and a lat/long based on current rotator position.
Something like this:

-38.0 143.0 11.6 43.14 thickness=1.5

Then you could add the arc into xplanet via the script commands:

arc_color=red
arc_file=/.config/cqrlog/xplanet/rotator

and it would graphically show you where your antenna is pointing on the xplanet map

Andy
VK3OU

oh1kh
Greyline on Xplanet?

Hi!
Just wrote short/long path plotting routines with adjustable thickness for grayline map. That appears in version 2.6.0
If I remember right calling xplanet has some parameters to show heard stations. Could that be used instead of a file?

Path lines are easy to produce when we know opponent callsign. Then we can point from own locator to known country/prefix area, or if station locator is known, towards it.
In case of rotator we have different situation:
1)Not all users have rotator.
2)How long the arc should be if we base it only to rotator direction without having opponent callsign known?

But if a callsign is filled in newqso then station lat/lon and opponent lat/lon can be easily exported.

So what do you mean with "lat/long based on current rotator position". I has only direction known that can not be converted to lat/lon pair.

--
Saku
OH1KH

vk3ou
Greyline on Xplanet?

Hi Saku
So,... my 3rd attempt at writing a reply - the forum keeps kicking me out.

1) CRQLog is excellent - I've been using it for only 6 months, and I am impressed. It integrates really well with my station and is truly feature-rich.
2) I am running ver 2.6.0 (103), and the plots on the greyline map work well.
3) I have just added rotator control (via wifi - rotctld accepts ip addresses too - thanks for the tip!) and it would be nice to see a great-circle map on the screen with a line where the rotator is pointing. xplanet can easily do this, it just needs an "arc file" with 2 co-ords - a start lat/lon and an end lat-lon. Given CQRLog already generates a "marker" file which plots dxcluster spots on xplanet,, i thought it wouldn't be too far to go to and add an extra file to show antenna pointing.

To answer your points directly:
1) Yes, this is totally pointless if you don't have a rotator.
2) Arc length can be anything from (say)1000km to 16,000km or so. It just requires some maths to calculate a "target"lat/lon based on
(i) observer lat/lon,
(ii) azim, range and elev (which we can set to 0)

I did think of trying this out myself with a local copy of the source file (the maths is relatively simple but I am hopeless with Pascal).

I also tried to upload a screenshot of what xplanet would look like with a red arc showing antenna direction, but cannot seem to get the upload to work on the forum.

In any case, this is just a bit of fun and regardless does not detract from what is a great logger.

Cheers and thanks

Andy

Andy
VK3OU

oh1kh
Greyline on Xplanet?

HI Andy !
If you like to play here https://github.com/OH1KH/cqrlog/tree/rot_xpl/ is the sandbox for you.
The change is in src/fRotControl.pas, at the end of file. At beginning of file there is one unit more defined: "math".

It makes "rotor" file to xplanet folder with lat, lon(station) lat,lon(rotor) thickness=1,5 like you stated.
Station coordinates comes from station locator (preferences/station, or if changed in fly at NewQSO Ctrl+L)
rotor coordinates are calculated from distance and bearing, but the formula has something wrong. I did not have time to check it. All calculations should be done in radians DegToRad() or RadToDec() to convert.

Feel free to fix, hi!
And show what you have created:
Change "Text format Filtered HTML" below message editing box to " Full HTML" and after that enable Rich edit (it appears under edit box, too).
After that you can write and also paste images. Note that big images may not show up properly (use preview).

--
Saku
OH1KH

vk3ou
Thanks Saku

Thanks Saku

You are fast! I'll have a play with it now..

Meanwhile, I've been mucking about with xplanet and a simple Octave script to calculate arcs. The idea is that the red arc is the beam heading, the yellow sector is the beamwidth (here set at 30deg):

I have had to run xplanet from console, to allow for more config options. For what it's worth (not a lot), here's my octave script to calculate things:

a = 6378137.0;              ## WGS-84 semi-major axis
DEG_TO_RAD=(pi/180.0);      ## Degrees to Radians conversion factor
RAD_TO_DEG=(180.0/pi);      ## Radians to Degrees conversion factor

Target.HomeLat = -38;       ## Home lat and lon
Target.HomeLon=144;        
Target.Range = 18000e3;      ## Length of arc to draw
Target.Bearing = 272;       ## bearing of arc from true north
 
Antenna.BeamWidth = 30;
Antenna.CcwBeam = Target.Bearing-Antenna.BeamWidth;
Antenna.CwBeam = Target.Bearing+Antenna.BeamWidth;
 
    
Target.PointerLat =RAD_TO_DEG*asin(sin(Target.HomeLat*DEG_TO_RAD)*cos(Target.Range/a) +...
cos(Target.HomeLat*DEG_TO_RAD)*sin(Target.Range/a)*cos(Target.Bearing*DEG_TO_RAD));
Target.PointerLon= RAD_TO_DEG*(Target.HomeLon*DEG_TO_RAD + ...
atan2(sin(Target.Bearing*DEG_TO_RAD)*sin(Target.Range/a)*cos(Target.HomeLat*DEG_TO_RAD),...
cos(Target.Range/a)-sin(Target.HomeLat*DEG_TO_RAD)*sin(Target.PointerLat*DEG_TO_RAD)));
 
Target.Range = Target.Range*1.0;
Target.CcwLat =RAD_TO_DEG*asin(sin(Target.HomeLat*DEG_TO_RAD)*cos(Target.Range/a) +...
cos(Target.HomeLat*DEG_TO_RAD)*sin(Target.Range/a)*cos(Antenna.CcwBeam*DEG_TO_RAD));
Target.CcwLon= RAD_TO_DEG*(Target.HomeLon*DEG_TO_RAD + ...
atan2(sin(Antenna.CcwBeam*DEG_TO_RAD)*sin(Target.Range/a)*cos(Target.HomeLat*DEG_TO_RAD),...
cos(Target.Range/a)-sin(Target.HomeLat*DEG_TO_RAD)*sin(Target.CcwLat*DEG_TO_RAD)));
 
Target.CwLat =RAD_TO_DEG*asin(sin(Target.HomeLat*DEG_TO_RAD)*cos(Target.Range/a) +...
cos(Target.HomeLat*DEG_TO_RAD)*sin(Target.Range/a)*cos(Antenna.CwBeam*DEG_TO_RAD));
Target.CwLon= RAD_TO_DEG*(Target.HomeLon*DEG_TO_RAD + ...
atan2(sin(Antenna.CwBeam*DEG_TO_RAD)*sin(Target.Range/a)*cos(Target.HomeLat*DEG_TO_RAD),...
cos(Target.Range/a)-sin(Target.HomeLat*DEG_TO_RAD)*sin(Target.CwLat*DEG_TO_RAD)));
 
pointer = cstrcat('# Range = ',num2str(Target.Range/1000),"km\n",'# Bearing = ',num2str(Target.Bearing),"deg\n",'# BeamWidth = ',num2str(Antenna.BeamWidth),"deg\n")
pointer = cstrcat(pointer,num2str(Target.HomeLat),' ',num2str(Target.HomeLon),' ',num2str(Target.PointerLat),' ',num2str(Target.PointerLon),' thickness=4 color=red');
pointer = cstrcat(pointer,"\n",num2str(Target.HomeLat),' ',num2str(Target.HomeLon),' ',num2str(Target.CcwLat),' ',num2str(Target.CcwLon),' thickness=1.5 color=yellow')
pointer = cstrcat(pointer,"\n",num2str(Target.HomeLat),' ',num2str(Target.HomeLon),' ',num2str(Target.CwLat),' ',num2str(Target.CwLon),' thickness=1.5 color=yellow')
pointer = cstrcat(pointer,"\n",num2str(Target.CcwLat),' ',num2str(Target.CcwLon),' ',num2str(Target.CwLat),' ',num2str(Target.CwLon),' thickness=1.5 color=yellow')
save("pointer","pointer");

Cheers

Andy

Andy
VK3OU

vk3ou
Saku,

Saku,

I've had a play in the sandbox :-)

Just some simple stuff to get it going. I'm going to try and add some input boxes to the forms to enable/disable the pointer (if I can - I am hopless with programming!)

I built the executable to a separate folder, and am currently running from there to test with.Your code was spot on - just needed a few tweaks to go...

What would be the best way to "install" it properly? Should I just overwrite the executable in my /usr folder?? I am very new to linux (as you can tell)

 

 

Andy
VK3OU

oh1kh
Greyline on Xplanet?

HI Andy!
Modifying forms you need to use Lazarus-ide. Once it is started open project cqrlog.lpi in src/ folder.
I assume you want checkbox(es) to rotor control form, so use Project/forms and type "rot" to find rotor controller form and select it.
Then at top of ide you see icons in tab/standard. Click the checbox icon and then clic rotor control form to drop it.
Then you have to write code using it.

You can send me email for future questions. My address is ok at HamQTH and qrz.

You can run "make" and "sudo make install" in the root of your folder, but as well in this case you can just copy src/cqrlog to /usr/bin.
Running from your folder as src/cqrlog it needs a symlink "share" to your folder root that points to /usr/share to get rid of starting errors.

--
Saku
OH1KH

oh1kh
Greyline on Xplanet?

HI Andy!
Modifying forms you need to use Lazarus-ide. Once it is started open project cqrlog.lpi in src/ folder.
I assume you want checkbox(es) to rotor control form, so use Project/forms and type "rot" to find rotor controller form and select it.
Then at top of ide you see icons in tab/standard. Click the checbox icon and then clic rotor control form to drop it.
Then you have to write code using it.

You can send me email for future questions. My address is ok at HamQTH and qrz.

You can run "make" and "sudo make install" in the root of your folder, but as well in this case you can just copy src/cqrlog to /usr/bin.
Running from your folder as src/cqrlog it needs a symlink "share" to your folder root that points to /usr/share to get rid of starting errors.

--
Saku
OH1KH