I created two UHF NEXEDGE system LCN calculators!

Status
Not open for further replies.

IcomIcR20

Member
Premium Subscriber
Joined
Jun 16, 2014
Messages
884

lbarowski

Newbie
Joined
Jan 24, 2022
Messages
1
I am not sure why google didn't like the newest edit. The only difference was that I changed "scanf" to "scanf_s" to keep Visual Studio happy.

It's just a false positive from their virus scanner, which is very common. The scanf change is not the difference, it's that you compiled on Visual Studio rather than Cygwin and their executable structures are different. Something in there looks like something in some known virus. A MinGW compilation of the same code would probably pass.
 

EricCottrell

Member
Premium Subscriber
Joined
Nov 8, 2002
Messages
2,414
Location
Boston, Ma
Hello,

You can use a cast to convert the double to an int.
printf("The LCN is: %d\n", (int)(resultLcn+0.5);

There are format modifiers to printf that allow control of the decimal point.
If you want to only print 4 digits after the decimal point.
printf("The frequency is: %.4lf MHz\n", resultFreq);

73 Eric
 

lwvmobile

DSD-FME
Joined
Apr 26, 2020
Messages
1,302
Location
Lafayette County, FL
Speak of the devil and he shall appear; or rather, look at some of his own threads and he shall appear.

Did want to ask you, in the NXDN Trunking pinned thread, are the base values in this thread still mostly accurate, or was more info discovered to map these out, and also, is the 12.5 and 6.25 Khz stepping values based on whether its NXDN96 or NXDN48, or are those independent of the type of system, and configured on a site per site basis?


Anyways, here is the code I wrote up for this so far, and also just wanted to let you know I occassionally peak at your dsd code on github from time to time for hints on DMR and I still have the EDACS-EA stuff too, I've just finished porting that into DSD-FME as well.

Screenshot from 2022-11-16 10-38-09.png
 

IcomIcR20

Member
Premium Subscriber
Joined
Jun 16, 2014
Messages
884
Any objections if I use a modified version of this in DSD-FME?
Apologies for the delayed response. I have no objections; However, I would be sure to test it thoroughly as I seem to recall that someone found a bug in one of the programs a while back. I have not gone back to test and see if I can replicate it though.
 

lwvmobile

DSD-FME
Joined
Apr 26, 2020
Messages
1,302
Location
Lafayette County, FL
Apologies for the delayed response. I have no objections; However, I would be sure to test it thoroughly as I seem to recall that someone found a bug in one of the programs a while back. I have not gone back to test and see if I can replicate it though.

That's alright, the code is in there now anyways, if there are any errors, then I'll just wait for somebody to mention it to me. I don't exactly have any trunking NXDN systems nearby to test it on, so if I get any complaints in the future, I can look at it then and fix it.
 
Status
Not open for further replies.
Top