NaP3 v1.2.0

V 1.2.0 CHANGES:
•	The default database changes, write down any settings you want to save before installing. Move/export the database if you change rigs. There will be unexpected effects otherwise - running a K3 with a Yaesu definition can make the K3 go into transmit.

*** New features ***
*NaP3 Expand/Collapse has been reconfigured. Menu RUN/STOP replaces the Power button
*A choice of skins. I favour content over style.
*It is now possible to save centre frequency and Fixed or Free tuning *per mode, per band* so that users can go straight to a centre of interest on any band and view with the desired span parameters.
(If you are unfamiliar with NaP3, you might like familiarise yourself with the main controls before setting mode spans.).

To set:
*In each mode, set resolution and wheeltune steps to your preferred values; the controls are to the left of the S Meter. The settings will apply to these modes across all bands. Modes are saved in pairs, so LSB/USB use the same setting, as do CWL/CWU. Yaesu set RTTY-L /RTTY-U and PKT-L/PKT-U pairs, the K3 sets each of the four data modes separately, pairing Normal and Reverse.
*If you do not wish to set centres of interest, go to the next page.
*On any band, tune to your chosen centre for a mode, Centre the span, set the span width for the segment of interest, set Fixed or Free tuning and do a Ctrl+right click on the Centre button. A message will warn you that you are about to save these settings for this band. This can be overwritten at any time.
*Repeat as desired for other modes and bands; the values will only be saved when you exit NaP3. 
*Now, at any time, a right click on the Centre button will reset to the saved ‘view’ for the selected mode. A left click Centres the passband in the usual way.
*A mode change by the rig will use the existing VFO frequency but use the resolution, wheeltune setting and Fixed/Free for the new mode. A Centre button right click moves to the centre frequency for the new mode, but if you prefer a rig mode change to automatically go to the chosen centre frequency, check ‘Centre modes’ in Configure/Options/ Miscellaneous. 
*The NaP3 bandstack is no longer used except for GEN and 60m, where it is five deep. Repeated clicks on these Band buttons will cycle through your settings for these bands.

The span settings will only be saved when you exit NaP3, so turn it off and on again to save whatever you have laboriously put in. And then save a copy of the database somewhere, just in case.

 Don't like all this? Set full span, turn off Fixed, etc and right click on the Centre button to overwrite the setting for that mode.

Other changes:
•	NaP3 follows rig filters.
•	K3 ssb presets now shift centre down as width narrows.
•	K3 data mode filter presets are fully functional for DATA A.
•	Bandstacked filters have been removed from NaP3; rigs already bandstack their own filter settings per mode. NaP3 filters follow CAT commands for width and shift in supported rigs.
•	Slider for coarse span zoom, mousewheel hover on the slider or Page Up/Page Down keys for fine adjustment of 1.0kHz per step. A right click on the trackbar will set to that value immediately. The span width is shown at the bottom of the display.
•	Memory form removed; the format is closely bound to Flex modes, most rigs have better memories.
•	Res (no. of fft bins) has been moved to the console.
•	The resolution has a default of 16384 for 192kHz sample rate, 8192 for 96kHz and 4096 for 48kHz. 
•	Res range increased up to 131072 for those looking for weak signals in a narrow span; the noise floor drops as the res is increased.  If you use a high resolution in a wide span, the display will show every spurious signal floating around your shack that used to be below noise. This is not a fault.
•	Fixed button now reads Free when unchecked.
•	Fixed tune position preserved during span zoom.
•	The grey 'hyperspace' areas either side of maximum span also zoom properly.
•	Fixed mode tunes properly across span boundaries.
•	Option for S unit display grid ('S Units' in Configure/Display/Spectrum Grid) It shows absolute levels, S9 is -73dBm and units are 6dB apart .
•	Meter zeroing removed. dBm meter always reads from DttSP as before.
•	The Edge and LED meters now have an option to use hi-res values from the K3, Yaesu (Configure/Display/Multimeter:  'Use Rig Value'). 
•	Taken need for Ctrl key out of the display gain mouse hover (Avg) and the Pan/waterfall proportion mouse hover (Peak).
•	The K3 data mode CAT bug remains. Any K3 mode change will cause the data mode returned by CAT to revert to the data mode at rig switch-on.
•	"Other instances" message suppressed for command line start with -autopath present.
•	'Listen through' is now right click on MAIN audio level slider; saved between sessions.
•	The MAIN, and SUB audio gain controls no longer interact, allowing MUT to work correctly.
•	The mousewheel no longer affects the Avg, Peak and Span hover functions in SpanaFall display mode.
•	An Options tab setting has been added to show the four VFO Controls in Collapsed mode.
•	The SUB button turns the NaP3 sub receiver on/off if listening to NaP3 audio output. It also turns the K3, FT5K or FT2K sub receiver on/off (if K3 has KRX3 is installed); with the KX3 it also turns Dual Watch on/off.
•	Polyphase gone from Display; it trivially increased resolution at Res 4096 and 8192 surpasses it.

Yaesu 
The preset filter buttons only work if values are within the ranges allowed by the mode and current NAR button setting. E.g.in NAR ssb, a NaP3 preset wider than 1.8kHz will not work.
The filter preset defaults are set for the K3, which has continuous width variation,  and will need adjusting for Yaesu, which has an indexed range of values.
Values here for Yaesu IF offsets - (if global offset correct) are:
LSB/USB = 1460/-1460
CWL/CWU = cw pitch/-cw pitch
RTTYL/RTTYU = centre of tone pair (1360 for 1275/1445)
PKTL/PKTU = the menu setting for the tone offset.

K2
No hardware to test against. Using Mode buttons for those modes not available on the K2 will leave the K2 in its existing mode; NaP3 output will be in the new mode.

KX3
No hardware to test against. Should follow the majority of K3 commands.

Kenwood 
The CAT shift/width information needed for NaP3 to auto-set the passband display is mixed between commands and modes, and complete shift/width information is not available.
 The NaP3 display passband can be set from the filter preset buttons (right click to set your preferred values) but this will not adjust the rig values.
No Kenwood rig is available for testing but the following was found by feeding a K3 with 'Kenwood TS-940S' selected:
The CW passband will be centred on the 'CW Pitch' setting in the Options tab if, in the 'IF Frequencies' tab, CWL is set to the CW Pitch and CWU is set to -CW Pitch (i.e. -ve).
The DIGL/U passbands will use the values from 'RTTY Tone Pairs' in the Options tab if, in the 'IF Frequencies' tab, FSKL and FSKU are set to:
  915/1085 tones	  775 and 1945
1275/1445   “		1125 and 1585
1445/1615  “		1305 and 1415
2125/2295  “		1985 and 725
Click tuning also works for CW and FSK set in this way.

NB all rigs:
SPLIT will show yellow delimiters for the TX signal position. RX B allows the split frequency to be listened to. RIT/XIT will similarly show delimiters where the RX/TX passband has moved to as a result of RIT/XIT. The yellow transmit passband edge markers may be disabled in the right click context menu on the SPLIT button.

*Configure/Options/Disable ToolTips will make them disappear if you are sick of  seeingthem!
NaP3 v1.1.0

•	The database changes, write down any settings you want to save.
•	Rig type changes are smoother and faster BUT reset or rename the database if you change rigs. Export the existing one first if you want to save previous settings. There will be unexpected effects otherwise - running a K3 with a Yaesu definition can make the K3 go into transmit.

CHANGES:
•	The Mode and Filter panels change appearance according to rig: K2, K3, Yaesu, Kenwood.
•	The filter buttons set the rig to the preset widths with zero shift. The first four filter button preset widths are ignored by the K2 but they select K2 filters 1 to 4 if installed.
•	K3 can read and select the I/II filter group with the last filter button.
•	Yaesu can read and select the NAR filter group with the same button.
•	Changing width/shift or filter group on the rig will deselect the filter button.
•	It is virtually impossible to have a single set of preset values which agree with the way that all rigs handle width and shift. Users should use the right-click context to get the values that suit them best.

BUGS OUT
•	Displayed noise floor level corrected
•	Incorrect RTTY span edge changes in Fixed - sorted
•	K3 LO/HI adjusts 'wrong' CWL edges - sorted
•	Mousewheel free spin bug corrected.
•	Split TX filter edges for AM/FM - done.
•	Diversity displays single passband if KRX3 enabled in K3, SDR subrx audio becomes Main only, Split will show where VFOB is.
•	Database export naming corrected.
•	Spanafall proportions bug: Peak reset to 50:50 without Ctrl - fixed.
•	Width/Shift passband display change smoother, including K3 HI/LO changes.
•	Preamp and Attenuator 'not read on startup' bug removed.
•	*** Discovered a bug in K3 4.39 firmware: when changing mode the digimode will revert to that in force when the K3 was last powered up. Awaiting Elecraft attention.

ADDITIONS
•	WBIR seed calibration button in DSP tab; a bodged 'Goldilocks' routine, it works best with a signal +30dB above the rest, showing an image on the display. It can be run on a band with a signal with those characteristics; it may need running a couple of times if the signal is weak. If signals are too strong it will be overloaded and best left to normal WBIR to correct.
•	Memory now only a quick memory save/restore VFOA & mode. Memory save/restore needs re-engineering to accommodate K3/Yaesu modes.
•	Checkbox for CAT off in Setup for non-serial rigs.
•	'Listen through' uses Windows DirectSound, choice of output channel now available.
•	Added 3.0 kHz narrowest span to make psk and 50Hz filter more visible.
•	S Meter zeroes with Ctrl+wheel on top S meter button, set on 2.4kHz bw and the zero will be normalised for other bandwidths. dBm meter still reads power in the bandwidth.
•	Auto CW Offset checkbox now in Options tab.
•	RX3 choice back in K3 SUB context.
•	-autostart, -datapath command line options.

K3
•	K3 mode buttons: repeated clicks change to ALT modes. On Data button repeated clicks change digimode, Ctrl+click changes between DATA and REV DATA - full functionality not available until K3 firmware bug has been resolved by Elecraft.
•	K3 AM-s complete.
•	K3 FM shifts complete.

K2
•	NaP3 reads K2 bandwidth.
•	Non-K2 modes will rx through NaP3 but leave the K2 in the last K2 mode selected.
•	RTTY uses the tones set in Configure/NaP3/Options. Hopefully the K2 bfo can reach 1kHz so lowest pair should work.

YAESU supports FT-950/2000/5000
•	Yaesu mode buttons: repeated clicks change modes. Must set RTTY tones in Configure/NaP3/Options to match rig RTTY tones.
•	PKT offset automatically matches the rig offset selected in the menu.
•	Polls Preamp, Atten, CW Pitch, Width, Shift. 
•	NAR button selects/deselects narrow filters
•	Main passband drag, edge drag disabled.
•	IF Offset Frequencies: may become automatic in future release if your Global IF Freq is correct (the IF-2000 drifts a lot), CWL/CWU should be +- your CW tone freq, FSKL/FSKU should be +- the centre freq of your tone pair, PKTL/PKTU should be the value in menu setting 055, AM/FM should be 0 (PKTFM offset = FM), LSB/USB are +-1460 here. 

KENWOOD
•	CWU, FSKU have been enabled in 'TS-940' for Kenwood generic use.
•	Preamplifier and attenuator settings have nominal compensation in 'TS-940'; published Kenwood data incompletes.
•	All models: width/shift unsupported (Kenwood CAT commands mix width/shift and hi/lo cut according to mode.)

NaP3 v1.04

24th December 2011 (the 'Santa' release, aka 'No More Betas')

1. The SUB button bug with the K3 has been rectified. The K3 hardware options are interrogated when NaP3 starts. The KRX3 sub-receiver is currently recognised via a direct COM3 connection so that the SUB button invokes the K3 sub-rx and vice versa. Sub-rx control via LP-Bridge or LPB2 will require a newer version than v1.0.0 from Larry's site.

2. A stocking filler: the PageUp key will increase Span width, PageDown will decrease.

3. Another stocking filler: hopefully, I have mapped more Yaesu modes to the DIGU/DGL buttons. If not, there was a hole in this stocking 
Beta 3

22 December 2011
Read this in conjunction with NaP3 Beta 1&2 below.

Changes:

1.	Stuff moved around a bit. NaP3, EQ and XVTR configuration are in a Configure submenu
2.	VHF+ and HF buttons are gone because:
3.	Separate XVTR submenu settings enable VHF buttons, configures xvtrs
4.	Except for maximum span, the span widths change in multiples of 5kHz (Ctrl+mousewheel on span indicator to change).
5.	Display mode names chosen to reflect NaP3 personality.
6.	There are two default fft (resolution) values for each sound sample rate. The higher of the two defaults is only invoked in the digital modes. The defaults may be overridden in Setup for any mode and the change will be saved BUT any subsequent change to sound sample rate will reset the fft number to the defaults for that sample rate. The maximum fft bin number (resolution) has been limited at 32768.
7.	‘Averaging not saved between sessions’ bug gone
8.	IF offsets re-enabled in K3 mode for K2 and other ops
9.	Memory routines have been slimmed – both VFO A and VFO B are saved, modes now include Data/DataRev for K3, DIGL/U for others
10.	6m, 2m band buttons only visible if rig or MaxFreq enables them
11.	Some K3 branching isolated to help other rigs
12.	Last filter button (VAR) shows K3 I/II setting
13.	Bug in K3digimode context menu done
14.	Horiz cursor values should now agree with Ctrl+AVG and Ctrl+Peak changes 
15.	Grid/text adjusted for fft change to agree with calibration 
16.	Wheeltune step size saved per mode
17.	‘6m button staying lit’ bug gone
18.	GEN moved next to 160m to make change from Top Band to broadcast AM blindingly obvious. NOTE: anywhere outside the amateur bands reverts to GEN, which will have its own display level values. Since there is only one GEN, the values cannot be different for MW broadcast, SW broadcast and MARS.
19.	NaP3 sync AM mode follows K3 AM-S but does not set AM-S
20.	SUB controls K3 SUB and vice versa
21.	There will never be a full implementation of VAC but there is a checkbox ‘Listen via computer’ which allows that.  It works here with a pci E-MU 1212m and the ASIO driver; CWSkimmer runs simultaneously with the E-DSP Wave driver and I can listen to audio both/either through the 1212m and the MS system sound. There is no guarantee that your particular card/driver/setup will work.
22.	 Extra instances may be run by using the -datapath option in the command line. Only having one LP-Pan, this can not be fully tested here.
23.	Last minute addition: 'No CAT rig' option for rigs with no CAT.

Beta 2

18 October 2011 
Read this in conjunction with NaP3 Beta 1 below.

Changes from B1:
1.	The resolution of the span in use can be seen with a right click context anywhere on the row of span buttons. The default resolution increases as the span is decreased. The resolution can be changed from default with the context menu. The resolution is saved per span (and span is saved per mode). To reduce display latency the averaging time decreases as the resolution increases.
2.	Span widths have changed. There may be more variation in the future but with a monitor with decent horizontal resolution, a 6kHz span will show the phase shift ‘humps’ on a 31.5hz psk signal if resolution is 16k or above.
3.	The three-deep  bandstack on each band button saves frequency, filter, mode and thus span and resolution.
4.	The display levels can be raised/lowered with the mousewheel in tandem if the cursor is hovered over the AVG button with Ctrl held down. This changes the Grid Min/Max, Waterfall Low/High levels in Setup and is saved. The range between max/min & high/low remains that set in Setup/Display.
5.	The Panafall panadapter/waterfall proportions can be varied by hovering over the Peak button with Ctrl held down. This is saved.
6.	The wheeltune setting no longer flickers and 5Hz, 500Hz steps have been added.
7.	An inadvertent 85Hz offset in the waterfall has been corrected.
8.	DSB mode is no longer available.
9.	The COM port defaults to COM99 to match LPB2.
10.	The tx signal passband display in SPLIT or RIT & XIT can be cancelled with a context option on the RX B button.
11.	RX A/B audio channels have swapped to put main on left, sub on right.
12.	K3 digimodes can be set from a right click context on the data mode buttons.
13.	Saved display levels now work when the band is changed from the K3 as well as the console.
14.	Routines that only the FT5K reacted to, causing a ‘rit reset’ bug, have been amended. Other rigs still operate normally.
15.	K3 digimodes are saved on the bandstack but reverse data modes will be returned as normal (ie non-inverted) modes.
16.	The vertical tuning crosshair now extends into the waterfall.
17.	The hard coded band definitions have been amended. This may cure some obscure problems. Then again, it may not.
18.	Added latency defaults to 5ms instead of zero.
19.	Polling lockout defaults to 500ms. This may come down further if the CAT commands yet to be added are found to cooperate.
20.	Filter form code has been slimmed a bit.
21.	Filter width/shift controls have been disposed of but the SDR filter width/shift can still be changed by dragging the passband & edges.
22.	A Kenwood bug that didn’t save various rig parameters has hopefully been located and corrected.

To Do
Implement synchronous AM with the K3, possibly extended FM modes also.
Decide what to do about the 2m button and the transverter form.
Tidy the memories.
DirectX graphics instead of GDI.
Development was done at 192kHz sampling; users with 96kHz/48kHz cards might want to experiment with the panadapter Averaging at high resolutions.
Add a VAC checkbox. It might even do something.
Big tidy up to remove anomalies.
Include easy stuff for CAT on other rigs

Beta 1
19 September 2011:

NaP3 uses very heavily slimmed and modified open source code based on PowerSDR-IF1 1.19.3.5 by WU2X and K1CEG to provide a rig control panadapter primarily aimed at the Elecraft K3 but should be usable to some degree with other rigs.
Using N8LP’s LP-Pan IF adapter and LP-Bridge software, the design target was to reproduce the P3 in software with better resolution and a higher refresh rate at narrow spans, while including rig control and an SDR. It incorporates resolution improvements from WA3OFF and W3SZ and a dynamic waterfall from K3WOW.
Among the principal advantages over a P3 are better resolution and higher refresh rates at narrow span settings, together with a noise blanker that works on the display as well as the dsp rx.
It was developed with VS2008 using .NET 3.5 under Win7 32-bit and should run on XP. 

Features include:
*NaP3 is small and uses a single, small database.
*On first startup NaP3 writes a default database (using the local number system) to the user folder.
*Shift is followed with rigs that use the IS command. There is a great deal of juggling to handle K3 mode offsets, shifts and sideband inversions but none of this will (hopefully) not be evident with other rigs.
*There is a choice between fixed spectrum tune mode like the P3 or moving spectrum like PowerSDR-IF. It can be centred at any time. 
*The fixed tune mode moves to the next span ‘slice’ once half the passband is over the boundary. It can be selected to move a span or half a span. At maximum span the display is anomalous at more than half the sound card sample rate away, so the anomalous area is greyed.
*There are centred passbands for cw and psk31 with rtty tuned to the mark frequency and passband properly offset for rtty. The filter values for digimodes have been optimised for the K3 but should be useful with other rigs.
*Display resolutions can be chosen between 4096 and 262144 but 32768 is probably optimum for hf work, allowing cw keying sidebands to be observed – and even the phase shift humps on a psk31 signal. 
*The zoom buttons show the displayed spectrum span width; these follow the sound card sample rate and are saved per-mode so, in conjunction with the bandstack, digimode ops can automatically go to the small region of interest.
*The display grid values and waterfall threshold values are saved per band.
*The wide band image rejection is from PowerSDR 2.0.16 and at closedown the correction values are saved to start the next session. It is possible to check the wbir at work by monitoring the correction values at the bottom of the display.
*Band edge markers can be set to suit IARU Region 1/2/3.
*The wheeltune values follow the K3 tuning steps *during tuning*. Change the tuning rate and the wheeltune value will jump to the increment on the first movement of the VFO knob. I have changed the wheeltune value set to allow 12.5kHz and 25kHz steps for FM ops.
*NaP3 remembers if it was closed in a Collapsed state and reopens in that state. *Should ‘Top Controls’ not be showing, a STOP/RUN option will appear on the menu. You may remain in collapsed if you do not want to use the DSP rx controls.
*If used with a K3 with a hardware sub rx, a right click on the RX B button will allow a ‘3rd receiver’ – the K3 VFOB then  no longer tunes the NaP3 second receiver, this is left to the mousewheel.

Skin:
If you have used PowerSDR-IF before you will notice the button graphics are different; the PowerSDR-IF skin is the copyright of FlexRadio so I produced a set of NaP3 skins.
The following instructions assume some familiarity with the settings *not* mentioned.

Operation:
First run will generate a ‘wisdom’ file for the fft routines to be optimised for your processor. A default database named Nap3.xml,  which should be usable right away, will be written to the User directory in your operating system.

Menu: Setup
After starting, go to Setup/Setup tab to pick the COM port values and rig. If the rig allows some of the Optional Polling information settings these should show up. The K3 ticks the lot.
Pick your sound card, the mixer and the sample rate. Users of some cards, principally the emu1212m, may want to enable a couple of mSec of latency. The Gain can be used to calibrate the display/meter signal level once NaP3 is running.

In Setup/Display tab you can pick your IARU Region for band edge markers. Once running, the Spectrum Grid and Waterfall levels can be set for the band in use; they are saved automatically.

In Setup/DSP you can set the Spect(display) resolution. The original single choice was 4096; 32768 is probably optimum right down to psk31 at a 50Hz bandwidth. The signal level calibration is kept constant across the different values but the noise floor falls as resolution increases.  At 32768 and narrow spans it is worth reducing the  Display/Averaging from 350 to 250 or so.

In Setup/Options the CW sidetone pitch can be set; this overridden by the polled Pitch value from the K3. The DIGU/DIGL clicktune values will not be visible to K3 users; in its place comes a choice of RTTY tone pairs with default 1275/1445 values.

In Setup/IF Frequencies the various offsets can be inserted. Only the Global Offset is of any use to K3 operators; my early LP-Pan requires 9Hz of offset but that varies a few Hz with the weather…

Menu: Equalizer
Allows the NaP3 rx equalisation.

Menu: XVTRs
Has been left in with some code modification to remove the FlexRadio hardware options. I will be interested to see if this still works. The 2m band button has been left disabled but it should be possible to detect the 144MHz option in a K3 to enable it.

Menu:Collapse
Hides the SDR controls; those controls selected in Setup/Options will be displayed. With no Top Controls a STOP/RUN option will appear on the menu.

The Console
The Band, Mode and Filter buttons plus the VFO group (A/B, A>B etc) also control the rig and vice versa. All others control only the NaP3 rx.
RX B enables the NaP3 sub-receiver.
Fixed enables Panadapter fixed tune mode ; a right click gives a choice between full and half span jumps when the passband crosses a boundary.
Centre centres the passband.
The Zoom buttons go to the span width indicated on the button. The values change in response to the chosen sound card sampling rate. The noise floor will drop as the zoom increases.
The Memory save VFO (V>M) and restore VFO (M>V) may be simplified and/or K3ified at some point.

The view from a K3
Is different.
The last used digimode will appear in the right-hand mode buttons text, the rightmost being for DATA REV with the text in Misty Rose unselected and Indian Red when selected (does anybody use inverted digimodes deliberately?).
There are fewer filter controls because Width and Shift are controlled from the rig.
If a filter is shifted the VAR button will be highlighted until the shift returns to default. Selecting a filter with shift in operation will change the width value but *keep the K3 shift setting*. I might eventually make the preset filter buttons return the shift to default (this will require much high caffeine cola and pizza).
In AM the K3 has some interesting idiosyncrasies but NaP3 follows the K3 bandwidth up to 10kHz (5.00 displayed on K3). The K3 follows NaP3 up to 10kHz, remaining there if NaP3 uses greater bandwidths.

Pete Connors F5VNB
f5vnb@orange.fr